Before You Start
This is a model-switching guide for existing GLM Coding Plan users—not an onboarding tutorial. Make sure you have already:- Active GLM Coding Plan subscription and a valid Z.AI API key.
- Configured the correct endpoint for your tool:
- Claude Code / Goose (Anthropic-compatible):
https://api.z.ai/api/anthropic - Codex:
https://api.z.ai/api/v1 - Other OpenAI-compatible tools:
https://api.z.ai/api/coding/paas/v4
- Claude Code / Goose (Anthropic-compatible):
- Verified that your tool can successfully call an existing GLM model (for example,
glm-5.3). If a basic call fails, please resolve that first.
Switching Models in Claude Code
Step 1: Update the default configuration
- macOS
- Windows
- Linux / WSL
- Method 1: In the terminal, run
vim ~/.claude/settings.jsonto open and edit the file. When you’re done, press Esc, type:wq, and save your changes. - Method 2: In Finder, choose Go → Go to Folder, then enter
~/.claude/settings.jsonto locate and edit the configuration file.
settings.json. Do not replace the entire file if it already contains other fields —only add or update the keys shown below.
Enable 1M Context
To enable GLM 1M context, add the[1m] suffix to the model name (e.g., glm-5.3[1m]) and configure the compression window size parameter "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000".
If Claude Code reports that the model with the [1m] suffix does not exist, please upgrade Claude Code to the latest version and try again.
Switch Effort (Thinking Intensity)
In a Claude Code session, type the/effort command to switch thinking intensity. The default level is max.
Processing priority: Explicit Effort > thinking toggle > default
max.
Claude Code uses
thinking.type and output_config.effort; Codex uses reasoning.effort. Disabling the thinking configuration is converted to low and does not switch to another model.Step 2: Confirm that the model has been switched
Open a terminal and runclaude, then type /status. Verify:
- Settings source shows your
~/.claude/settings.json. - Model shows
glm-5.3orglm-5.3[1m].
Switching Models in Other Tools
This currently only works with coding agents that support custom model configuration. If your agent tool does not allow custom model settings, you will need to wait for official support in a future release.Using Cline as an example:
Please use the following settings:- API Provider:Select OpenAI Compatible
- Base URL:Enter https://api.z.ai/api/coding/paas/v4
- API Key:Enter your Z.AI API key
- Model:Choose Custom Model and enter the model name, such as glm-5.3
- Other settings:
- Uncheck Support Images
- Set Context Window Size to 1000000
- Adjust temperature and any other parameters based on your task requirements
