Install
openclaw skills install @lv-yezhen/openclaw-model-switcherSwitch the OpenClaw default model safely. Triggers: switch model, change model, 切换模型, 换模型, switch to XX model. Use when the user wants to change the default AI model. Reads openclaw.json, validates the target model exists in the configured provider list, backs up config, modifies only agents.defaults.model.primary, restarts gateway, and auto-rolls back on failure.
openclaw skills install @lv-yezhen/openclaw-model-switcherSwitch the OpenClaw default model with backup, validation, and automatic rollback.
Read ~/.openclaw/openclaw.json. Extract:
agents.defaults.model.primarymodels.providers listMatch user request against available models (exact, alias, or partial match):
zai/glm-5 → direct hitzai/glm-5; "doubao" → volcengine-plan/doubao-seed-2.0-provolcengine-plan/deepseek-v3.2If no match, stop and report:
Never guess or execute blindly.
python3 scripts/model_switch.py <full-model-name> --retry 3
The script handles: backup → modify config → restart gateway → health check → auto-rollback on failure.
Gateway restart kills the current session. This is normal. The session resumes automatically after Gateway recovers.
agents.defaults.model.primary — never touch the provider list~/.openclaw/config_backups/