GitHub Copilot in Russia: Accounts, Plans, and Custom Endpoints
Separate your GitHub account and Copilot plan from a VS Code Custom Endpoint, then test an external model without confusing it with inline completions.
You can connect an external model to Copilot Chat through a BetterToken Custom Endpoint. Your GitHub account, Copilot plan, and API access control different features. Current VS Code versions store the key in local secret storage; you can then verify the request in Chat and the Dashboard. This setup does not change inline completions or GitHub service access.
What you are configuring
Copilot has several independent layers. If you separate them before setting up, it will be easier to understand why Chat is responding, but the tooltips in the editor have not changed.
GitHub specifically describes local BYOK: The key is stored on the device and support varies by client. In a Business or Enterprise organization, your administrator can disable this feature. Enterprise BYOK is a different, server-side scenario with separate requirements.
Want to check out Custom Endpoint in your version of Copilot Chat? Create your own BetterToken account and API Key, then open current instructions and complete the setup below. BetterToken provides OpenAI-compatible API access and usage history in the Dashboard, but does not issue a GitHub account, activate a Copilot plan, or change GitHub regional rules.
What to check before setting up GitHub Copilot in Russia
- Install the latest stable version of VS Code.
- Open Copilot Chat and make sure there is Manage Models... in the model selector.
- Check that the Add Models → Custom Endpoint command is available in the Language Models window.
- Create your own API Key BetterToken and select the exact Model ID from the model directory.
BYOK support does not change at the same time for all clients. The presence of a Custom Endpoint in VS Code does not prove that the same configuration works in JetBrains, Xcode, GitHub.com or another interface. The current list of supported clients and restrictions is published by GitHub.
There is one more limit for the official Copilot. GitHub Trade Restrictions Policy states that Copilot may not be sold or exported to Russia without appropriate permission. Custom Endpoint does not override this policy. There are no instructions for changing your region, paying through third parties, or bypassing account verification.
How to add BetterToken Custom Endpoint in VS Code
1. Open model management
In the Copilot Chat input field, open the model selector and select Manage Models.... Then click Add Models → Custom Endpoint.
If this option is not there, first update VS Code. Don't transfer configuration from a random old manual: the command names and file layout may have changed.
2. Create a group and save the key
In the Group Name field, enter BetterToken. When VS Code asks for an API Key, paste your key in the pop-up window and press Enter.
VS Code should save the secret locally and write a link something like this into the configuration:
Do not replace this reference with the actual key and do not add the key to settings.json, .env inside a public repository or commit.
3. Select Chat Completions protocol
For a verified BetterToken configuration, select Chat Completions. VS Code will then open chatLanguageModels.json.
The minimum guidelines for fields look like this:
YOUR_MODEL_ID - placeholder. Replace it with the exact model ID of the available model. The url field here contains the full Chat Completions endpoint; Base URL https://www.bettertoken.ai/v1 alone is not enough for this field. Add parameters toolCalling, vision and token context limits only in accordance with the capabilities of the selected model and the current BetterToken documentation.
4. Reload the VS Code window
Save the file and run the command from the Command Palette:
After rebooting, open the Copilot Chat selector again and select a model from the BetterToken group.
5. Do a short test
Send a request with an easily verifiable result, for example:
The connection can be considered confirmed if three conditions are met simultaneously:
- Copilot Chat returns valid JSON without authorization or Model ID errors;
- the request appears in the BetterToken Dashboard usage history;
- inline completion is checked separately and is not accepted as a Custom Endpoint result.
If you're using Chat without logging into Copilot, VS Code warns that some of the utility tasks still require a model. In such a scenario, select your BYOK models for the chat.utilityModel and chat.utilitySmallModel parameters; For the exact names of the settings, check VS Code documentation on language models.
Why Chat works, but inline completion has not changed
Custom Endpoint connects the model to supported Chat and agent workflow surfaces. Autocompletion, which appears directly in the editor, remains a feature of GitHub Copilot. Therefore, a successful request to BetterToken does not confirm the official completions and does not spend them in the same way.
Some VS Code features also rely on GitHub services: the documentation calls semantic search, inline suggestions, and embeddings. If your task is only a conversation with a model or an agent script in Chat, local BYOK may be enough. If you need completions and other integrated Copilot features, please review your account, plan, and organization policies separately.
GitHub Copilot app supports its BYOK scenario: With your own provider, a GitHub account is required, but a Copilot plan is not required. This rule is application-specific and should not automatically carry over to VS Code, GitHub.com, or enterprise features.
Common Custom Endpoint errors
The model did not appear in the selector
Check that VS Code is up to date, that there is an entry in chatLanguageModels.json and that the Model ID matches exactly. Then run Developer: Reload Window. If the device is managed by an organization, check to see if local BYOK is prohibited by Copilot Business or Enterprise policy.
Error 401 or Invalid token
Re-add the model via Add Models so that VS Code requests the key and stores it in secret storage. The JSON should contain the ${input:chat.lm.secret...} reference, not the actual value. Check 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 Model ID in the BetterToken directory. Base URL, full endpoint and Model ID are three different validation fields.
Chat has an answer, but completions remain the same
This is the expected bound of the function. Custom Endpoint does not replace inline completions. They require separate access to the corresponding GitHub Copilot function.
What ultimately depends on GitHub, and what ultimately depends on BetterToken
GitHub controls the account, Copilot plans, regional and organizational restrictions, and built-in features like inline completions. BetterToken in this scenario is responsible for the external OpenAI-compatible request, API Key, available Model ID and usage record in the Dashboard.
Before setting up, check the current BYOK support in your client. Then open the current BetterToken instructions, add a Custom Endpoint through the VS Code interface and complete the verification with a short query and a Dashboard entry.
FAQ
Can I use Custom Endpoint without a paid Copilot plan?
Depends on the client and function. For the GitHub Copilot app, the white paper allows BYOK with a GitHub account without a Copilot plan. In VS Code, some BYOK Chat scripts can work without logging into Copilot, but semantic search, inline suggestions, embeddings, and some helper tasks retain separate dependencies.
Does BetterToken replace GitHub Copilot subscription?
No. BetterToken connects an external model where the client supports Custom Endpoint or BYOK. The GitHub account, plan, completions, and other Copilot features remain separate.
Is it possible to store an API Key in chatLanguageModels.json?
The real value of the key should not be written there. Enter the key in the VS Code pop-up window and leave the secret link generated by the application.
Is a VPN needed for this scheme?
To connect to BetterToken API Endpoint from Russia, a VPN is not required. This statement only applies to the BetterToken endpoint. GitHub site access, sign-in, client downloads, updates, and Copilot features are subject to GitHub terms and conditions and your network.