LLM Switcher
by @winlinvip
Change OpenClaw's global default AI model in config, save the change, and restart the gateway after explicit confirmation. Before writing default config, fir...
clawhub install llm-switcherπ About This Skill
name: llm-switcher description: "Change OpenClaw's global default AI model in config, save the change, and restart the gateway after explicit confirmation. Before writing default config, first test model availability by applying a session-only override. Use when the user wants to switch the default model for future sessions and validate it safely first."
Model Switcher
Change the global default LLM model in OpenClaw config, with a session-level availability check first.
Workflow
1) Read config and show available models first
Run:
openclaw config get agents.defaults.models
openclaw config get agents.defaults.model.primary
Extract and show:
openai-codex/gpt-5.3-codex)codex, opus) when presentDo not switch anything before showing options.
2) Ask user to choose model
Ask for the model name they want to set as the global default. Accept:
codex, opusIf the name is not in configured options, reject and ask again with the valid list.
3) Test selected model in current session first (availability/conflict check)
Before changing default config, apply a session-only override and run a live reply test.
In OpenClaw agent/tooling context:
session_status with model=.If override or live reply test fails:
If override and live reply test both succeed:
4) Apply default-config change
Update default model in config:
openclaw config set agents.defaults.model.primary '""'
Then verify:
openclaw config get agents.defaults.model.primary
Never claim success without verification output.
5) Ask before restarting gateway
After updating config, explicitly ask:
Only restart after a clear yes.
6) Restart gateway on confirmation
Run:
openclaw gateway restart
Then verify status:
openclaw gateway status
If restart fails, report the error and suggest:
openclaw gateway stop
openclaw gateway start
openclaw gateway status