GitHub Copilot Chat
Add Nebul models to GitHub Copilot Chat in VS Code with the Custom Endpoint provider.
GitHub Copilot Chat is the chat experience built into VS Code. Its Custom Endpoint provider connects any OpenAI-, Responses-, or Anthropic-compatible API, so you can put Nebul models into the Copilot model picker and use them for chat and agent sessions with your own API key.
Prerequisites
- Visual Studio Code with GitHub Copilot Chat
- A Nebul AI Studio account with API access
- An API key for your active project
- A model ID from the Model Catalog
Add Nebul as a custom endpoint
- Open the model picker in the Chat view and select the gear icon (Manage Language Models), or run Chat: Manage Language Models from the Command Palette.
- Select Add Models, then select Custom Endpoint from the provider list.
- Enter a group name, such as
Nebul. This is the label shown in the model picker. - Enter a display name and your Nebul API key. The key is stored in VS Code's secret storage.
- Select the API type: Chat Completions, Responses, or Messages. Any of the three works with Nebul; Chat Completions is the usual choice.
- VS Code opens a
chatLanguageModels.jsonfile. Replace its contents with your model entry and save:
[
{
"name": "Nebul",
"vendor": "customendpoint",
"apiKey": "${input:nebulApiKey}",
"apiType": "chat-completions",
"models": [
{
"id": "zai-org/GLM-5.3",
"name": "GLM 5.3",
"url": "https://api.inference.nebul.io/v1/chat/completions",
"toolCalling": true,
"maxInputTokens": 1048576,
"maxOutputTokens": 16384
}
]
}
]Field notes:
vendormust becustomendpoint.apiTypesets the protocol:chat-completions,responses, ormessages. For the Anthropic-style Messages API, usehttps://api.inference.nebul.io/v1/messagesas the model URL; VS Code then authenticates with anx-api-keyheader, which Nebul accepts. See Messages API.- The
urlshould be the full endpoint URL, including the API path, as shown. If you omit the path, VS Code inserts/v1and the path for the model's API type. toolCalling: trueis required for the model to appear in agent mode. Pick a model withsupports_function_callingin the catalog.maxInputTokensandmaxOutputTokenscome from/v1/model/info. You can setcontextWindowinstead ofmaxInputTokens, and VS Code derives it.
If the model does not appear in the picker immediately, restart VS Code.
Community extension alternative
The OAI Compatible Provider for Copilot extension offers the same idea with per-model settings in settings.json instead of chatLanguageModels.json, including per-model base URLs and request parameters.
Run it
Open the Chat view, pick the Nebul model from the model picker, and send a message. Requests go from VS Code directly to api.inference.nebul.io with your key. Usage appears under the API key's project in AI Studio.
Agent mode needs the model's tool calling, which is why toolCalling: true matters above. For tool-calling request shapes, see Function Calling & Tools.
Troubleshooting
- Model missing from the picker: restart VS Code, and confirm
toolCalling: trueon the model entry. Models without tool calling are hidden from agents. - 401 responses: the stored API key is wrong or revoked. Update it in the Language Models editor with the gear icon next to the provider.
- 404 responses: check the model
url. It must behttps://api.inference.nebul.io/v1/chat/completions(or the/v1/messagesequivalent for the Messages API type). - Model not found: use the exact model ID from the Model Catalog. Only models enabled for your project work.
- Copilot Business or Enterprise policies: an administrator can disable bring-your-own-key. If Custom Endpoint is missing, ask your admin to allow the Bring Your Own Language Model Key in VS Code policy.
Data and telemetry
With a custom endpoint, chat requests go to Nebul, not to GitHub's model providers. Some features still require a GitHub account and work as usual: inline suggestions, semantic search, and anything built on embeddings.
VS Code itself sends telemetry to Microsoft unless you turn it off. In settings.json:
{
"telemetry.telemetryLevel": "off"
}For how Nebul treats the requests it receives, see Privacy & Security.