Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 52
Glossary 12

Tools

GitHub Copilot BYOK — own models instead of quotas

BYOK (bring your own key) is an official GitHub Copilot mechanism that allows you to connect your own model provider and run agentic sessions on it, rather than on the built-in GPT and Claude models. Since January 2026, any OpenAI-compatible endpoint has been supported; as of June 23, BYOK is available in the Copilot app itself in public preview on all paid plans, and as of July 14, in the JetBrains version as well. This means you can keep Copilot as the shell and route inference through JoinGonka Gateway—at the prices of the decentralized Gonka network without consuming premium subscription requests. In VS Code, BYOK does not require a Copilot plan or a GitHub account login.

What BYOK offers and when you need it

A Copilot subscription restricts premium requests with monthly limits; agentic sessions, refactoring, and multi-step tasks consume this quota fastest. BYOK shifts these calls to your provider: consumption is billed at your provider's rates and does not deduct from the Copilot premium quota. Keys are stored in the system keychain and cannot be read back by the interface.

BYOK is justified if you are hitting limits, want models with open weights, or want to pay significantly less for inference: the Gonka network offers the same open-source models hundreds of times cheaper than vendor retail prices — current rates are always available in the live gateway price list.

Timeline: what was included and when

WhenWhat was released
November 2025BYOK in public preview: Anthropic, OpenAI, xAI, Microsoft Foundry; Agent, Plan, Ask, and Edit modes in VS Code, JetBrains, Eclipse, Xcode
January 2026Support for any OpenAI-compatible provider + AWS Bedrock and Google AI Studio; models with Responses API
June 23, 2026BYOK in the GitHub Copilot app — public preview for all paid plans
June 18, 2026VS Code: BYOK works without GitHub login and without a Copilot plan; usage is billed by the provider and does not consume the Copilot request quota
July 14, 2026Custom OpenAI-compatible endpoints in Copilot for JetBrains — on all subscription tiers

Connecting JoinGonka Gateway: step-by-step

You'll need a jg-… key — it's issued when you register on the gateway, along with 3M free starter tokens, no card required. The key and model are set separately in each Copilot client — here are three ways.

VS Code — Custom Endpoint provider. This is the current path: the former "OpenAI Compatible" provider and the github.copilot.chat.customOAIModels setting are now deprecated.

StepAction
1. Model editorCommand Palette → Chat: Manage Language Models (or the gear icon in the chat model list)
2. ProviderAdd Models → Custom Endpoint; group name — for example, JoinGonka
3. KeyPaste your jg-… — VS Code stores it in its own secure storage, not in a file
4. API typeChat Completions
5. ModelsVS Code will open chatLanguageModels.json — replace the new group's "models" array with the block below and save the file
6. SelectionPick the model in the chat model list; if it doesn't show up, restart VS Code
"models": [
  {
    "id": "deepseek-ai/DeepSeek-V4-Flash-0731",
    "name": "DeepSeek V4 Flash (Gonka)",
    "url": "https://gate.joingonka.ai/v1/chat/completions",
    "toolCalling": true,
    "vision": false,
    "maxInputTokens": 347232,
    "maxOutputTokens": 32768
  },
  {
    "id": "MiniMaxAI/MiniMax-M2.7",
    "name": "MiniMax M2.7 (Gonka)",
    "url": "https://gate.joingonka.ai/v1/chat/completions",
    "toolCalling": true,
    "vision": false,
    "maxInputTokens": 191808,
    "maxOutputTokens": 8192
  },
  {
    "id": "zai-org/GLM-5.3-Flash",
    "name": "GLM 5.3 Flash (Gonka)",
    "url": "https://gate.joingonka.ai/v1/chat/completions",
    "toolCalling": true,
    "vision": false,
    "maxInputTokens": 381808,
    "maxOutputTokens": 8192
  }
]

maxInputTokens is the model's context window minus the response ceiling: together with maxOutputTokens it defines the window. Without toolCalling: true, the model won't appear in the list when working with agents.

Copilot CLI — environment variables only. This provider has no settings file; values are set in the shell from which you launch copilot:

export COPILOT_PROVIDER_BASE_URL=https://gate.joingonka.ai/v1
export COPILOT_PROVIDER_TYPE=openai
export COPILOT_PROVIDER_API_KEY=jg-your-key
export COPILOT_MODEL=deepseek-ai/DeepSeek-V4-Flash-0731
export COPILOT_PROVIDER_MAX_PROMPT_TOKENS=347232
export COPILOT_PROVIDER_MAX_OUTPUT_TOKENS=32768
copilot

Only Copilot CLI reads the COPILOT_PROVIDER_* names, so this setup won't interfere with your other tools. The CLI requires tool calling and streaming from the model — every model in the network supports both.

JetBrains — GitHub Copilot plugin. Open Copilot Chat → model list → Manage Models, choose a provider with an OpenAI-compatible endpoint, click Add Models and enter the Base URL https://gate.joingonka.ai/v1, your jg-… key and the model ID. Click Save, check the model under your key and save again — it will now appear in the list alongside the built-in ones.

Tip. The npx @joingonka/setup --tool copilot-byok command prints all three sections with your key and the actual limits of the selected model already filled in — including a ready-to-paste "models" array for VS Code — and verifies with a live request that the gateway accepts the key and the model. It writes no files: each Copilot client keeps the key in its own storage.

Which network model to choose

All three network models support streaming and tool calling. deepseek-ai/DeepSeek-V4-Flash-0731 has one of the longest contexts in the network (380K tokens) and the largest output, up to 32768 tokens: use it for large repositories and long agent sessions. MiniMaxAI/MiniMax-M2.7 is universal, with an output up to 8192 tokens. zai-org/GLM-5.3-Flash is Z.ai's reasoning model with the longest context in the network (390K tokens): it reasons before answering, with an output up to 8192 tokens; part of the response budget goes to reasoning, so don't set the output limit too low in the settings.

Public preview limitations — honestly

BYOK covers agent sessions and chat; inline suggestions and semantic project search remain on Copilot models and require a GitHub account — this is a limitation of Copilot itself, not the provider. In Copilot Business and Enterprise, the local BYOK is managed by administrator policy ("Bring Your Own Language Model Key"): if the option is not in the interface, it is disabled at the organization level. Vision tasks do not work through the gateway: network models are text-only. If a tool sends requests in the Responses API format, the gateway will accept them: POST /v1/responses, streaming, and function tools work. We do not store dialogues, so store is ignored, and previous_response_id will return an error — pass the entire history in input.

BYOK turns Copilot from a subscription with limits into a shell over your inference. In VS Code — Chat: Manage Language Models → Add Models → Custom Endpoint, in Copilot CLI — COPILOT_PROVIDER_* variables, in JetBrains — Manage Models → Add Models; use the gate.joingonka.ai/v1 address and the jg- key, and agent sessions will run on Gonka network models at live prices without touching your Copilot request quota. Start with free tokens.

Want to learn more?

Explore other sections or start earning GNK right now.

Get free tokens →