Files
AFFiNE-Mirror/packages/frontend/admin/src/config.json
akumatus 5fcdad46eb feat(core): add google vertex ai (#12423)
Close [AI-125](https://linear.app/affine-design/issue/AI-125)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added new provider configurations `geminiVertex` and `anthropicVertex` for Google Vertex AI in backend schema, provider classes, and admin config.
  - Introduced `GeminiVertexProvider` and `AnthropicVertexProvider` classes supporting Vertex AI models with specific capabilities.
  - Expanded model options for transcription prompts with newer Gemini models.
  - Re-exported provider modules to include Vertex AI variants.

- **Improvements**
  - Extended provider architecture to support separate Vertex AI configurations and models.
  - Updated test setup to replace deprecated provider references with new Vertex variants.
  - Consolidated environment variables for server testing with a single `SERVER_CONFIG`.

- **Bug Fixes**
  - Updated mock models and import references in tests to align with new provider classes.

- **Chores**
  - Added `@ai-sdk/google-vertex` dependency for Vertex AI support.
  - Updated dependency list to include `@ai-sdk/google-vertex`.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-26 13:09:29 +00:00

366 lines
11 KiB
JSON

{
"metrics": {
"enabled": {
"type": "Boolean",
"desc": "Enable metric and tracing collection"
}
},
"crypto": {
"privateKey": {
"type": "String",
"desc": "The private key for used by the crypto module to create signed tokens or encrypt data.",
"env": "AFFINE_PRIVATE_KEY"
}
},
"job": {
"queue": {
"type": "Object",
"desc": "The config for job queues",
"link": "https://api.docs.bullmq.io/interfaces/v5.QueueOptions.html"
},
"worker": {
"type": "Object",
"desc": "The config for job workers",
"link": "https://api.docs.bullmq.io/interfaces/v5.WorkerOptions.html"
},
"queues.copilot": {
"type": "Object",
"desc": "The config for copilot job queue"
},
"queues.doc": {
"type": "Object",
"desc": "The config for doc job queue"
},
"queues.indexer": {
"type": "Object",
"desc": "The config for indexer job queue"
},
"queues.notification": {
"type": "Object",
"desc": "The config for notification job queue"
},
"queues.nightly": {
"type": "Object",
"desc": "The config for nightly job queue"
}
},
"throttle": {
"enabled": {
"type": "Boolean",
"desc": "Whether the throttler is enabled."
},
"throttlers.default": {
"type": "Object",
"desc": "The config for the default throttler."
},
"throttlers.strict": {
"type": "Object",
"desc": "The config for the strict throttler."
}
},
"auth": {
"allowSignup": {
"type": "Boolean",
"desc": "Whether allow new registrations."
},
"requireEmailDomainVerification": {
"type": "Boolean",
"desc": "Whether require email domain record verification before accessing restricted resources."
},
"requireEmailVerification": {
"type": "Boolean",
"desc": "Whether require email verification before accessing restricted resources(not implemented)."
},
"passwordRequirements": {
"type": "Object",
"desc": "The password strength requirements when set new password."
},
"session.ttl": {
"type": "Number",
"desc": "Application auth expiration time in seconds."
},
"session.ttr": {
"type": "Number",
"desc": "Application auth time to refresh in seconds."
}
},
"mailer": {
"SMTP.host": {
"type": "String",
"desc": "Host of the email server (e.g. smtp.gmail.com)",
"env": "MAILER_HOST"
},
"SMTP.port": {
"type": "Number",
"desc": "Port of the email server (they commonly are 25, 465 or 587)",
"env": "MAILER_PORT"
},
"SMTP.username": {
"type": "String",
"desc": "Username used to authenticate the email server",
"env": "MAILER_USER"
},
"SMTP.password": {
"type": "String",
"desc": "Password used to authenticate the email server",
"env": "MAILER_PASSWORD"
},
"SMTP.sender": {
"type": "String",
"desc": "Sender of all the emails (e.g. \"AFFiNE Team <noreply@affine.pro>\")",
"env": "MAILER_SENDER"
},
"SMTP.ignoreTLS": {
"type": "Boolean",
"desc": "Whether ignore email server's TSL certification verification. Enable it for self-signed certificates.",
"env": "MAILER_IGNORE_TLS"
}
},
"doc": {
"experimental.yocto": {
"type": "Boolean",
"desc": "Use `y-octo` to merge updates at the same time when merging using Yjs."
},
"history.interval": {
"type": "Number",
"desc": "The minimum time interval in milliseconds of creating a new history snapshot when doc get updated."
}
},
"storages": {
"avatar.publicPath": {
"type": "String",
"desc": "The public accessible path prefix for user avatars."
},
"avatar.storage": {
"type": "Object",
"desc": "The config of storage for user avatars."
},
"blob.storage": {
"type": "Object",
"desc": "The config of storage for all uploaded blobs(images, videos, etc.)."
}
},
"websocket": {
"transports": {
"type": "Array",
"desc": "The enabled transports for accepting websocket traffics.",
"link": "https://docs.nestjs.com/websockets/gateways#transports"
},
"maxHttpBufferSize": {
"type": "Number",
"desc": "How many bytes or characters a message can be, before closing the session (to avoid DoS)."
}
},
"server": {
"name": {
"type": "String",
"desc": "A recognizable name for the server. Will be shown when connected with AFFiNE Desktop."
},
"externalUrl": {
"type": "String",
"desc": "Base url of AFFiNE server, used for generating external urls.\nDefault to be `[server.protocol]://[server.host][:server.port]` if not specified.\n ",
"env": "AFFINE_SERVER_EXTERNAL_URL"
},
"https": {
"type": "Boolean",
"desc": "Whether the server is hosted on a ssl enabled domain (https://).",
"env": "AFFINE_SERVER_HTTPS"
},
"host": {
"type": "String",
"desc": "Where the server get deployed(FQDN).",
"env": "AFFINE_SERVER_HOST"
},
"port": {
"type": "Number",
"desc": "Which port the server will listen on.",
"env": "AFFINE_SERVER_PORT"
},
"path": {
"type": "String",
"desc": "Subpath where the server get deployed if there is one.(e.g. /affine)",
"env": "AFFINE_SERVER_SUB_PATH"
}
},
"flags": {
"earlyAccessControl": {
"type": "Boolean",
"desc": "Only allow users with early access features to access the app"
}
},
"docService": {
"endpoint": {
"type": "String",
"desc": "The endpoint of the doc service.",
"env": "DOC_SERVICE_ENDPOINT"
}
},
"client": {
"versionControl.enabled": {
"type": "Boolean",
"desc": "Whether check version of client before accessing the server."
},
"versionControl.requiredVersion": {
"type": "String",
"desc": "Allowed version range of the app that allowed to access the server. Requires 'client/versionControl.enabled' to be true to take effect."
}
},
"captcha": {
"enabled": {
"type": "Boolean",
"desc": "Check captcha challenge when user authenticating the app."
},
"config": {
"type": "Object",
"desc": "The config for the captcha plugin."
}
},
"copilot": {
"enabled": {
"type": "Boolean",
"desc": "Whether to enable the copilot plugin."
},
"providers.openai": {
"type": "Object",
"desc": "The config for the openai provider.",
"link": "https://github.com/openai/openai-node"
},
"providers.fal": {
"type": "Object",
"desc": "The config for the fal provider."
},
"providers.gemini": {
"type": "Object",
"desc": "The config for the gemini provider."
},
"providers.geminiVertex": {
"type": "Object",
"desc": "The config for the gemini provider in Google Vertex AI."
},
"providers.perplexity": {
"type": "Object",
"desc": "The config for the perplexity provider."
},
"providers.anthropic": {
"type": "Object",
"desc": "The config for the anthropic provider."
},
"providers.anthropicVertex": {
"type": "Object",
"desc": "The config for the anthropic provider in Google Vertex AI."
},
"unsplash": {
"type": "Object",
"desc": "The config for the unsplash key."
},
"exa": {
"type": "Object",
"desc": "The config for the exa web search key."
},
"storage": {
"type": "Object",
"desc": "The config for the storage provider."
}
},
"customerIo": {
"enabled": {
"type": "Boolean",
"desc": "Enable customer.io integration"
},
"token": {
"type": "String",
"desc": "Customer.io token"
}
},
"indexer": {
"enabled": {
"type": "Boolean",
"desc": "Enable indexer plugin",
"env": "AFFINE_INDEXER_ENABLED"
},
"provider.type": {
"type": "String",
"desc": "Indexer search service provider name",
"env": "AFFINE_INDEXER_SEARCH_PROVIDER"
},
"provider.endpoint": {
"type": "String",
"desc": "Indexer search service endpoint",
"env": "AFFINE_INDEXER_SEARCH_ENDPOINT"
},
"provider.apiKey": {
"type": "String",
"desc": "Indexer search service api key. Optional for elasticsearch",
"link": "https://www.elastic.co/guide/server/current/api-key.html",
"env": "AFFINE_INDEXER_SEARCH_API_KEY"
},
"provider.username": {
"type": "String",
"desc": "Indexer search service auth username, if not set, basic auth will be disabled. Optional for elasticsearch",
"link": "https://www.elastic.co/guide/en/elasticsearch/reference/current/http-clients.html",
"env": "AFFINE_INDEXER_SEARCH_USERNAME"
},
"provider.password": {
"type": "String",
"desc": "Indexer search service auth password, if not set, basic auth will be disabled. Optional for elasticsearch",
"env": "AFFINE_INDEXER_SEARCH_PASSWORD"
},
"autoIndex.batchSize": {
"type": "Number",
"desc": "Number of workspaces automatically indexed per batch"
}
},
"oauth": {
"providers.google": {
"type": "Object",
"desc": "Google OAuth provider config",
"link": "https://developers.google.com/identity/protocols/oauth2/web-server"
},
"providers.github": {
"type": "Object",
"desc": "GitHub OAuth provider config",
"link": "https://docs.github.com/en/apps/oauth-apps"
},
"providers.oidc": {
"type": "Object",
"desc": "OIDC OAuth provider config",
"link": "https://openid.net/specs/openid-connect-core-1_0.html"
},
"providers.apple": {
"type": "Object",
"desc": "Apple OAuth provider config",
"link": "https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/implementing_sign_in_with_apple_in_your_app"
}
},
"payment": {
"enabled": {
"type": "Boolean",
"desc": "Whether enable payment plugin"
},
"showLifetimePrice": {
"type": "Boolean",
"desc": "Whether enable lifetime price and allow user to pay for it."
},
"apiKey": {
"type": "String",
"desc": "Stripe API key to enable payment service.",
"env": "STRIPE_API_KEY"
},
"webhookKey": {
"type": "String",
"desc": "Stripe webhook key to enable payment service.",
"env": "STRIPE_WEBHOOK_KEY"
},
"stripe": {
"type": "Object",
"desc": "Stripe sdk options",
"link": "https://docs.stripe.com/api"
}
},
"worker": {
"allowedOrigin": {
"type": "Array",
"desc": "Allowed origin"
}
}
}