VS Code

Use Tokener.ai models in VS Code through the Custom Endpoint provider.

Updated 2026-08-28
Edit on GitHub

VS Code can use Tokener.ai models in Chat through its Custom Endpoint provider. Requests use your Tokener.ai API key and bill against your organization's credits like other model API traffic.

Configure

  1. Create a key in API keys.
  2. Run Chat: Manage Language Models from the Command Palette.
  3. Select Add Models, then Custom Endpoint.
  4. Use Tokener.ai as the group name, enter the API key, and select Chat Completions.
  5. VS Code opens chatLanguageModels.json. Keep the secret-backed apiKey reference that VS Code created and configure the provider as follows:
JSON
[
  {
    "name": "Tokener.ai",
    "vendor": "customendpoint",
    "apiKey": "${input:tokenerApiKey}",
    "apiType": "chat-completions",
    "models": [
      {
        "id": "deepseek-v4-flash",
        "name": "deepseek-v4-flash",
        "url": "https://api.tokener.dev/v1/chat/completions",
        "toolCalling": true,
        "vision": false,
        "maxInputTokens": 900000,
        "maxOutputTokens": 16000
      },
      {
        "id": "deepseek-v4-pro",
        "name": "deepseek-v4-pro",
        "url": "https://api.tokener.dev/v1/chat/completions",
        "toolCalling": true,
        "vision": false,
        "maxInputTokens": 900000,
        "maxOutputTokens": 16000
      },
      {
        "id": "glm-5.2",
        "name": "glm-5.2",
        "url": "https://api.tokener.dev/v1/chat/completions",
        "toolCalling": true,
        "vision": false,
        "maxInputTokens": 900000,
        "maxOutputTokens": 16000
      },
      {
        "id": "gpt-5.6-luna",
        "name": "gpt-5.6-luna",
        "url": "https://api.tokener.dev/v1/chat/completions",
        "toolCalling": true,
        "vision": false,
        "maxInputTokens": 900000,
        "maxOutputTokens": 16000
      },
      {
        "id": "gpt-5.6-sol",
        "name": "gpt-5.6-sol",
        "url": "https://api.tokener.dev/v1/chat/completions",
        "toolCalling": true,
        "vision": false,
        "maxInputTokens": 900000,
        "maxOutputTokens": 16000
      },
      {
        "id": "gpt-5.6-terra",
        "name": "gpt-5.6-terra",
        "url": "https://api.tokener.dev/v1/chat/completions",
        "toolCalling": true,
        "vision": false,
        "maxInputTokens": 900000,
        "maxOutputTokens": 16000,
        "modelOptions": {
          "reasoning_effort": "none"
        }
      },
      {
        "id": "kimi-k3",
        "name": "kimi-k3",
        "url": "https://api.tokener.dev/v1/chat/completions",
        "toolCalling": true,
        "vision": false,
        "maxInputTokens": 900000,
        "maxOutputTokens": 16000,
        "modelOptions": {
          "temperature": 1,
          "top_p": 0.95
        }
      }
    ]
  }
]

The example lists the models available when this page was updated. It uses a conservative 900k input and 16k output client budget within the published 1M-class context. The Models catalog is the source of truth for current model ids and context windows. Do not store or commit a plaintext API key in this file.

Select and verify

Save the file, open Chat, and select a model from the model picker. Ask a short question first, then use Agent mode for a tool-calling check.

  • If the picker only shows Auto, trust the workspace and leave Restricted Mode.
  • If the models do not appear after saving, restart VS Code.
  • For Agent Host sessions in the Agents window, enable chat.agentHost.byokModels.enabled and restart the Agent Host process.
  • Do not force tool_choice to required for DeepSeek thinking models. VS Code's default automatic tool selection is compatible.