GitHub Copilot in VS Code: setup and connecting your own models
Enable GitHub Copilot in VS Code, then connect your own models through Custom Endpoint with an API key, and see what works without a subscription.
6 min · · IDE · development
If you are looking for how to enable GitHub Copilot in VS Code, it takes two steps: sign in to GitHub and pick a model in chat. If you want your own model by API key, VS Code has a separate mechanism for it, and it works even without a Copilot subscription. Below are both setups in order, a ready config for the Zukko gateway and an honest list of limits.
Menu and setting names come from the VS Code documentation as of October 18, 2026. They may differ in your editor version, so check VS Code's own help.
How to enable GitHub Copilot in VS Code
Copilot is built into VS Code, and you do not need a separate extension for the main features. The steps from the documentation:
- Update VS Code to the current version.
- Hover over the Copilot icon in the status bar and choose Use AI Features.
- Choose a sign-in method and follow the prompts.
- If your account already has a Copilot plan, the editor uses it. If there is no plan, signing in enrolls an eligible account in the free Copilot Free plan with limited usage.
Next open the chat panel and pick a model in the input box list. Plan terms, limits and prices change, so see the current plan on GitHub's site: we do not quote them here.
What signing in with a plan gives you: a monthly AI credit allowance, premium models in chat, inline suggestions in the editor, semantic code search and code review. All of it depends on your plan and your organization's policies.
Can you connect your own models
Yes. In the VS Code documentation this mechanism is called Bring Your Own Key (BYOK): you connect a model from any compatible provider and use it in the same VS Code chat. Important consequences, straight from the documentation:
- BYOK models work without signing in to GitHub and without a Copilot plan;
- BYOK covers chat and utility tasks, while inline suggestions (completion as you type), semantic search and embedding-based features still require the GitHub Copilot service;
- for agent mode the model must support tool calling, otherwise it will not appear in the list;
- on Copilot Business and Enterprise plans an organization administrator can switch BYOK off by policy.
For third-party providers there are three paths: ready-made providers (Azure, Anthropic, Gemini, OpenAI and others), Marketplace extensions, and Custom Endpoint for any compatible address. We need the third.
Connect the gateway through Custom Endpoint
Custom Endpoint accepts addresses that speak Chat Completions, Responses or Anthropic Messages. It suits gateways, so Zukko connects without extra extensions.
Steps:
- Create a
fetch_...key on the API keys page and top up the balance. - In the chat window open the gear in the model picker (Manage Language Models) or run Chat: Manage Language Models from the Command Palette.
- Click Add Models and choose Custom Endpoint.
- Enter a group name, a name and the key, and choose the API type.
- VS Code opens the
chatLanguageModels.jsonfile: check the model parameters and save.
An example configuration for the OpenAI format (Chat Completions):
[
{
"name": "Zukko",
"vendor": "customendpoint",
"apiKey": "${input:zukkoApiKey}",
"apiType": "chat-completions",
"models": [
{
"id": "claude-sonnet-5-5",
"name": "Claude Sonnet 5.5 (Zukko)",
"url": "https://api.zukko.pro/v1/chat/completions",
"toolCalling": true,
"vision": true,
"contextWindow": 1000000,What matters here:
urlis given in full, including the/chat/completionspath: the VS Code documentation advises this so you do not have to guess how the address is completed;idis the model identifier fromGET /v1/models;- enable
visiononly where the model accepts images (in Zukko's tableclaude-sonnet-5-5takes image input anddeepseek-v4.1-flashdoes not); - it is better to keep the key through
${input:...}than to write it into the file in plain text; - choose
contextWindowandmaxOutputTokensfor your tasks: these are limits on the editor side.
For Claude it makes sense to choose the Messages API type. Under the gateway's rules the cache discount for Claude comes with the Anthropic format: there the gateway sees how much input came from cache. The config:
[
{
"name": "Zukko Claude",
"vendor": "customendpoint",
"apiKey": "${input:zukkoApiKey}",
"apiType": "messages",
"models": [
{
"id": "claude-sonnet-5-5",
"name": "Claude Sonnet 5.5 (Messages)",
"url": "https://api.zukko.pro/v1/messages",
"toolCalling": true,
"vision": true,
"contextWindow": 1000000,
"maxOutputTokens": 32000
}
]
}
]For the Messages type the editor sends the key in the x-api-key header by default, and the gateway accepts it. If the new model does not appear in the list, restart VS Code. More on choosing a format: Anthropic or OpenAI.
What it costs
Zukko prices as of October 18, 2026 (per 1M tokens, input / output): claude-sonnet-5-5 is $0.4 / $2, deepseek-v4.1-flash is $0.013 / $0.038. A chat conversation of 20 requests of 4000 input and 600 output tokens (no cache):
- Sonnet 5.5: input 20 × 4000 = 0.08M × 0.4 = $0.032, output 20 × 600 = 0.012M × 2 = $0.024, total $0.056;
- DeepSeek V4.1 Flash: 0.08 × 0.013 = $0.00104, 0.012 × 0.038 = $0.000456, total about $0.0015.
In agent mode there are many more requests and tokens because the context is sent at every step, so that spend is worth calculating from your own sessions. The key limits in the dashboard (daily and monthly, in dollars) protect against surprises.
When an extension is simpler
Custom Endpoint is built into the editor, but if you want an agent that works with your own key from the start, look at the Cline and Kilo Code extensions (Roo Code, per its official documentation, was shut down on May 15, 2026, and we do not recommend it for new installs). They connect just as simply: provider type, Base URL and key. The instructions for each are on the VS Code extensions page. In an extension with an OpenAI-compatible provider the address takes /v1, for the Anthropic provider (in Cline, for example) it does not.
| Copilot (BYOK) | Cline / Kilo Code | |
|---|---|---|
| GitHub sign-in | not needed for BYOK chat | not needed |
| Inline suggestions | through the Copilot service | a separate feature, each has its own |
| Own key | via Custom Endpoint | the main scenario |
| Setup | chatLanguageModels.json | a form in the extension settings |
A general overview of options is in VS Code extensions for working with AI, and a comparison of Copilot with a terminal agent is in GitHub Copilot vs Claude Code.
FAQ
Does GitHub Copilot have a separate API key?
Copilot itself has no key: you sign in with a GitHub account and the plan determines access. The word "key" in the VS Code context refers to BYOK, that is, a third-party provider's key such as a Zukko fetch_... key.
Does chat with my key work without a Copilot subscription?
According to the VS Code documentation, yes: BYOK models work without GitHub sign-in and without a plan. But inline suggestions, semantic search and embedding-based features remain with the Copilot service.
Why is my model not in the list?
For agent mode the model must support tool calling (toolCalling). Also check that the JSON in chatLanguageModels.json is valid and restart VS Code. In an organization, BYOK may have been switched off by an administrator.
Which address do I use for Zukko?
For Chat Completions, https://api.zukko.pro/v1/chat/completions; for Messages, https://api.zukko.pro/v1/messages. Addresses are given in full, with the path.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- A neural network for Lua and Roblox: writing Luau scripts with AIWithout guidance a model may confuse Lua with Luau and suggest outdated Roblox APIs. How to phrase the task, check the code and connect an agent to your project.
- How to connect Qwen to VS Code: Companion, Cline and ContinueTwo ways to get Qwen in your editor: the official Companion for Qwen Code, or the Cline, Kilo Code and Continue extensions with an OpenAI-compatible key.
- Claude Code in JetBrains: IntelliJ IDEA and PyCharm on Your Own KeyThe plugin does not bundle Claude Code. It launches the console agent in the IDE terminal. Install, gateway key, diffs and common failures explained.
- Cursor for 1C: writing BSL code with an AI agentHow to open a 1C configuration dump in Cursor, write rules for BSL, give the agent metadata and avoid accepting invented code. With a session cost estimate.