* feat(chat): power legacy chat from the model-management "chat" backend Legacy chat, project chat, vault QA, quick command, and quick ask now select models from the model-management "chat" backend (backends.chat.enabledModels) instead of the legacy activeModels / defaultModelKey. A new ConfiguredModel→CustomModel bridge feeds the existing ChatModelManager (the stubbed v4 ChatModelFactory is untouched), and a new "Quick Chat" curation section under the Agents settings tab lets users choose which BYOK/Plus models appear in the chat picker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * style(skills): apply prettier formatting to builtinSkills.test.ts Collapse a multi-line expect() onto one line to satisfy the project's prettier config (surfaced when running npm run format). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(chat): stabilize chat backend model selections * fix(chat): address chat backend review regressions * fix(chat): show legacy chat models in a flat list Drop the per-provider _group on chat picker entries so the legacy chat model picker renders a single flat list (provider icons inline, no section headers), matching pre-migration behavior. Agent Mode keeps its per-backend headers via its own helper. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(chat): remove dead per-model parameter editing After the model-management chat migration, per-model parameter editing is unreachable: the chat selection is now a configuredModelId UUID, so the ChatSettingsPopover editor (gated on a legacy activeModels match) never renders, and TokenLimitWarning's activeModels lookup always misses and falls back to global settings. v4 agent mode no longer supports per-model parameter editing. - ChatSettingsPopover: drop the model-param plumbing (originalModel / bridgedModel / canEditModelParameters, local-model save/debounce, ModelParametersEditor); keep System Prompt + Disable Builtin controls. - TokenLimitWarning: always open the global Copilot settings tab. - Delete the now-orphaned ModelEditDialog and ModelParametersEditor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(chat): drop dead legacy model-key fallback in streaming session The streaming chat session's chain cache key fell back to name|provider when configuredModelId was absent. Both callers (Quick Ask, custom-command chat) now source their model from useResolvedChatBackendModel -> configuredModelToCustomModel, which always stamps configuredModelId, so the fallback was unreachable. Derive the key directly from configuredModelId; a model without one is treated as no usable model via the existing guards. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(chat): remove test-only getLegacyChatModelKey helper The singular getLegacyChatModelKey was exported but had no production callers — only the barrel re-export and one test assertion referenced it. Remove it (and its export + assertion); the load-bearing plural getLegacyChatModelKeys, which powers legacy-key resolution in isChatModelSelectionForEntry, is kept and now carries the rationale comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(model-management): dedupe catalog-id to provider map Drop the duplicate CATALOG_ID_TO_LEGACY_PROVIDER table in chatModelSelection and reuse the now-exported CATALOG_ID_TO_CHAT_PROVIDER from configuredModelToCustomModel (extended with anthropic/google for the legacy-key path). Single source of truth for catalog-id to ChatModelProviders. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
6.9 KiB
LLM Providers
Copilot includes 16 built-in AI providers, and you can add an unlimited number of additional models as long as they are OpenAI-compatible. You can use cloud-based services that require API keys, or run models locally on your own machine. This guide explains how to set up each provider.
How to Set API Keys
- Go to Settings → Copilot → Models (BYOK)
- Add a provider
- Enter the provider API key and select the models you want to configure
- Click Save
- Enable models for chat under Agents → Quick Chat models
You can configure multiple providers simultaneously and switch between them by changing the default model.
Cloud Providers
OpenRouter (Default)
OpenRouter is a gateway that provides access to hundreds of models from many providers through a single API key.
- Get a key: https://openrouter.ai/keys
- Default model: OpenRouter Gemini 2.5 Flash
- Why use it: One key, many models. Good starting point.
- Setting key:
openRouterAiApiKey
OpenAI
Direct access to GPT-4.1, GPT-5, and other OpenAI models.
- Get a key: https://platform.openai.com/api-keys
- Models include: GPT-5.4, GPT-5 mini, GPT-5 nano, GPT-4.1, GPT-4.1 mini, GPT-4.1 nano, o4-mini (reasoning)
- Setting key:
openAIApiKey
Anthropic
Access to Claude models (Opus, Sonnet, etc.).
- Get a key: https://console.anthropic.com/settings/keys
- Models include: claude-opus-4-6, claude-sonnet-4-5
- Setting key:
anthropicApiKey
Google Gemini
Access to Google's Gemini family of models.
- Get a key: https://makersuite.google.com/app/apikey
- Models include: gemini-2.5-pro, gemini-2.5-flash, gemini-3.5-flash, gemini-3.1-pro-preview
- Setting key:
googleApiKey
XAI / Grok
Access to Grok models from xAI.
- Get a key: https://console.x.ai
- Models include: grok-4-1-fast
- Setting key:
xaiApiKey
Groq
Groq provides very fast inference for open-source models.
- Get a key: https://console.groq.com/keys
- Models include: llama3-8b-8192 (and others)
- Setting key:
groqApiKey
Mistral
Access to Mistral AI's models.
- Get a key: https://console.mistral.ai/api-keys
- Models include: mistral-tiny-latest (and others)
- Setting key:
mistralApiKey
DeepSeek
Access to DeepSeek's chat and reasoning models.
- Get a key: https://platform.deepseek.com/api-keys
- Models include: deepseek-chat, deepseek-reasoner
- Setting key:
deepseekApiKey
Cohere
Access to Cohere's Command models.
- Get a key: https://dashboard.cohere.ai/api-keys
- Models include: command-r
- Setting key:
cohereApiKey
SiliconFlow
A Chinese AI cloud platform with access to DeepSeek and Qwen models.
- Get a key: https://cloud.siliconflow.com/me/account/ak
- Models include: DeepSeek-V3, DeepSeek-R1 (via SiliconFlow)
- Setting key:
siliconflowApiKey
Azure OpenAI
Access to OpenAI models deployed on Microsoft Azure. Requires four fields to be configured:
| Setting | Description |
|---|---|
| API Key | Your Azure OpenAI key |
| Instance Name | Your Azure resource name |
| Deployment Name | Your model deployment name |
| API Version | e.g., 2024-02-01 |
- Note: Unlike other providers, Azure OpenAI uses your own Azure deployment
- Embedding: Can also use Azure for embeddings (separate deployment name required)
Amazon Bedrock
Access to models hosted on AWS Bedrock.
- Get credentials: https://console.aws.amazon.com/iam/home#/security_credentials
- Required fields: Access Key ID (API key), Region
- Setting key:
amazonBedrockApiKey
Important: Always use cross-region inference profile IDs, not bare model IDs. For example:
- Use:
us.anthropic.claude-sonnet-4-5-20250929-v1:0 - Not:
anthropic.claude-sonnet-4-5-20250929-v1:0
Cross-region profiles (with the us., eu., apac., or global. prefix) are more reliable and available across regions.
GitHub Copilot
Use your existing GitHub Copilot subscription to access AI models.
- OAuth flow: Click Connect GitHub Copilot in the API key dialog
- No separate API key needed — authenticates via GitHub OAuth
- Requires: Active GitHub Copilot subscription
Local Model Providers
Local providers run models on your own computer. No API key or internet connection needed once set up.
Ollama
Runs open-source models locally on your machine.
- Default port: 11434
- URL:
http://localhost:11434/v1/ - Setup: Install Ollama (ollama.ai), pull a model, then add it in Copilot's Model settings
- No API key required
LM Studio
A desktop app for running local models with a GUI.
- Default port: 1234
- URL:
http://localhost:1234/v1 - Setup: Install LM Studio, load a model, go to the Developer tab, enable CORS (required), click "Start Server", then add the model in Copilot
- No API key required
3rd Party (OpenAI-Format)
For any API that follows the OpenAI API format. Useful for custom deployments, proxies, or other local inference servers (vLLM, LiteLLM, etc.).
- Requires: Base URL and optionally an API key
- Use when: Your provider isn't in the list but speaks OpenAI-format
CORS Warning: Some third-party providers (e.g., Perplexity) don't support CORS, which causes Copilot to fail with a CORS error. When adding a custom model for such a provider, enable the CORS toggle in the custom model form. Note: streaming is not available in CORS mode.
Provider-Specific Gotchas
| Provider | Common Issue | Fix |
|---|---|---|
| Azure OpenAI | Missing one of four required fields | Check all four settings: key, instance name, deployment name, API version |
| Amazon Bedrock | Rate limit or model not found | Use cross-region inference profile IDs with us., eu., apac., or global. prefix |
| GitHub Copilot | Token expired | Re-authenticate via the OAuth button in API key dialog |
| Ollama | Connection refused | Make sure Ollama is running (ollama serve) and the port is correct |
| Google Gemini | Quota exceeded | Use a different model or check your quota at console.cloud.google.com |
| DeepSeek | Streaming errors | Try disabling streaming in the per-session settings if you encounter issues |
Related
- Models and Parameters — Enable, disable, and configure models
- Getting Started — First-time setup