You can connect an external model to VS Code Chat through the BetterToken Custom Endpoint guide. Current VS Code documentation says BYOK Chat can work without a GitHub sign-in or Copilot plan. GitHub-dependent features—including inline suggestions, semantic search, and embeddings—remain separate. Store the key in local secret storage, test the model in Chat, and verify the request in BetterToken Workspace.
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 | GitHub-dependent services and account features | No; VS Code BYOK Chat can run without sign-in |
| Copilot plan | Hosted Copilot models, quotas, and dependent features | No; it is not required for VS Code BYOK Chat |
| Local BYOK / Custom Endpoint | An external model in supported VS Code Chat surfaces | Yes, for requests sent to the selected external model |
| Inline suggestions | Code completions shown directly in the editor | No; they remain a GitHub-dependent feature |
VS Code documents BYOK and Custom Endpoint separately: the key stays in local secret storage, supported API types include Chat Completions, Responses, and Messages, and organization policy can disable BYOK for managed Business or Enterprise users. Enterprise provider configuration is a separate server-side workflow.
Want to test a Custom Endpoint in VS Code Chat? Create your own BetterToken account and API key, then open the current setup guide and follow the steps below. BetterToken provides compatible API access and usage history in Workspace; it does not provide GitHub accounts, Copilot plans, or inline completions.
What to Check Before Setup
- Install the current stable version of VS Code.
- Open VS Code Chat and confirm that the model selector contains Manage Models....
- Confirm that Add Models → Custom Endpoint appears in the Language Models window.
- 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. Check the current client documentation before copying this setup elsewhere.
Regional availability and billing considerations
GitHub, VS Code extensions, model providers, and payment methods can have different regional rules. Check each service's current availability and billing terms separately. A Custom Endpoint changes the model route used by supported Chat surfaces; it does not override account, organization, export-control, or payment policies.
Add a BetterToken Custom Endpoint in VS Code
1. Open Model Management
Open the model selector in the VS Code 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 VS Code 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:
- VS Code Chat returns valid JSON without an authorization or Model ID error;
- the request appears in BetterToken Workspace 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 Workspace.
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 a Custom Endpoint Change Regional Availability?
No. It changes only the model route used by supported VS Code Chat surfaces. GitHub services, client downloads, updates, provider access, and billing remain subject to their own current regional conditions.