Setting up VS Code¶
VS Code reaches Nexus through the built-in custom endpoint in Language Models. No separate Nexus extension is required. Pick one protocol and do not mix Chat, Responses, and Messages fields in the same entry.
The shared order is on Client setup.
Values¶
| Protocol | Base URL | Route the client builds |
|---|---|---|
| OpenAI Responses | https://api.nexus-hub.tech/v1 |
POST /v1/responses |
| OpenAI Chat | https://api.nexus-hub.tech/v1 |
POST /v1/chat/completions |
| Anthropic Messages | https://api.nexus-hub.tech |
POST /v1/messages |
Agents need tool calling on the selected model. Confirm that on Models and prices before you enable it.
Steps¶
- Open Chat → model picker → Manage Language Models.
- Select Add Models → Custom Endpoint.
- Enter a group name, the Nexus key through an input variable, and the API type.
- Use the base URL from the table for that API type. Do not paste the full operation path into the URL field.
- In
chatLanguageModels.json, setidto a model fromGET /v1/modelsand save the file.
VS Code can discover models when a base URL is set. The example lists the model explicitly.
Config file¶
Responses example. ${input:nexusApiKey} keeps the key out of the repository.
maxInputTokens is 1050000. That is the declared window for every model
currently available in Nexus. The same number is on
Models and prices.
[
{
"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.tech/v1",
"toolCalling": true,
"maxInputTokens": 1050000,
"maxOutputTokens": 4096
}
]
}
]
For Anthropic Messages, change apiType to messages and url to
https://api.nexus-hub.tech. Do not append /v1/messages. VS Code adds the
path from the API type. For Chat Completions, keep the /v1 base and set
apiType to the Chat Completions value the editor offers.
Check¶
Select the model in chat and send a short message. A normal reply means the connection works.
If it does not work¶
401orinvalid_key: enter the key again through the input variable. Do not put it in a shared workspace file.model_not_foundormodel_not_allowed: queryGET /v1/modelsand use the exact id.unsupported_model: the id is not allowed on this API type. Switch the type or the id.- The agent does not list the model: tool calling is off, or the catalog does not allow tools for that id.
404: the base URL andapiTypedo not match the table.
Send support the route, error code, time, x-request-id, and the VS Code version. Do not send the key or a full prompt.
Official reference: AI language models in VS Code.