openclaw-model-switch
Agent skill fromdaymade/claude-code-skills
Switches or repairs an OpenClaw instance's model config: changes the default model, adds model definitions, and fixes 401 "Invalid token", "No available channel / model not found", "Thinking level X is not supported", or a config edit that doesn't take effect. Use for 切换模型/换模型/升级模型 or 模型配的错了. Not for plain config audits (use openclaw).
How to install openclaw-model-switch
install openclaw-model-switch
# install the claude-code-skills pack with the skills CLI
npx skills add daymade/claude-code-skills# or add only this skill to Claude Code: copy the folder
openclaw-model-switch/
# into
~/.claude/skills/openclaw-model-switch/ (all projects)
.claude/skills/openclaw-model-switch/ (one project)
1# OpenClaw Model Switch23Switch or repair the model used by the running OpenClaw instance. Prefer its validated native4configuration commands; retain the bundled file tools for offline and older-version work.56**Diagnose before you edit.** Model failures on OpenClaw are usually NOT the model id —7they are key routing (env hijack), provider-plugin restrictions, or endpoint/model mismatch.8Changing the model id without checking these first is how a 5-minute fix becomes a 2-hour9debugging session. The full trap catalog with discovery commands lives in10[references/troubleshooting-model-config.md](references/troubleshooting-model-config.md) — read it11the moment anything errors.1213## Step 1 — Find the real config file(s)1415Do NOT assume a hardcoded path. Candidate locations (check all, edit all that exist):16171. `~/.openclaw/openclaw.json` — the gateway's live config on most installs182. `~/.kimi/kimi-claw/openclaw.json` — Kimi Claw mirror, kept in sync on some installs193. `~/.kimi_openclaw/openclaw.json` — legacy desktop path2021Confirm which one the gateway actually reads with `openclaw gateway status` (or its JSON22config paths). Select that installation's profile/config context before issuing commands.23If several files exist, verify which are maintained mirrors and keep those in sync;24existence alone does not prove they belong to the same instance. Reconcile an Ansible or25other deployment source too when it owns the default, so the next deployment preserves it.26…
Excerpt shown under the repository's MIT license.
