GitHub Copilot in Russia: Accounts, Plans, and Custom Endpoint

You can connect an external model to Copilot Chat through the BetterToken Custom Endpoint guide. A GitHub account, a Copilot plan, and model API access control different functions. In a current VS Code release, the key is stored in local secret storage, then the request is checked in Chat and the Dashboard. Inline completions and GitHub service availability do not change.

What You Are Actually Configuring

Copilot has several independent layers. Separating them before setup explains why Chat may respond while suggestions inside the editor remain unchanged.

Layer What it controls Does Custom Endpoint replace it?
GitHub account Sign-in, license assignment, and access to GitHub features No
Copilot plan Copilot quotas and features, including hosted models and completions No
Local BYOK / Custom Endpoint An external model in a supported client and Chat surface Only requests the client sends to the selected model
Inline completions Code suggestions shown directly in the editor No; they remain part of GitHub Copilot

GitHub documents local BYOK separately: the key is stored on the device, and support depends on the client. A Business or Enterprise administrator can disable local BYOK. Enterprise BYOK is a different server-side feature with separate requirements.

Want to test a Custom Endpoint in your current Copilot Chat setup? Create your own BetterToken account and API key, then open the current setup guide and follow the steps below. BetterToken provides OpenAI-compatible API access and usage history in the Dashboard, but it does not provide a GitHub account, activate a Copilot plan, or change GitHub's regional policies.

What to Check Before Setup

  1. Install the current stable version of VS Code.
  2. Open Copilot Chat and confirm that the model selector contains Manage Models....
  3. Confirm that Add Models → Custom Endpoint appears in the Language Models window.
  4. Create your own BetterToken API key and choose an exact Model ID from the model catalog.

BYOK support does not arrive in every client at the same time. A Custom Endpoint in VS Code does not prove that the same configuration works in JetBrains, Xcode, GitHub.com, or another surface. GitHub maintains the current client and limitation list.

There is also a boundary for the official Copilot service. GitHub's trade controls policy says Copilot may not be sold or exported to Russia without authorization. A Custom Endpoint does not cancel that policy. This guide does not cover changing a region, third-party payment methods, or bypassing account checks.

Add a BetterToken Custom Endpoint in VS Code

1. Open Model Management

Open the model selector in the Copilot Chat input area and choose Manage Models.... Then select Add Models → Custom Endpoint.

If the option is missing, update VS Code first. Do not copy configuration from an arbitrary old tutorial because command names and the file schema may have changed.

2. Create a Group and Store the Key

Enter BetterToken as the Group Name. When VS Code asks for an API key, paste your key into the prompt and press Enter.

VS Code should store the secret locally and write a reference similar to this:

"apiKey": "${input:chat.lm.secret.xxxxx}"

Do not replace that reference with the real key. Do not put the key in settings.json, a repository-owned .env, or a commit.

3. Select Chat Completions

Choose Chat Completions for the verified BetterToken configuration. VS Code then opens chatLanguageModels.json.

Use this as a minimal field reference:

[
  {
    "name": "BetterToken",
    "vendor": "customendpoint",
    "apiKey": "${input:chat.lm.secret.xxxxx}",
    "apiType": "chat-completions",
    "models": [
      {
        "id": "YOUR_MODEL_ID",
        "name": "YOUR_MODEL_ID",
        "url": "https://www.bettertoken.ai/v1/chat/completions"
      }
    ]
  }
]

YOUR_MODEL_ID is a placeholder. Replace it with an exact available model identifier. This url field requires the full Chat Completions endpoint; the Base URL https://www.bettertoken.ai/v1 alone is insufficient here. Add toolCalling, vision, and token-context limits only when they match the selected model and the current BetterToken documentation.

4. Reload VS Code

Save the file and run this Command Palette command:

Developer: Reload Window

Open the Copilot Chat model selector again and choose the model from the BetterToken group.

5. Run a Short Verification

Send a request with an easy-to-check result:

Return only JSON with two fields: language="en" and sum=2+2.

Treat the connection as verified only when all three checks pass:

  • Copilot Chat returns valid JSON without an authorization or Model ID error;
  • the request appears in BetterToken Dashboard usage history;
  • inline completion is tested separately and is not mistaken for a Custom Endpoint result.

When Chat is used without Copilot sign-in, VS Code warns that some utility tasks still need a model. Select your BYOK models for chat.utilityModel and chat.utilitySmallModel; verify the current setting names in the VS Code language models documentation.

Why Chat Works but Inline Completion Does Not Change

Custom Endpoint connects a model to supported Chat and agent workflow surfaces. Suggestions displayed directly in the editor remain a GitHub Copilot feature. A successful BetterToken request therefore does not verify official completions or use their quota in the same way.

Some VS Code features still depend on GitHub services. The documentation lists semantic search, inline suggestions, and embeddings. Local BYOK may be enough for a model conversation or an agent task in Chat. For completions and other integrated Copilot features, check the account, plan, and organization policy separately.

The GitHub Copilot app has its own BYOK workflow: with your own provider, a GitHub account is required but a Copilot plan is not. That app-specific rule should not be applied automatically to VS Code, GitHub.com, or enterprise features.

Common Custom Endpoint Errors

The Model Does Not Appear

Check the VS Code version, the entry in chatLanguageModels.json, and the exact Model ID. Run Developer: Reload Window. On a managed device, ask whether a Copilot Business or Enterprise policy disables local BYOK.

401 or Invalid Token

Add the model again through Add Models so VS Code requests the key and stores it in secret storage. The JSON must retain ${input:chat.lm.secret...} rather than the actual value. Confirm that the key belongs to your BetterToken account and is active.

404 or Model Not Found

For apiType: "chat-completions", check the full URL https://www.bettertoken.ai/v1/chat/completions. Then compare id with the current BetterToken Model ID. Base URL, full endpoint, and Model ID are separate checks.

Chat Responds but Completions Stay the Same

This is the expected product boundary. Custom Endpoint does not replace inline completions. Access to the relevant GitHub Copilot feature is still required for them.

What Depends on GitHub and What Depends on BetterToken

GitHub controls accounts, Copilot plans, regional and organization restrictions, and built-in features such as inline completions. In this workflow, BetterToken handles the external OpenAI-compatible request, API key, available Model ID, and usage entry in the Dashboard.

Check current BYOK support for the client you use. Then open the current BetterToken guide, add the Custom Endpoint through the VS Code interface, and finish with a short request plus a Dashboard entry.

FAQ

Can I Use Custom Endpoint Without a Paid Copilot Plan?

It depends on the client and feature. The GitHub Copilot app documentation allows BYOK with a GitHub account and no Copilot plan. In VS Code, some BYOK Chat workflows can run without Copilot sign-in, while semantic search, inline suggestions, embeddings, and some utility tasks retain separate dependencies.

Does BetterToken Replace a GitHub Copilot Subscription?

No. BetterToken connects an external model where a client supports Custom Endpoint or BYOK. The GitHub account, plan, completions, and other Copilot features remain separate.

Can I Store the API Key in chatLanguageModels.json?

Do not write the actual key there. Enter it in the VS Code prompt and retain the secret reference created by the application.

Does This Workflow Require a VPN?

Connecting to the BetterToken API Endpoint from Russia does not require a VPN. This statement applies only to the BetterToken endpoint. GitHub website access, sign-in, client downloads, updates, and Copilot functions remain subject to GitHub conditions and your network.