LiteLLM Provider for GitHub Copilot Chat
Use 100+ LLMs in VS Code with GitHub Copilot Chat powered by LiteLLM.
Features
- 100+ LLMs through a unified API (OpenAI, Anthropic, Google, AWS, Azure, Ollama, and any OpenAI-compatible endpoint)
- Multi-server support: connect to multiple LiteLLM servers simultaneously and aggregate models
- Streaming chat completions with SSE
- Function calling (tool use) support
- Multimodal input (vision/image attachments)
- Reasoning/thinking tokens (if the model supports them)
- Dashboard panel for servers, models, and settings
- API key encryption via VS Code SecretStorage
- Per-model pricing display in the model picker
Requirements
- VS Code 1.99.0 or higher, with the GitHub Copilot Chat extension installed and signed in
- LiteLLM proxy running (self-hosted or cloud)
- LiteLLM API key (if required by your setup)
Quick Start
- Install the extension
- Open VS Code's chat interface (
Ctrl+Alt+I / Cmd+Ctrl+I, or the chat icon in the title bar)
- Run the command "LiteLLM: Add Server" from the Command Palette
- Enter a label (e.g.
Local), base URL (e.g. http://localhost:4000), and API key
- Back in chat, pick one of the new models in the model picker and send a message
You can also declare the server in settings.json:
"litellm-vscode-chat.servers": [
{ "label": "Local", "baseUrl": "http://localhost:4000", "apiKey": "sk-..." }
]
The API key is automatically migrated to VS Code's encrypted secret storage on first activation.
Commands
| Command |
Description |
LiteLLM: Add Server |
Add a new LiteLLM server |
LiteLLM: Remove Server |
Remove a configured server |
LiteLLM: Manage Servers |
Quick pick for server management |
LiteLLM: Open Dashboard |
Open the dashboard webview |
LiteLLM: Test Connection |
Test a server connection and discover models |
LiteLLM: Sync Models |
Trigger a model refresh |
LiteLLM: Show Output Log |
Open the extension's output channel |
Settings
| Setting |
Default |
Description |
litellm-vscode-chat.servers |
[] |
LiteLLM server entries |
litellm-vscode-chat.discovery.timeout |
30000 |
Timeout (ms) for model discovery |
litellm-vscode-chat.chat.timeout |
300000 |
Timeout (ms) for chat requests |
litellm-vscode-chat.chat.tokenEstimation |
char4 |
Token estimation mode |
litellm-vscode-chat.chat.promptCaching |
false |
Send prompt-cache breakpoints |
litellm-vscode-chat.models.maxOutputTokens |
4096 |
Default max output tokens |
Architecture
┌─────────────────────────────────────────────────────────────┐
│ VS Code Chat Host │
│ (calls LanguageModelChatProvider interface) │
└──────────────────────────┬──────────────────────────────────┘
│
┌──────────▼──────────┐
│ LiteLLMChatModel │
│ Provider │
│ (src/provider/) │
└──────────┬──────────┘
│
┌───────────────┼───────────────┐
│ │ │
┌──────▼──────┐ ┌──────▼──────┐ ┌──────▼──────┐
│ Discovery │ │ ChatClient │ │ TokenCount │
│ (/models) │ │ (/chat) │ │ (estim.) │
└──────┬──────┘ └──────┬──────┘ └─────────────┘
│ │
┌──────▼───────────────▼──────┐
│ LiteLLM Proxy Server │
│ (OpenAI-compatible API) │
└────────────────────────────┘
Installation
From VSIX file
Option 1 — VS Code GUI:
- Open VS Code
- Open the Extensions panel (
Ctrl+Shift+X)
- Click the
⋯ menu (top-right) → Install from VSIX...
- Select the
litellm-vscode-chat-0.1.0.vsix file
Option 2 — Command line:
code --install-extension litellm-vscode-chat-0.1.0.vsix
From source (development)
npm install
npm run compile
Press F5 to launch the Extension Development Host.
Packaging
To build a .vsix package from source:
npm run compile
npx vsce package --no-dependencies
This produces litellm-vscode-chat-0.1.0.vsix in the project root.
To rebuild after code changes, re-run the same commands — the .vsix is regenerated with the updated code.
Privacy
Your prompts and completions travel only between VS Code and the LiteLLM servers you configure. No telemetry, no third-party calls.
License
MIT