# Claude Code VS Code

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

{% hint style="info" %}
This guide covers the VS Code extension. For the terminal CLI, see [Claude Code CLI](/ai-coding-assistants/claude-code-cli.md).
{% endhint %}

## 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:

```json
{
  "claudeCode.environmentVariables": [
    {
      "name": "ANTHROPIC_BASE_URL",
      "value": "https://api.tensorix.ai"
    },
    {
      "name": "ANTHROPIC_AUTH_TOKEN",
      "value": "<YOUR_TENSORIX_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"
    }
  ]
}
```

{% hint style="danger" %}
**Important:** You must set ALL model variables (`ANTHROPIC_MODEL`, `ANTHROPIC_SMALL_FAST_MODEL`, `ANTHROPIC_DEFAULT_HAIKU_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_OPUS_MODEL`). Missing any will cause Claude Code to try calling Anthropic models directly, resulting in errors.
{% endhint %}

## 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 Tensorix.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tensorix.ai/ai-coding-assistants/claude-code-vscode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
