Claude Code / Agent Plan reference

Claude Code integration reference

Use Claude Code with the Agent Plan's Anthropic-compatible endpoint while keeping every model route explicit.

1 · Quick start

Connect Claude Code in three moves

Start with the matching configuration file, keep the key in the named secret location, and use one exact Model ID throughout the setup.

01

Install Claude Code

Install the CLI once, then launch it from the repository where you want the agent to work.

02

Set the Anthropic-compatible route

Use ANTHROPIC_BASE_URL without /v3. Claude Code uses the Anthropic-compatible route rather than the OpenAI Chat Completions route.

03

Pin every model field

Use one exact Model ID for the main route, the HAIKU / SONNET / OPUS defaults, and the subagent route so the client cannot silently fall back to another model.

The key is delivered to your Dashboard after payment. Replace the placeholder in the example, then keep the real value in your environment or local secret file.

2 · Configuration

Copy the provider blueprint

This is a safe starting point for the current Agent Plan route. Keep existing tool settings that are unrelated to the provider and replace only the placeholder key and Model ID values.

{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "YOUR_AGENT_PLAN_KEY",
    "ANTHROPIC_BASE_URL": "https://ark.cn-beijing.volces.com/api/plan",
    "ANTHROPIC_MODEL": "glm-5.2",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5.2",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.2",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.2",
    "CLAUDE_CODE_SUBAGENT_MODEL": "glm-5.2"
  }
}

The default Model ID shown here is the stocked plan's current default. If you choose another supported model, replace every model field required by Claude Code, not just the visible label.

Install / launch

Use the current Claude Code installation for your platform.

3 · Verify the route

Confirm the connection before a full project

Run claude from a test repository and complete one short read-only task.

Check that the shell or settings file contains ANTHROPIC_AUTH_TOKEN and the expected Model ID.

If the client starts a provider login flow, inspect the loaded environment before changing the endpoint.

Troubleshooting

Common configuration pitfalls

Do not copy the /v3 OpenAI-compatible URL from Codex into Claude Code.

A Model ID typo can produce an unexpected provider-side fallback. Keep the ID exact and consistent.