VSCode Copilot Integration
VSCode Copilot Integration
Visual Studio Code with GitHub Copilot provides AI-assisted coding. Copilot primarily uses its own hosted models but supports extensions for connecting to external providers.
Overview
GitHub Copilot is a subscription-based AI coding assistant built into VS Code. It uses OpenAI models hosted by GitHub and does not natively support bringing your own API keys for other providers.
GitHub Copilot (Default)
Copilot comes pre-configured with its own models:
| Model | Access |
|---|---|
| GPT-4o (Copilot) | Included with subscription |
| Claude 3.5 Sonnet (Copilot) | Included with subscription |
| Gemini 2.0 (Copilot) | Included with subscription |
Setup
- Install the GitHub Copilot extension in VS Code
- Sign in with your GitHub account
- Activate your Copilot subscription (Free, Pro, or Business)
No API key configuration is needed for default Copilot models.
Using External Providers via Extensions
To use custom API keys with other providers, install community extensions:
Continue Extension
Continue supports multiple providers.
Install via VS Code:
ext install Continue.continueConfigure in .continue/config.json:
{ "models": [ { "title": "Claude Sonnet", "model": "claude-sonnet-4-20250514", "apiKey": "sk-ant-...", "provider": "anthropic" }, { "title": "GPT-4o", "model": "gpt-4o", "apiKey": "sk-...", "provider": "openai" }, { "title": "Gemini Flash", "model": "gemini-2.0-flash", "apiKey": "...", "provider": "google" }, { "title": "DeepSeek Coder", "model": "deepseek-coder", "apiKey": "...", "provider": "deepseek" }, { "title": "Llama 3.3 (Groq)", "model": "llama-3.3-70b-versatile", "apiKey": "gsk_...", "provider": "groq" } ]}Codeium Extension
Codeium offers a free AI coding assistant with its own models.
Environment Variables
For extensions that support environment variables:
export ANTHROPIC_API_KEY="sk-ant-..."export OPENAI_API_KEY="sk-..."export GEMINI_API_KEY="..."export DEEPSEEK_API_KEY="..."export GROQ_API_KEY="gsk_..."Verification
- Open VS Code and check the extension is active (green icon in sidebar)
- Open the extension’s chat panel
- Confirm the configured model appears in the model dropdown
- Send a test prompt to verify connectivity
Troubleshooting
- Copilot not activating: Verify your GitHub subscription at github.com/settings/copilot
- Extension not loading: Check the VS Code Output panel for errors
- API key not recognized: Ensure the key is set in the correct config file or environment
- Model not available: Confirm the model name and provider match the extension’s documentation