MindsHub in VS Code
VS Code's chat can talk to Chat Completions-compatible endpoints, MindsHub included, through Copilot's Custom Endpoint provider. MindsHub models appear in the model picker alongside the built-in ones. Copilot Chat is the only extension you need, and bring-your-own-key models work without a paid Copilot plan.
Prerequisites
- VS Code 1.128 or newer. The Custom Endpoint provider shipped in 1.122; per-model
modelOptions, which Kimi K3 needs, arrived in 1.128. Check under Code → About (macOS) or Help → About.code --versionalso works, but only after installing the shell command (Command Palette: "Shell Command: Install 'code' command in PATH"). - The GitHub Copilot Chat extension. (Business and Enterprise organizations can disable BYOK by policy.)
- A MindsHub API key from the console. Create a dedicated key for VS Code so it's easy to revoke: it will live in a config file, not a secret store.
Check your key first
Before touching VS Code, confirm the key and endpoint work:
curl https://api.mindshub.ai/v1/chat/completions \
-H "Authorization: Bearer $MINDSHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "kimi", "messages": [{"role": "user", "content": "say OK"}], "stream": true}'
A stream of data: lines means you're ready. A 401 means authentication failed. Fix that before configuring the editor, or you'll be debugging two things at once.
Add the model
-
Open the Chat view, click the model picker, and choose Manage Language Models, or run "Chat: Manage Language Models" from the Command Palette.
-
Choose Add Models, then Custom Endpoint.
-
Enter a group name (
MindsHub), a display name, and your API key, and pick Chat Completions as the API type. The key is written into the config file as plain text (see Key handling). -
VS Code opens
chatLanguageModels.jsonwith the provider fields already filled in from step 3 (the groupname,vendor,apiKey, andapiType). Add amodelsentry and save:[{"name": "MindsHub","vendor": "customendpoint","apiKey": "mdb_your_key_here","apiType": "chat-completions","models": [{"id": "kimi","name": "Kimi K3 (MindsHub)","url": "https://api.mindshub.ai/v1/chat/completions","toolCalling": true,"vision": false,"contextWindow": 200000,"maxOutputTokens": 16000,"modelOptions": {"temperature": 1}}]}] -
Pick your model from the chat model picker and send a message.
Important model-entry fields:
idis the catalog alias sent as themodelfield:kimi,gpt-mini,gemini-flash,sonnet. Not a provider model ID.urlis the endpoint VS Code posts to. Use the full path ending/v1/chat/completions; a bare/v1returns404 {"detail":"Not Found"}.modelOptionsmerges extra parameters into every request (VS Code 1.128+). Kimi requires it: VS Code otherwise sendstemperature: 0.1, which Kimi rejects with a 400."temperature": 1makes Kimi work. Most other catalog models accept the default and don't need this block.toolCallingmust betruefor the model to appear in agent mode.vision: truelikewise gates image attachments.contextWindowandmaxOutputTokensare budgets VS Code plans against, not values read from the API. WithoutcontextWindow, VS Code treatsmaxInputTokens + maxOutputTokensas the window, so set the window explicitly. The 200,000 example is conservative for every current catalog model; raise it to your model's real window for longer sessions.
Each entry in the models array appears separately in the picker. The top-level name groups them; each model's own name is its label.
Set a default model
To make a MindsHub model the default for new chats, add this to settings.json. The value is the model's id:
{
"chat.defaultModel": "kimi"
}
Skipping the wizard
The wizard writes chatLanguageModels.json, and you can write that file yourself and restart VS Code. In a Stable install with the default profile it lives beside settings.json:
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/Code/User/chatLanguageModels.json |
| Linux | ~/.config/Code/User/chatLanguageModels.json |
| Windows | %APPDATA%\Code\User\chatLanguageModels.json |
Profiles, Insiders, and portable installs use different roots. When in doubt, let Manage Language Models open the right file for you.
Key handling
apiKey holds the literal key, and VS Code sends whatever string is there as the bearer token. Use a dedicated, revocable key, and keep the file out of commits, Settings Sync, backups, and screenshots.
VS Code's documentation recommends an input variable ("apiKey": "${input:myApiKey}") so the key lives in secret storage instead. On VS Code 1.131.0 with Copilot Chat 0.59.0 that placeholder was passed through unexpanded, producing an empty bearer token and a 401 on every request. Treat the literal key as the working approach for now and retest the input variable on later versions.
Scope and limits
- Chat and agent mode both work, including tool calling on models that declare it. BYOK models can also serve VS Code's configurable utility tasks; inline code completions, semantic search, and embeddings still require GitHub Copilot.
- Copilot sends
temperature: 0.1unless the model entry overrides it viamodelOptions. - Per-request token counts don't reach VS Code. Streamed chat completions currently carry no usage data for most models, and VS Code's context meter is a local estimate either way. Your usage summary is what bills.
- Costs land in MindsHub. VS Code shows no cost for custom endpoints.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| Model missing from the picker | VS Code reads chatLanguageModels.json at startup. Restart it, then confirm "vendor": "customendpoint" and valid JSON. On VS Code older than 1.122 the file is ignored entirely; check the version in the About dialog. |
| Model missing in agent mode only | Add "toolCalling": true to that model and restart. |
400 invalid temperature | The model rejects VS Code's default temperature: 0.1. Add "modelOptions": {"temperature": 1} to the model entry (VS Code 1.128+). |
404 with model_not_found | id isn't a catalog alias. Check GET /v1/models. |
404 with {"detail":"Not Found"} | url doesn't end in /v1/chat/completions. |
401 | Authentication failed: the key is wrong, revoked, or apiKey still holds an unexpanded ${input:...} placeholder. |
Verified with VS Code 1.131.0 and Copilot Chat 0.59.0 in July 2026: models loaded from a hand-written config, Kimi K3 round trip with modelOptions temperature, and streamed responses in the chat view.