Suanlimao
← Back to all tutorials

Connect your tools

VS Code · GitHub Copilot with your own key

Use Copilot's Custom Endpoint provider to route chat models through our address.

About 7 minFor:Developers who use GitHub Copilot Chat in VS Code

Before you start

  • VS Code with the GitHub Copilot extension signed in and an active Copilot plan
  • A key and a model name from the plaza (it must support tool calling to be usable in agent mode)

Step 1 · STEP 0x01

Open model management and add a Custom Endpoint

Chat view → model picker → Manage Language Models
1
Manage Language Models (gear)
2
Add Models
3

Provider

Custom Endpoint
Diagram only — the real screen in your version may differ

In the Chat view's model picker click the gear to open Manage Language Models (or run “Chat: Manage Language Models” from the Command Palette), click Add Models and pick Custom Endpoint. It is the official generic provider, supports Chat Completions, Responses and Anthropic Messages, and replaces the old “OpenAI Compatible” provider.

Create a key →

Step 2 · STEP 0x02

Fill in the provider and models in chatLanguageModels.json

chatLanguageModels.json (opened from the models editor)
1

vendor

customendpoint
2

name

Anything, e.g. My relay
3

apiKey

<YOUR_API_KEY> (or an input variable prompted on first use)
4

apiType

chat-completions
5

url

https://api.suanlimao.shop/v1/chat/completions
6

models[].id / name

<MODEL_NAME>
7

models[].toolCalling

true
Diagram only — the real screen in your version may differ
  • Follow the template the editor gives you: at provider level set vendor, name, apiKey, apiType and url; in the models array give each model an id and name, plus toolCalling, vision, maxInputTokens and maxOutputTokens as needed.
  • For url the docs recommend the full address including the API path, https://api.suanlimao.shop/v1/chat/completions, to avoid ambiguity; with just https://api.suanlimao.shop/v1 VS Code appends the path for the apiType.
  • For Claude-family models set apiType to messages and url to https://api.suanlimao.shop/v1/messages.
  • A model only shows up for agent mode if it supports tool calling (toolCalling: true and the model really supports it).
Don't guess the model name: open the model plaza, click “Copy model id” on a model card and paste it. A wrong model name is the most common error.

Open the model plaza →

Step 3 · STEP 0x03

Pick it in the model picker

Chat view
1

Model picker

<MODEL_NAME> (under your provider)
2

Message box

Hello
Diagram only — the real screen in your version may differ
  • Back in the Chat view, choose the model under your provider and send a message.
  • Official tip: if the model does not appear, restart VS Code.
Official limits: your own key applies to chat and utility tasks only; inline completions, semantic search and embeddings still go through GitHub. Copilot Business / Enterprise admins can disable BYOK in GitHub policy settings.

✓ How to tell it worked

  • Chat answers with your model.
  • The Usage page shows the request.

FAQ

My model is not in the picker.

Restart VS Code first. If it still only shows in Ask mode, agent mode requires tool-calling support and toolCalling: true.

Can I use this without a Copilot plan?

Per the docs, without a plan BYOK works only in the deprecated local harness, which is slated for removal. Use Cline, Continue or Claude Code instead.

Does `github.copilot.chat.customOAIModels` still work?

It is deprecated; use Custom Endpoint with chatLanguageModels.json.

Related tutorials

Still stuck?

Read the troubleshooting tutorials first. If that does not help, open a ticket with the request_id, time, model and the exact error (never paste your key).