
Claude Code starts with the model in ANTHROPIC_MODEL, but you can switch in the middle of your work: a strong model for a big change, a light one for short questions. You do it with the /model command, inside the session.
Switching with /model
Type /model followed by the catalogue id, exactly as it is, with the slash:
/model zai-org/glm-5.2
The switch is immediate. If you type /model on its own, the Claude Code list opens. In that list, Enter switches and saves as your default, and the s key switches for this session only. The catalogue ids may not show in the list: in that case, type the id after /model.
This session only, or the next ones too
| How you switch | What happens |
| /model zai-org/glm-5.2 | Switches now and saves the model as your default: Claude Code writes it to model, in ~/.claude/settings.json. |
| claude --model zai-org/glm-5.2 | Opens a new session with that model, without changing the default. It also lets you run different models in different terminals. |
Why the next session goes back to the old model
If you have ANTHROPIC_MODEL set, in the terminal or in the env of settings.json, that variable wins over the model saved by /model. That is what the Claude Code documentation says. So every new session goes back to the model in the variable. To change the starting model for good, change the value of ANTHROPIC_MODEL.
Before you switch
|
|
|
Each model has its own cache. According to the Claude Code documentation, the first request after a switch reads the whole conversation again, without the cache. Switch models between tasks, not on every question.
Checking the model in use
/status shows the session model. With the Coding Plan, the models in the plan spend points and the others are paid with credits. The list is in the Plan tab.
| A mix that works well: moonshotai/kimi-k2.7-code for everyday work, deepseek-ai/deepseek-v4-pro for big changes and hard bugs, and deepseek-ai/deepseek-v4-flash for short questions. |
|
Want to code with AI in Claude Code? Visit the Coding with AI page. See Coding with AI |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from 321,75 MT/mo (3-year plan, with coupon) See plans |











