For the complete documentation index, see llms.txt. This page is also available as Markdown.

Claude Code VS Code

The Claude Code VS Code extension can also be configured to use TensorX models.

This guide covers the VS Code extension. For the terminal CLI, see Claude Code CLI.

Installation

  1. Open VS Code Extensions (Ctrl+Shift+X / Cmd+Shift+X)

  2. Search for "Claude Code"

  3. Click Install

Configuration

Open VS Code settings (Cmd/Ctrl + ,) and search for "Claude Code". Click "Edit in settings.json" and add:

{
  "claudeCode.environmentVariables": [
    {
      "name": "ANTHROPIC_BASE_URL",
      "value": "https://api.tensorx.ai"
    },
    {
      "name": "ANTHROPIC_AUTH_TOKEN",
      "value": "<YOUR_TENSORX_API_KEY>"
    },
    {
      "name": "ANTHROPIC_MODEL",
      "value": "z-ai/glm-5.1"
    },
    {
      "name": "ANTHROPIC_SMALL_FAST_MODEL",
      "value": "z-ai/glm-5.1"
    },
    {
      "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL",
      "value": "z-ai/glm-5.1"
    },
    {
      "name": "ANTHROPIC_DEFAULT_SONNET_MODEL",
      "value": "z-ai/glm-5.1"
    },
    {
      "name": "ANTHROPIC_DEFAULT_OPUS_MODEL",
      "value": "z-ai/glm-5.1"
    },
    {
      "name": "API_TIMEOUT_MS",
      "value": "3000000"
    },
    {
      "name": "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC",
      "value": "1"
    }
  ]
}

Available Models

Model
Value
Best For

GLM-5.1

z-ai/glm-5.1

Coding, reasoning, general use

MiniMax-M2.5

minimax/minimax-m2.5

Reasoning, functions

Kimi-K2.5

moonshotai/kimi-k2.5

Vision, functions, long context

MiniMax-M2

minimax/minimax-m2

Coding, fast responses

Switching Models

To switch models, update all model values in your VS Code settings.json:

  1. Replace z-ai/glm-5.1 with your chosen model ID in all five places

  2. Restart VS Code or reload the window

One-Time OAuth

Like the CLI, the VS Code extension requires a one-time Anthropic OAuth for interactive features. A free Anthropic account works - you won't be charged by Anthropic as all requests route through TensorX.

Last updated

Was this helpful?