🚀 LiteLLM Connector for GitHub Copilot Chat

Bring any LiteLLM-supported model into the Copilot Chat model picker — OpenAI, Anthropic (Claude), Google, Mistral, local Llama, and more.
If LiteLLM can talk to it, Copilot can use it.
⭐️ Support the project
If you find this useful, please:
Want to support development?
🚨 Troubleshooting: Connection Issues 🚨
If the extension fails to connect or models don't show up:
- Manual Setup: Run
Manage LiteLLM Provider from the Command Palette (Ctrl+Shift+P). This often fixes setup "hiccups".
- Verify: Run
LiteLLM: Check Connection to test your settings.
- Reset: If things are totally stuck, run
LiteLLM: Reset All Configuration. This is the "nuke" option to clear all state.
- Note: Reinstalling usually won't help as settings are stored securely in VS Code. Use the Reset command instead.
✅ Requirements
- 🔑 GitHub Copilot subscription (Free plan works)
- 🌐 A LiteLLM proxy URL (and an API key if your proxy requires one)
⚡ Quick Start (60 seconds)
- Install GitHub Copilot Chat
- Install LiteLLM Connector for Copilot
- Open Command Palette:
Ctrl+Shift+P / Cmd+Shift+P
- Run: Manage LiteLLM Provider
- Enter:
- Base URL (example:
http://localhost:4000)
- API Key (optional)
- Open Copilot Chat → pick a model under LiteLLM → chat
✨ What you get
- 🌍 Hundreds of models via your LiteLLM proxy
- 🌊 Real-time streaming responses
- 🛠️ Tool / function calling support
- 👁️ Vision models supported (where available)
- 🧠 Smart parameter handling for model quirks
- 🔁 Automatic retry when a model rejects unsupported flags
- 📊 Token tracking & usage monitoring for input/output tokens
- ✍️ Git commit generation from staged changes in the SCM view
- 🔍 Connection diagnostics to verify proxy configuration
- ⏱️ Inactivity watchdog to prevent stuck streams
- 🚫🧠 Cache bypass controls (
no-cache headers) with provider-aware behavior
- 🔐 Secure credential storage using VS Code
SecretStorage
- ⌨️ Optional inline completions via VS Code’s stable inline completion API
🆕 Recent Highlights
- ✍️ Git Commit Message Generation (generate messages from staged changes directly in the SCM view)
- 📊 Enhanced Token Awareness (real-time token counting and context window display in model tooltips)
- 🔍 Connection Diagnostics (new
Check Connection command to validate proxy settings)
- 🚀 VS Code 1.109+ settings modernization (aligns with the Language Model provider settings UI)
- 🧱 Tool-call compatibility hardening (normalizes tool call IDs to OpenAI-compatible limits)
- 🧰 Stability Improvements (hardened JSON parsing and stream error recovery)
- 📦 Smaller, faster package (bundled/minified production builds)
⚙️ Configuration
litellm-connector.inactivityTimeout (number, default: 60)
- Seconds of inactivity before the LiteLLM connection is considered idle.
litellm-connector.disableCaching (boolean, default: true)
- Sends
no-cache: true and Cache-Control: no-cache to bypass LiteLLM caching.
⌨️ Commands
- Manage LiteLLM Provider: Configure Base URL + API Key; refreshes models.
- LiteLLM: Check Connection: Verify proxy URL and API key configuration.
- LiteLLM: Select Inline Completion Model: Choose a model for inline completions.
- LiteLLM: Select Commit Message Model: Choose a model for git commit generation.
🐛 Bug reports & feature requests
Please use GitHub Issues: https://github.com/gethnet/litellm-connector-copilot/issues
Including VS Code version, extension version, model id, and LiteLLM proxy details/logs (if possible) helps reproduce issues quickly.
🧩 Notes
- This extension is a provider for the official Copilot Chat experience.
- It won’t function without the GitHub Copilot Chat extension installed.
🆘 Support