Skip to main content

Connecting in Claude Code for VS Code

  1. Install the Claude Code for VS Code extension from the extension marketplace

  2. In the extension settings, enable the Disable Login Prompt option (true)

  3. Open or create the file ~/.claude/settings.json, where ~ is your home directory

  4. Fill it with the contents below

    ~/.claude/settings.json
    {
    "env": {
    "ANTHROPIC_BASE_URL": "<YOUR_URL>",
    "ANTHROPIC_API_KEY": "<YOUR_API_KEY>",
    "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": 1
    }
    }
    • Replace <YOUR_API_KEY> with the API key issued to you
      • If you see these instructions but do not have an API key, contact your organization's administrator
    • Replace <YOUR_URL> with the OpenAI-compatible URL issued to you
      • If you see these instructions but do not have an OpenAI-compatible URL, contact your organization's administrator
    • Optional: add the line "CLAUDE_CODE_AUTO_COMPACT_WINDOW": X to the env block — it enables automatic compaction when the context fills up to X tokens. Replace X with the value you need
  5. Start Claude Code in VS Code. If the extension asks whether to use this API key, confirm

    • If you see the error API Error: 401 Unknown API key: ..., contact your organization's administrator to reissue your API key
  6. To choose a model, use /model. Explyt supports only the models marked From gateway

    • auto – maximum availability (uptime) and high quality
    • Anthropic/opus-5 – Anthropic model with high-quality answers
    • OpenAI/gpt-5.6-sol – general-purpose OpenAI model

If you run into problems while connecting, check that Disable Login Prompt is enabled, then try typing /logout in the chat and start over.

For errors, see Error messages.