Setup wizard

Connect your AI tool.

Pick a tool, your operating system and a model. The steps and snippets below update to match.

1Tool
2Operating system
3Instructions

Connect VS Code

VS Code's built-in chat accepts your own models through a custom endpoint, with no extra extension.

  1. Install VS Code if you don't have it. These steps use the chat that is built in.
  2. Open the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on macOS) and run Chat: Manage Language Models.
  3. Click Add Models → Custom Endpoint. Name the group CheapTokens, paste your API key when asked, and choose Chat Completions as the API type.
  4. VS Code opens the file chatLanguageModels.json. Make the CheapTokens entry look like this and save. Keep the apiKey line that VS Code wrote for you.
    chatLanguageModels.json
    [
      {
        "name": "CheapTokens",
        "vendor": "customendpoint",
        "apiKey": "${input:cheaptokensApiKey}",
        "apiType": "chat-completions",
        "models": [
          {
            "id": "claude-sonnet-5-5",
            "name": "claude-sonnet-5-5",
            "url": "https://cheaptokens.pw/v1/chat/completions",
            "toolCalling": true,
            "vision": true,
            "maxInputTokens": 200000,
            "maxOutputTokens": 8192
          }
        ]
      }
    ]
  5. Open the Chat view, pick claude-sonnet-5-5 in the model picker and send a message. Restart VS Code if the model isn't listed.
  • Other ways to use CheapTokens in VS Code: the Claude Code, Codex, Cline, Roo Code and Continue extensions each have their own guide.
  • A model needs "toolCalling": true to show up in agent mode.
  • Inline code completions can't use your own models. Only chat and agent mode can.
  • To add more models, repeat the block inside models with another model ID.
  • On a company GitHub Copilot plan, an administrator has to allow your own model keys first.

Open the full VS Code guide →