Upfront: we're posting from a company account (we run an AI inference platform), but this isn't about our product - it's a native VS Code feature that works with any provider, and we kept getting asked about it, so here's the full walkthrough.
VS Code's built-in Chat can use any model provider that has an OpenAI-compatible Chat Completions API. No third-party extension, no proxy hacks. If you have a base URL and an API key, you're 2 minutes away.
Works with basically everything - Ollama or vLLM running locally, Qubrid, Any Open AI Compliant Inference provider, your company's internal gateway, whatever. If it speaks /v1/chat/completions, it works.
Setup:
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
Run Chat: Manage Language Models
Click + Add Models -> Custom Endpoint
Give the group a name (e.g. your provider's name)
Paste your API key when prompted
Select Chat Completions API as the API type
VS Code opens a chatLanguageModels.json - add your model(s):
[
{
"name": "My Provider",
"vendor": "customendpoint",
"apiKey": "${input:chat.lm.secret.xxxxxxx}",
"apiType": "chat-completions",
"models": [
{
"id": "your-model-id-here",
"name": "Any name you like",
"url": "https://your-provider.com/v1",
"toolCalling": true,
"vision": false,
"maxInputTokens": 128000,
"maxOutputTokens": 16000
}
]
}
]
Last Step: Save. Your models show up under Other Models in the chat model picker.
Gotchas that cost us time:
Don't change "vendor": "customendpoint". Rename anything else you want, but if you touch this the model silently never appears in the picker. This one trips up almost everyone.
The id has to exactly match your provider's model ID, case-sensitive, including the org prefix like meta-llama/....
The url is the base URL ending in /v1 - don't append /chat/completions, VS Code adds it.
Set toolCalling/vision to match what the model actually supports, or agent mode gets weird.
You can stack multiple models (and multiple providers) in the same file and hot-swap from the picker.
For local Ollama: http://localhost:11434/v1 with any random string as the API key.
Why bother? Model choice, mostly. You can run open models (GLM, Kimi, MiniMax, DeepSeek, Qwen, Llama, etc.) inside the editor you're already in, point at cheap serverless inference or your own GPU box, and stop alt-tabbing to a chat UI to paste code back and forth.
To be clear, nothing above requires our platform or anyone else's - point it at localhost and it's fully offline. We just think more people should know VS Code can do this. Happy to answer setup questions in the comments.
Curious what everyone's running in VS Code these days - anyone fully local?