Manage Multiple Providers and API Keys
mainThe owned_by field in a model configuration (also known as provider or provide) is used to group provider-specific API keys. The extension stores these keys using the pattern oaicopilot.apiKey.<providerId_lowercase>.
To configure keys for multiple providers:
- Open VS Code settings and define your models with different
owned_byvalues. - Open the Command Palette (
Ctrl+Shift+P) and runOAICopilot: Set OAI Compatible Multi-Provider API Keyto enter the keys for each provider.
"oaicopilot.models": [
{
"id": "Qwen/Qwen3-Coder-480B-A35B-Instruct",
"owned_by": "modelscope",
"context_length": 256000,
"max_tokens": 8192,
"temperature": 0,
"top_p": 1
},
{
"id": "qwen3-coder",
"owned_by": "iflow",
"baseUrl": "https://apis.iflow.cn/v1",
"context_length": 256000,
"max_tokens": 8192,
"temperature": 0,
"top_p": 1
}
]