| name | model-switch |
| description | Switch the Manager Agent's own LLM model. Use when the human admin requests changing the Manager's model. |
Model Switch
Switch the Manager's own LLM model. The script tests connectivity first, then patches openclaw.json.
Usage
bash /opt/hiclaw/agent/skills/model-switch/scripts/update-manager-model.sh <MODEL_ID> [--context-window <SIZE>] [--no-reasoning]
Examples:
bash /opt/hiclaw/agent/skills/model-switch/scripts/update-manager-model.sh claude-sonnet-4-6
bash /opt/hiclaw/agent/skills/model-switch/scripts/update-manager-model.sh my-custom-model --context-window 300000
bash /opt/hiclaw/agent/skills/model-switch/scripts/update-manager-model.sh deepseek-chat --no-reasoning
What the script does
- Strips any
hiclaw-gateway/ prefix from the model name
- Tests the model via
POST /v1/chat/completions on the AI Gateway — exits with error if unreachable
- If the model is already in the
models array: switches agents.defaults.model.primary
- If the model is new: adds it to the
models array and switches primary
- Always outputs
RESTART_REQUIRED
After running the script
The script always outputs RESTART_REQUIRED. Run openclaw gateway restart to apply the change, then tell the human admin the switch is complete.
Reasoning control
By default, reasoning (extended thinking) is enabled. To disable it, pass --no-reasoning.
On failure
If the gateway test fails (non-200), the script outputs ERROR: MODEL_NOT_REACHABLE and exits. No changes are made to .