Skip to content

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:

ModelAccess
GPT-4o (Copilot)Included with subscription
Claude 3.5 Sonnet (Copilot)Included with subscription
Gemini 2.0 (Copilot)Included with subscription

Setup

  1. Install the GitHub Copilot extension in VS Code
  2. Sign in with your GitHub account
  3. 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.continue

Configure 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:

Terminal window
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

  1. Open VS Code and check the extension is active (green icon in sidebar)
  2. Open the extension’s chat panel
  3. Confirm the configured model appears in the model dropdown
  4. 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