Supported AI Providers
Available models, configuration keys, and zero-credential sandbox behavior.
Provider IDs are defined in packages/config/providers.ts. The descriptors in packages/ai/provider/index.ts own each default model, API-key lookup and lazy SDK constructor.
| Provider | Repository default model | Environment key |
|---|---|---|
openai | gpt-5.6-sol | OPENAI_API_KEY |
anthropic | claude-fable-5-1 | ANTHROPIC_API_KEY |
google | gemini-3.8-flash | GEMINI_API_KEY or GOOGLE_API_KEY |
groq | openai/gpt-oss-120b | GROQ_API_KEY |
mistral | mistral-large-latest | MISTRAL_API_KEY |
deepseek | deepseek-v4-pro | DEEPSEEK_API_KEY |
xai | grok-4.6 | XAI_API_KEY |
cohere | command-r-plus | COHERE_API_KEY |
openrouter | openai/gpt-oss-20b | OPENROUTER_API_KEY |
together | openai/gpt-oss-120b | TOGETHER_API_KEY |
mock | Offline text responses | No key |
These are checked-in defaults, not a guarantee that every model is available to your account. Pass an explicit model to chatCompletion options or getLanguageModel when needed.
Selection
MOCK_SERVICES=true or AI_PROVIDER=mock selects mock. Otherwise, a nonblank AI_PROVIDER selects a known provider; unknown names fail clearly. Without an explicit selection, key detection follows the table's real-provider order, then falls back to mock. An explicitly selected real provider requires its key.
Select AI_PROVIDER=openrouter or AI_PROVIDER=together for the bundled OpenAI Chat Completions adapters. Set the matching API key and optionally OPENROUTER_MODEL or TOGETHER_MODEL; otherwise the table defaults apply. Confirm the model is enabled and funded in your account. These adapters use https://openrouter.ai/api/v1 and https://api.together.ai/v1, respectively. Generic openai remains available with OPENAI_BASE_URL, but compatible services must support its selected API protocol.
A saved AI provider in /app/admin/setup is used when AI_PROVIDER is unset. Credentials and model overrides resolve environment values before saved integration values. Missing credentials on a selected real provider fail; they never silently select mock.
Add a provider
Add its ID to the AI provider tuple in packages/config/providers.ts. Add a modelProviders descriptor in packages/ai/provider/index.ts containing defaultModel, keyName, getApiKey and a lazy createModel function. Add a vendor SDK to the AI workspace only when necessary and update bun.lock.
Keep automatic selection order explicit, fail on missing credentials, and test mocked SDK selection without network calls. Then validate real text/streaming/tool capabilities separately. The common AiAdapter contract remains chatCompletion(messages, options?) â { text }; the mock path does not emulate every SDK capability.
When adding a provider ID, also add its credential-guidance entry in packages/config/providers.ts. This supports product validation and setup guidance; a product manifest does not automatically select a runtime adapter.