Problem
VS Code's GitHub Copilot extension currently supports BYOK (Bring Your Own Key) models for chat via chatLanguageModels.json (VS Code insiders) or with other openAI compatible provider extensions like the Unify Chat Provider, but not for inline code completions.
When setting "github.copilot.selectedCompletionModel" to a custom model ID (e.g., a local model served via OpenAI-compatible API), the setting is silently ignored because the model ID is not in the list returned by GitHub's API. The extension falls back to the default Copilot cloud model (gpt-41-copilot), and completions always go through proxy.business.githubcopilot.com.
This means:
Chat works with local models ✅
Inline code completions always require GitHub's cloud ❌
Disconnecting from the internet disables completions entirely ❌
Current Behavior
|
if (!genericModels.includes(userSelectedCompletionModel)) { |
if (!genericModels.includes(userSelectedCompletionModel)) {
// Silently falls back to default model
userSelectedCompletionModel = null;}
The fallback is silent — no warning or error is shown to the user. Completions continue to go to GitHub's cloud proxy.
Expected Behavior
Users should be able to configure a custom/OpenAI-compatible endpoint for inline code completions, similar to how chat completions work with chatLanguageModels.json or the Unify Chat Provider. This would enable:
Fully offline code completions
Use of self-hosted local models (llama.cpp, FastFlowLM, vLLM, etc.)
BYOK models for organizations that cannot use GitHub's cloud
Problem
VS Code's GitHub Copilot extension currently supports BYOK (Bring Your Own Key) models for chat via chatLanguageModels.json (VS Code insiders) or with other openAI compatible provider extensions like the Unify Chat Provider, but not for inline code completions.
When setting "github.copilot.selectedCompletionModel" to a custom model ID (e.g., a local model served via OpenAI-compatible API), the setting is silently ignored because the model ID is not in the list returned by GitHub's API. The extension falls back to the default Copilot cloud model (gpt-41-copilot), and completions always go through proxy.business.githubcopilot.com.
This means:
Chat works with local models ✅
Inline code completions always require GitHub's cloud ❌
Disconnecting from the internet disables completions entirely ❌
Current Behavior
vscode/extensions/copilot/src/extension/completions-core/vscode-node/lib/src/openai/model.ts
Line 139 in 40a9d56
The fallback is silent — no warning or error is shown to the user. Completions continue to go to GitHub's cloud proxy.
Expected Behavior
Users should be able to configure a custom/OpenAI-compatible endpoint for inline code completions, similar to how chat completions work with chatLanguageModels.json or the Unify Chat Provider. This would enable:
Fully offline code completions
Use of self-hosted local models (llama.cpp, FastFlowLM, vLLM, etc.)
BYOK models for organizations that cannot use GitHub's cloud