Welcome to Raspberry Pi 5 repository
03. OpenClaw Model Switching
OpenClaw Model Switching
OpenClaw Model Switching1. Course Content2. Temporarily Switch Session Model2.1 Open TUI Session2.2 Use /model to Switch Session Model3. Switch Default Model3.1 Switch via CLI3.2 Switch via Configuration File4. Add Model Options List4.1 Add Model via Configuration File4.2 Model Reference Format Specification5. Appendix: CLI Command Quick Reference
1. Course Content
This course will systematically introduce the model selection working mechanism of OpenClaw and three model switching operation methods.
2. Temporarily Switch Session Model
2.1 Open TUI Session
- Input in terminal
openclaw tui
2.2 Use /model to Switch Session Model
| Command | Description |
|---|---|
/model | View available model list, select and switch model |
- Enter
/modelin the conversation box and press Enter. For example, here we select to switch tobailian/qwen3.5-plus. Use keyboard up and down arrows to select the model, then press Enter.


3. Switch Default Model
3.1 Switch via CLI
The simplest way is to use the CLI command to set the default model directly:
- Here we take switching to
bailian/qwen3.6-plusmodel as an example
xxxxxxxxxxopenclaw models set bailian/qwen3.6-plus

3.2 Switch via Configuration File
Edit the
openclaw.jsonconfiguration file to modify the Agent's default modelxxxxxxxxxxnano $HOME/.openclaw/openclaw.json# Or use your favorite editor, such as vim, code, etc.
In openclaw.json, specify the default main model through the agents.defaults.model.primary configuration item:
xxxxxxxxxx{ "agents": { "defaults": { "model": { "primary": "bailian/qwen3.5-plus" } } }}
- Verify if the configuration takes effect:
xxxxxxxxxxopenclaw models status

4. Add Model Options List
agents.defaults.modelsis the allow list/directory that controls the range of usable models in OpenClaw. When this configuration item is set, users can only use models included in the list. This list serves as the model scope control basis for both the/modelcommand and conversation overrides.
4.1 Add Model via Configuration File
Configure agents.defaults.models in openclaw.json and add the models you want to use to the allow list:
xxxxxxxxxx"agents": { "defaults": { "model": { "primary": "bailian/qwen3.5-plus" }, "models": { "bailian/qwen3.5-plus": {}, "bailian/MiniMax-M2.5": {}, "bailian/glm-4.7": {} }, "workspace": "/home/pi/.openclaw/workspace", "compaction": { "mode": "safeguard", "memoryFlush": { "enabled": false } } } }
4.2 Model Reference Format Specification
In OpenClaw, all model references use a unified format:
xxxxxxxxxxprovider/modelID
Examples:
| Model Reference | Description |
|---|---|
anthropic/claude-opus-4-6 | Anthropic's Claude Opus model |
anthropic/claude-sonnet-4-6 | Anthropic's Claude Sonnet model |
openai/gpt-5.4 | OpenAI's GPT-5.4 model |
openrouter/moonshotai/kimi-k2 | Case where model ID itself contains a slash |
Note: If the model ID itself contains
/(such asmoonshotai/kimi-k2), you must provide the complete reference in the formatopenrouter/moonshotai/kimi-k2.
5. Appendix: CLI Command Quick Reference
| Command | Usage |
|---|---|
openclaw onboard | Beginner guide to help quickly complete initial configuration |
openclaw models list | View all configured model lists |
openclaw models status | View current model configuration status details |
/model | View available model list in chat |
/model status | View current model status details in chat |