Bring Claude into GitHub Copilot
GitHub Copilot now lets you bring your own model, so you are not locked to whatever is on the built-in list. Pointing it at the AI Prime Tech gateway means the same VS Code workflow can reach Claude alongside every other model the gateway serves, all behind one endpoint and one key.
Open the BYOK flow
Copilot's bring-your-own-key path lives in the model picker. Open it, choose Manage Language Models, then Add Models, and select Custom Endpoint. That entry replaced the older OpenAI Compatible option, which is why guides written a few months ago point you somewhere that no longer exists.
Custom Endpoint is the right door for a gateway because it lets you describe each model precisely rather than assuming a single fixed provider shape. You will add one entry per Claude model you want to surface in the picker.
Treat the picker as a per-model registry rather than a single provider switch. Each Claude model you register becomes its own selectable entry, which is what lets the gateway expose Sonnet for routine turns and Opus for the heavy ones side by side. Because the gateway is the one endpoint behind all of them, you manage models in Copilot while billing, routing, and rate limits stay consistent upstream. Documenting each entry's URL and id in a comment near your settings also helps the next person who maintains the editor configuration.
Choose the Messages API type
For each model Copilot asks which API type to speak: Chat Completions, Responses, or Messages. Because the AI Prime Tech gateway exposes Claude over the native Anthropic Messages surface, pick Messages and point the URL at the full endpoint, /v1/messages, rather than a host root.
Selecting the wrong API type is the most common reason a freshly added model returns errors on first use. The type has to match the wire format the gateway actually serves for that model, so Messages pairs with the /v1/messages path.
If your gateway also fronts non-Claude models over a Chat Completions surface, you can register those as separate entries with that type, all under the same host. Keeping each entry's API type aligned with the path it points at is the discipline that makes a multi-model gateway behave predictably inside Copilot. When in doubt, the API type the gateway documents for a given model is the one to trust over any default Copilot suggests.
Fill in the per-model fields
Each entry takes a URL, a model id, and token limits. The id is the exact name the gateway serves, such as claude-sonnet-4-5 for everyday work or claude-opus-4-8 for the heaviest reasoning, with no vendor prefix in front of it.
Set maxInput and maxOutput so that their sum stays at or below the model's context window. If you overstate them Copilot may build a request the gateway rejects, and the failure surfaces as a vague error rather than a clear size message.
It pays to look up the real context window for the specific Claude model before filling these in, rather than copying numbers from another entry. A model with a larger window can carry more file context per request, and sizing maxInput to match is what lets Copilot send enough of your codebase for the answer to be grounded in it. Reviewing these numbers again after a model is upgraded is worth the minute, since context windows do change between releases.
Enable agent mode safely
Copilot's agent mode drives tools, so any model you expose there must support tool calling end to end. The gateway forwards Claude's tool calls, which is what makes agent mode usable, but a model entry that cannot do tool calls will quietly fail the moment the agent tries to act.
Keep a chat-only fallback model in the list too. That way if you are only asking questions you can stay on a lighter configuration and reserve the agent-capable entry for tasks that genuinely edit files.
When you first switch a Claude entry into agent mode, give it a small, self-contained task and watch the tool calls go through before trusting it with anything larger. That dry run confirms the whole chain end to end, from Copilot building the tool call to the gateway forwarding it and Claude acting on the result. Treat the first successful agent edit as your acceptance test before wiring the model into any larger workflow.
When the model will not appear
The single most reported snag is a newly added model not showing in the picker. The fix is almost always to restart VS Code; the picker caches its list and does not always refresh after you save a Custom Endpoint.
If it still refuses, recheck the API type against the URL path and confirm the key is valid against the gateway directly. Some Copilot features also expect a signed-in GitHub account, so a partial sign-in can mask an otherwise correct configuration.
A quick way to isolate the problem is to test the same URL, key, and model id with a plain request outside Copilot. If that succeeds, the issue is on the editor side and a restart or a re-save of the entry resolves it; if it fails, you have narrowed it to the gateway configuration rather than chasing it through Copilot's UI. Keeping the gateway as the single source of truth for models means a fix applied upstream reaches every editor at once.
// VS Code -> model picker -> Manage Language Models -> Add Models
// -> Custom Endpoint (NOT the deprecated OpenAI Compatible)
// API type: Messages
// URL: https://aiprimetech.io/v1/messages
// Model id: claude-sonnet-4-5
// API key: <your gateway key>
// maxInput + maxOutput must be <= the model context window
// Restart VS Code if the model does not appear in the picker.
Frequently asked questions
How do I add Claude to GitHub Copilot?
Open the model picker, choose Manage Language Models, Add Models, then Custom Endpoint. Set API type Messages, URL {SITE}/v1/messages, and the Claude model id.
Why is my added model missing from the picker?
The picker caches its list. Restart VS Code; the model almost always appears afterwards. Also confirm the API type matches the URL path.
Does Copilot agent mode work with Claude here?
Yes, as long as the model supports tool calling. The gateway forwards Claude's tool calls, which is what agent mode needs.
What about the OpenAI Compatible option?
It was deprecated in favour of Custom Endpoint. Use Custom Endpoint with the Messages type for the native Anthropic surface.
Get an API key — no Anthropic account or waitlist required.
Get your API keyAI Prime Tech is an independent API gateway. It is not affiliated with, endorsed by, or a reseller of Anthropic. Claude and related model names are trademarks of their respective owners.