LiteLLM Provider for GitHub Copilot Chat

English | 简体中文 | 繁體中文
Use 100+ LLMs in VS Code with GitHub Copilot Chat powered by LiteLLM.
Features
- Access 100+ LLMs (OpenAI, Anthropic, Google, AWS, Azure, and more) through a unified API
- Multi-server support: connect to multiple LiteLLM servers simultaneously and aggregate models
- Automatic provider selection with
cheapest and fastest modes, on gateways that report tool-capable per-provider routes (details)
- Multimodal input (vision, PDF/document attachments, text/JSON data) and generated image/audio output
- Streaming, function calling, and thinking/reasoning tokens
- Broad model options pass-through (
response_format, reasoning_effort, seed, and more)
- Per-model capability overrides and declared models: correct what a gateway reports, or register models it cannot list at all, with gaps auto-filled from the OpenRouter catalog (details)
- Inline completions: opt-in ghost text from a completions-capable (FIM) model on your own proxy, scoped to the languages you choose (details)
- Agent tools: opt-in tools Copilot's agent can call to read this extension's diagnostics and configuration, and, switch by switch, to change settings after you accept a confirmation card (details)
- A dashboard panel for servers, models, and settings, with plain VS Code settings behind it
- Settings export and import: move servers, model records, and stored secrets to another machine, with a one-command undo (details)
- Self-hosted or cloud-based deployment options
Requirements
- VS Code 1.136.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 from the VS Code Marketplace
- Open VS Code's chat interface (
Ctrl+Alt+I / Cmd+Ctrl+I, or the chat icon in the title bar)
- Click the model picker > "Manage Models..." > "LiteLLM"
- Add a server: enter a label, base URL (e.g.,
http://localhost:4000), and API key
- Select models to add
- Back in chat, pick one of the new models in the model picker and send a message
You can equally declare the server as a setting (user settings.json); the dashboard's Add server form ("LiteLLM: Open Dashboard") writes the same entry:
"litellm-vscode-chat.servers": [
{ "label": "Local", "baseUrl": "http://localhost:4000", "auth": { "apiKey": "sk-..." } }
]
The extension also ships a walkthrough covering these steps: run "Welcome: Open Walkthrough..." from the Command Palette and pick "Get started with LiteLLM for Copilot Chat".
Documentation
- Getting started - first server, the walkthrough, commands, and where to configure things
- Servers - multiple servers, secrets and secret storage, OAuth, virtual keys, adopting external servers
- Models and capabilities - what registers, capability gating, multimodal input and output, usage reporting
- Model parameters - per-model request parameters, prefix matching, precedence, reasoning effort
- Model capabilities - capability overrides, declared models, the OpenRouter catalog, expected discovery failures
- Settings - every setting with its default: token limits, timeouts, caching, headers
- Dashboard - the panel's destinations, the server form, and the record editors
- Troubleshooting - diagnostics, issue reporting, common problems, privacy, uninstall cleanup, migration notes
- Development - building from source and the local Docker test stack
Development
git clone https://github.com/Vivswan/litellm-vscode-chat
cd litellm-vscode-chat
bun install
bun run compile
Press F5 to launch the Extension Development Host. Development covers the local LiteLLM stack and the test suites; CONTRIBUTING.md covers how to submit a change.
Privacy
Your prompts and completions travel only between VS Code and the LiteLLM servers you configure. A chat turn goes wherever the model the chat picker names goes: a built-in Copilot model unless you selected one of yours.
| Feature |
What is sent |
To |
When |
| Chat |
your prompt, attachments, tool definitions |
the model the chat picker names |
each turn |
| Inline completions |
the file content around your cursor |
the server behind inlineCompletions.model |
automatically as you type; ships off and needs an explicit model |
| Commit message generation |
the staged or working-tree diff, untracked file names, your last five commit subjects |
the server behind commitGeneration.model |
on your invocation only |
| Quick fixes |
the diagnostic messages and the surrounding code |
the chat picker's model, or quickFix.model when the chat view cannot answer |
when you pick Fix or Explain |
Requests to your LiteLLM servers count toward the same usage tracking and budget alerts as chat. Turns that go to a built-in Copilot model do not.
One default-on exception, the model catalog refresh:
- About once a week the extension fetches
https://openrouter.ai/api/v1/models, a public, unauthenticated model list. The request carries no prompts, no usage, and nothing about you or your servers.
- Set
litellm-vscode-chat.models.openRouterCatalog to false to turn the refresh and the automatic matching off. Explicit _openrouter_model directives keep working offline from the bundled snapshot.
Details in Model capabilities and Privacy and data.
Acknowledgments
This extension is better because people took the time to report what broke and build what was missing. Contributors are credited in ACKNOWLEDGMENTS.md; commits landing community code carry co-author trailers, and commits resolving community reports credit the reporter in the subject, which release-please carries into the changelog.
Resources
| |