Claude models are available again from October 18, 2026. Switch the model IDs as shown in Use Claude models, and keep in mind:
- Claude Code’s WebSearch tool relies on Anthropic’s server-side search, which isn’t available.
- Each response is capped at 32,768 output tokens.
Install Claude Code
Install it globally with npm (Node.js required):Configure LaoZhang API
1
Edit settings.json
Open or create
~/.claude/settings.json and add:- For
ANTHROPIC_AUTH_TOKEN, create a key in Tokens in theClaude Codegroup with the Usage-first billing mode. If you already use adefault-group key here, create a newClaude Code-group key or edit the existing one and change its group. - Use the bare host for
ANTHROPIC_BASE_URL, without/v1; Claude Code adds/v1/messagesitself. - The three
ANTHROPIC_DEFAULT_*_MODELentries make background tasks and subagents useglm-5.2too. Otherwise they request default models LaoZhang API doesn’t offer. CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETASturns off experimental request fields that some routes reject with a 400; see Fix Claude Code 400 ValidationException.
env block without removing anything else. The file holds your full key, so keep it out of repositories and screenshots.2
Clear conflicting variables
Values in the
env block of settings.json override variables with the same name in your shell, so most setups need no cleanup. Two cases still send requests somewhere other than LaoZhang API:CLAUDE_CODE_USE_BEDROCK,CLAUDE_CODE_USE_VERTEX, orCLAUDE_CODE_USE_FOUNDRYis set in your shell or shell profile. Claude Code uses cloud provider credentials first, sounsetthem and remove them from your profile.- The project’s
.claude/settings.jsonor.claude/settings.local.jsonsets its ownANTHROPIC_BASE_URLorANTHROPIC_AUTH_TOKEN. Project settings take precedence over user settings, so remove those keys or set them to your LaoZhang API values.
3
Send a test request
connected, the setup works. Run claude in a project directory to start an interactive session.Choose a model
To use DeepSeek, set the four model variables to:
ANTHROPIC_DEFAULT_HAIKU_MODEL handles lightweight background work, so a cheaper model fits there. Prices are in the model catalog.
At startup, Claude Code may warn "glm-5.2" isn't described by this version's model catalog. It doesn’t recognize non-Claude model IDs, including DeepSeek, and assumes a 200K context window; everything else works normally.
Use Claude models
Set the four model variables to Claude models and cap the output at 32,000 tokens:- Always set
ANTHROPIC_DEFAULT_HAIKU_MODEL. Without it, Claude Code runs background tasks on its defaultclaude-haiku-4-5-20251001, which LaoZhang API doesn’t offer, and those requests fail with a 503. - Claude models on LaoZhang API return at most 32,768 output tokens per response, so keep
CLAUDE_CODE_MAX_OUTPUT_TOKENSat or below that. - Other Claude model IDs and prices are in the Anthropic section of the catalog. For other differences from Anthropic’s API, see Claude model limits.
FAQ
I get a 503 “no available channels”
Check these in order:- Token group: use the
Claude Codegroup with the Usage-first or Usage-based billing mode.Current group default …means adefaulttoken; DeepSeek, GLM, and Kimi need aClaude Codetoken over the Claude protocol. - Model IDs: all four model variables must use IDs from the table above. That group serves only Claude-protocol models, so a GPT or Gemini ID returns
Current group claude_code …. - Haiku variable: if
ANTHROPIC_DEFAULT_HAIKU_MODELis missing, Claude Code requests Haiku 4.5, which isn’t offered, and gets the same error.
I get a 401
Make sureANTHROPIC_AUTH_TOKEN is your full LaoZhang API key and isn’t overridden by the same keys in the project’s .claude/settings.json or .claude/settings.local.json. See Invalid API key or 404.