Claude Code
Use ModelSite chat models in Claude Code: the three settings, the one thing to change for GLM models, and a one-line check
Status: run against ModelSite with Claude Code 2.1.309 on 2026-10-24 (claude -p, one request, answered correctly).
Settings
export ANTHROPIC_BASE_URL="https://api.modelsite.ai"
export ANTHROPIC_AUTH_TOKEN="$MODELSITE_API_KEY"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="glm-5.3-flash"
export ANTHROPIC_DEFAULT_SONNET_MODEL="glm-5.3-flash"
export ANTHROPIC_DEFAULT_OPUS_MODEL="glm-5.3-flash"
claude --model glm-5.3-flash- Use
ANTHROPIC_AUTH_TOKEN, notANTHROPIC_API_KEY. The platform reads the key fromAuthorization: Beareronly;ANTHROPIC_API_KEYis sent asx-api-keyand returns401. - Claude Code uses its small
haikualias for background work. Point the three aliases at ModelSite model IDs as above, or those requests ask for models that do not exist here. - Claude Code prints a notice for a model ID it does not recognize and assumes a 200k context window. This is harmless.
GLM models and the effort level
The GLM models (glm-5.3, glm-5.3-flash) support the effort levels low, high and max. When the effort level is set to medium (for example with CLAUDE_CODE_EFFORT_LEVEL=medium or --effort medium), ModelSite runs the request at high. Other chat models accept every level as sent. You do not need to change any setting.
To pick a level explicitly:
export CLAUDE_CODE_EFFORT_LEVEL=high # every session
claude --model glm-5.3-flash --effort low # one sessionCheck it works
claude -p "Reply with exactly one word: pong" --model glm-5.3-flash --max-turns 1You should see pong. A Claude Code request carries a long system prompt (about 9,500 input tokens in our run), so even this one-word check bills a small, non-zero amount.
Limits
- Tool calls and long multi-turn sessions were not part of this check.
- For other coding assistants (Codex CLI, OpenCode, Aider, Cline, Continue), see SDKs, Frameworks and Clients.
Integrations
Connect Claude Code, Open WebUI, n8n, LangChain, the DashScope and Ark SDKs, new-api and LobeChat to ModelSite: settings, a copy-paste check for each, and how each one was verified
Open WebUI
Chat with ModelSite models and generate Seedream images in Open WebUI: connection settings and the image size you must change