VS Code¶
VS Code supports an arbitrary HTTP endpoint through the built-in Custom Endpoint entry in Language Models. This covers chat and agent features; agents require tool calling for the selected model.
This is a built-in VS Code feature; no separate Nexus extension is needed. Choose one API type and do not mix Chat Completions, Responses, and Messages fields.
Configure through the UI¶
- Open Chat → model picker → Manage Language Models.
- Select Add Models → Custom Endpoint.
- Enter a group name, an API key through an input variable, and the API type.
- For Nexus, use one of:
- Responses —
https://api.nexus-hub.ru/v1; - Chat Completions —
https://api.nexus-hub.ru/v1; - Messages —
https://api.nexus-hub.ru. - In
chatLanguageModels.json, use a model fromGET /v1/modelsand save the file.
VS Code can discover models when a base URL is set on the entry. The example
below intentionally lists the model explicitly in the models array.
chatLanguageModels.json example¶
Responses example. ${input:nexusApiKey} keeps a real key out of the repository:
[
{
"name": "Nexus",
"vendor": "customendpoint",
"apiKey": "${input:nexusApiKey}",
"apiType": "responses",
"models": [
{
"id": "MODEL_FROM_V1_MODELS",
"name": "MODEL_FROM_V1_MODELS",
"url": "https://api.nexus-hub.ru/v1",
"toolCalling": true,
"maxInputTokens": 128000,
"maxOutputTokens": 4096
}
]
}
]
For Anthropic Messages, change apiType to messages, use
https://api.nexus-hub.ru, and select a Claude model from the catalog. Do not
append /v1/messages to the base URL; VS Code adds the path from the API type.
Troubleshooting¶
401: re-enter the key through the input variable; do not put it in a shared workspace file.- Missing model: query
GET /v1/modelsand use the exact ID. - Agent does not list the model: check that tool calling is enabled for it.
- Protocol error: check the
apiTypeand base URL pair. - Send support the
x-request-id, error code, and VS Code version, never the key or a full prompt.
Official reference: AI language models in VS Code.