Connect GitHub Copilot to the private Morse API: set it up, pick a model, and check it works. Updated November 30, 2026.

Page: https://trymorse.ai/inference/docs/tools/github-copilot

# Use GitHub Copilot with a private API

Give [GitHub Copilot](https://code.visualstudio.com/docs/copilot/customization/language-models) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API.

## Before you start

Make a key for GitHub Copilot alone, with a spend limit, under **API keys** in the [console](https://console.trymorse.ai). Then one tool can't spend all your credits. See [Limit a key](https://trymorse.ai/inference/docs/authentication#limits).

You'll paste the key into VS Code when it asks. It keeps the key in its secret storage, not in a file.

## Set up GitHub Copilot

1. Add Morse as a custom endpointCopilot Chat in VS Code takes your own key on any Copilot plan. In VS Code, run **Chat: Manage Language Models** from the command palette. Then:Choose **Add Models**, then **Custom Endpoint**.Name the group Morse.Paste your key when VS Code asks for it.Set **API Type** to **Chat Completions**.
2. Add a modelVS Code then opens `chatLanguageModels.json`, with the Morse group in it. Add this to the group's `models` list, and save:chatLanguageModels.json`{ "id": "qwen/qwen3-coder", "name": "Qwen3 Coder 480B A35B (Morse)", "url": "https://inference.trymorse.ai/v1", "toolCalling": true, "vision": false, "contextWindow": 262144, "maxOutputTokens": 32768 }``url` is the base URL: VS Code adds `/chat/completions` itself. Keep `toolCalling` on, or the model doesn't show in Agent mode. To add another model from the table below, add another entry with its id.
3. Pick the modelIn the chat's model picker, choose **Qwen3 Coder 480B A35B (Morse)**. Ask, Agent, and Plan all use it. Inline suggestions still come from Copilot's own models.

## Install the Morse plugin

Install [Morse Provider for GitHub Copilot Chat](https://marketplace.visualstudio.com/items?itemName=trymorse.morse-vscode-chat) from the VS Code Marketplace in place of the custom endpoint above. Its publisher is Morse Inference, and it needs VS Code 1.104.0 or newer.

Then open the chat's model picker, choose **Manage Models**, and pick **Morse**. Paste your key when VS Code asks for it. Its source is on [GitHub](https://github.com/trymorse/morse-vscode-chat).

## Which model to pick

| Model | Context | Input / output | Why |
| --- | --- | --- | --- |
| `qwen/qwen3-coder` | 262.1K | $0.375 / $1.25 | Qwen's coding model. It doesn't reason, so it starts writing sooner. |
| `moonshotai/kimi-k3.1-pro` | 1M | $2 / $10 | Reasons, and reads images. |
| `z-ai/glm-5.3` | 1M | $1.40 / $4.40 | Reasons, and takes tools at TEE too. |
| `deepseek/deepseek-v4-pro-0813` | 1M | $1.32 / $3.96 | Reasons, at a lower price. |
| `z-ai/glm-5.3-flash` | 1M | $0.15 / $0.50 | Cheap and fast for small edits, and takes tools at TEE too. |

Prices are in dollars per million tokens, on each model's default endpoint. Every model is on the [models page](https://trymorse.ai/inference/models).

## Check it works

In Agent mode, ask Copilot to list the files in your folder. It calls a tool to read them, so an answer shows that Morse took both the request and its tools.

## Keep it private

Set a privacy floor on GitHub Copilot's key to hold it to a tier, such as TEE. Without a floor, a request runs on its model's default privacy tier. The floor only decides which endpoints serve the requests. See [Privacy tiers](https://trymorse.ai/inference/docs/privacy-tiers) and [Provider routing](https://trymorse.ai/inference/docs/provider-routing).

On a plain API call, TLS ends inside Morse's door, an attested enclave, which seals the request before the relay receives it. A plain client checks the door's certificate, not its attestation. To check the attestation yourself, see [Sealed API keys](https://trymorse.ai/inference/docs/sealed-api-keys).

## If something goes wrong

| What you see | What to do |
| --- | --- |
| The model doesn't show in Agent mode | Set `toolCalling` to `true` in `chatLanguageModels.json`. Run **Chat: Open Language Models (JSON)** to open it. |
| Custom Endpoint isn't in the list | Your organization's Copilot policy turns off your own keys. Ask its admin to allow Bring Your Own Language Model Key. |
| `401 invalid_api_key` | Check the key you gave GitHub Copilot in full, and that it isn't revoked. |
| `402 insufficient_balance` or `key_spend_limit_reached` | Add credits, or raise the key's spend limit. A request holds credit for its output limit before it starts: see [Holds](https://trymorse.ai/inference/docs/pricing#holds). |
| `404 model_not_found` | Use a model's id exactly as the table above writes it, with the part before the slash. |

Every code is in [Error codes](https://trymorse.ai/inference/docs/api/errors). For other tools, see [Tools and coding agents](https://trymorse.ai/inference/docs/tools).
