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)
- A dashboard panel for servers, models, and settings, with plain VS Code settings behind it
- Settings export and import: move servers, model records, and (on explicit choice) stored secrets to another machine, with a one-command undo (details)
- Self-hosted or cloud-based deployment options
Requirements
- VS Code 1.129.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, with one boundary worth naming: anything sent as a chat turn goes wherever the model the chat picker names goes, which is a built-in Copilot model unless you selected one of yours.
- Inline completions. When inline completions are enabled, the file content around your cursor is sent to the LiteLLM server you configured for them automatically as you type - the same trust boundary as chat, but without a per-request action from you, which is why the feature ships off and takes an explicit model.
- Commit message generation. When you invoke commit message generation, the staged or working-tree diff, the names of untracked files, and your last five commit subjects are sent to the LiteLLM server you configured for it - on your explicit invocation only, and covered by the same usage tracking and budget alerts as chat.
- Quick fixes. When you pick Fix or Explain from a quick-fix lightbulb, the diagnostic messages and the lines they sit on are sent as an ordinary chat turn to whichever model the chat picker names - one of your LiteLLM models if you selected one, a built-in Copilot model otherwise, exactly as any chat turn goes where that model goes - or, when the chat view cannot answer, to the server behind
quickFix.model.
One default-on exception: about once a week the extension refreshes its bundled catalog of model capabilities from 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
| |