GitHub Copilot Integration

Use QCode.cc through GitHub Copilot's custom endpoints: chatLanguageModels.json in VS Code 1.122+ with the three apiType values (messages / chat-completions / responses), Copilot CLI BYOK variables, and JetBrains support scope

Updated 2026-09-18
On This Page

Last verified: 2026-09-18 · 📄 Per official docs (VS Code 1.138.0 / bundled Copilot extension 0.66.0, Copilot CLI v1.0.86 released 2026-09-17)

At a glance

Item Details
Models you can use Claude ✅ (only the messages type) · GPT ✅ (Chat / Responses) · Chinese models ✅ (Chat) · Gemini ❌ (no such protocol option)
Protocol & Base URL VS Code url takes the full path: https://api.qcode.cc/api/v1/messages · https://api.qcode.cc/openai/v1/chat/completions · https://api.qcode.cc/openai/v1/responses; the CLI takes the root only (Route B)
Where to configure VS Code: command palette Chat: Manage Language ModelschatLanguageModels.json; CLI: environment variables
Official docs VS Code language models · Copilot CLI BYOK

Prerequisites

  • Route A: VS Code ≥ 1.122 (Custom Endpoint reached Stable on 2026-05-28).
  • Route B: GitHub Copilot CLI installed.
  • A QCode.cc cr_ key (dashboard). Models are billed per token by QCode — separate from any Copilot plan fee (see Subscriptions vs API Keys vs QCode Keys).

Setup

Open the command palette (Ctrl/Cmd+Shift+P) → Chat: Manage Language Models → choose Custom Endpoint; VS Code opens chatLanguageModels.json for editing. Four official rules:

  • vendor must be customendpoint; the key field is apiKey.
  • apiType has three legal values: messages (Anthropic protocol), chat-completions, responses. Claude models only work with messages.
  • url should be the complete request URL including the path (official guidance); otherwise VS Code inserts /v1 for you and builds a 404 easily.
  • To appear in Agent mode, an entry needs "toolCalling": true, or the model stays out of the picker.

Claude plus GPT/Chinese models side by side:

[
  { "name": "QCode Claude", "vendor": "customendpoint", "apiKey": "cr_your-QCode-key",
    "apiType": "messages",
    "url": "https://api.qcode.cc/api/v1/messages",
    "toolCalling": true,
    "models": [ { "id": "claude-sonnet-5" } ] },
  { "name": "QCode OpenAI", "vendor": "customendpoint", "apiKey": "cr_your-QCode-key",
    "apiType": "chat-completions",
    "url": "https://api.qcode.cc/openai/v1/chat/completions",
    "toolCalling": true,
    "models": [ { "id": "gpt-5.6" }, { "id": "glm-5.3" } ] }
]

GPT over the Responses protocol (the same leg Codex uses, GPT-only):

[
  { "name": "QCode Responses", "vendor": "customendpoint", "apiKey": "cr_your-QCode-key",
    "apiType": "responses",
    "url": "https://api.qcode.cc/openai/v1/responses",
    "toolCalling": true,
    "models": [ { "id": "gpt-5.6" } ] }
]

Save, and the models show up in the chat model picker.

Route B: Copilot CLI bring-your-own-key

The CLI declares a custom model through four environment variables; COPILOT_PROVIDER_TYPE officially takes only openai (default), azure, anthropic. For the QCode Anthropic leg:

# Anthropic Messages route — base URL is the ROOT, no path appended
export COPILOT_PROVIDER_TYPE=anthropic
export COPILOT_PROVIDER_BASE_URL="https://api.qcode.cc/api"
export COPILOT_PROVIDER_API_KEY="cr_your-QCode-key"
export COPILOT_MODEL="claude-sonnet-5"

# OpenAI-compatible route — base URL includes /v1 but not /chat/completions
export COPILOT_PROVIDER_TYPE=openai
export COPILOT_PROVIDER_BASE_URL="https://api.qcode.cc/openai/v1"
export COPILOT_PROVIDER_API_KEY="cr_your-QCode-key"
export COPILOT_MODEL="gpt-5.6"

Use one set at a time (the later export wins): the first block connects Claude over the Anthropic leg, the second connects GPT / Chinese models over the OpenAI-compatible leg — where the base URL ends at /v1, the opposite of Route A.

🔴 The number-one trap on this page: VS Code wants the full path in url, the CLI wants the root in BASE_URL — copy-pasting one form into the other always fails.

Copilot on JetBrains

GitHub lists JetBrains among the clients supporting local BYOK, with OpenAI-compatible Custom Endpoints available since 2026-07-14, configured under Copilot's Manage Models. Field-level details are not yet documented officially, and Anthropic-type endpoints on JetBrains are not confirmed on the official pages — treat GitHub Copilot docs as the source of truth.

Verify it works

Pick the custom model in Copilot Chat (or the copilot CLI) and send one message:

  • A normal reply = connected.
  • 401 = apiKey / COPILOT_PROVIDER_API_KEY wrong (keep the full cr_ prefix).
  • 404 = the URL shape is off — VS Code needs the full path, the CLI needs the root (check the table above).
  • Every request is visible under your key at probe.qcode.cc. For the full checklist see troubleshooting.

Known limitations

  • Inline completions still run through GitHub: custom endpoints / BYOK affect Chat and Agent only (official boundary).
  • No Gemini option: apiType has no Gemini protocol, so gemini-* models are unavailable here — pick another client (see Tool Compatibility Overview).
  • Organization policies may disable custom model endpoints; enterprise users should check their policy first.
  • The messages full-path form (/api/v1/messages) follows the official recommendation of writing complete URLs; if your VS Code build behaves differently (auto-inserting /v1), fix it against the 404/400 codes as described above.
  • Capability fields (vision, maxInputTokens, maxOutputTokens, …) can be declared per entry; semantics on the official page.

Related Documents

Roo Code Setup
Use QCode.cc from the Roo Code VS Code extension: pick the Anthropic provider, tick the custom base URL, and Claude works
Connect SillyTavern to QCode
Chat with QCode.cc's Claude / GPT models in SillyTavern; an honest note on whether gpt-image-2 image generation can be connected, plus alternatives
Aider Integration
Configure Aider with QCode.cc: Claude over the Anthropic endpoint (anthropic/ prefix), GPT and Chinese models over the OpenAI-compatible endpoint
🚀
Get Started with QCode — Claude Code & Codex
One plan for both Claude Code and Codex, Asia-Pacific low latency
View Pricing Plans → Create Account
Team of 3+?
Enterprise: dedicated domain + sub-key management + ban protection, from ¥250/person/mo
Learn Enterprise →