Agent skill · software engineering · daymade
openclaw-model-switch
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).
Why this skill is useful
Adds a script for switching models in OpenClaw that includes specific commands and troubleshooting steps not commonly known.
What it needs
Requires python3 installed locally. About 5k tokens when loaded. Last updated 2026-08-07. 1,320 stars on the source repository.
What this skill does
OpenClaw Model Switch Switch or repair the model used by the running OpenClaw instance. Prefer its validated native configuration commands; retain the bundled file tools for offline and older-version work. Diagnose before you edit. Model failures on OpenClaw are usually NOT the model id — they are key routing (env hijack), provider-plugin restrictions, or endpoint/model mismatch. Changing the model id without checking these first is how a 5-minute fix becomes a 2-hour debugging session. The full trap catalog with discovery commands lives in references/troubleshooting-model-config.md — read it the moment anything errors. Step 1 — Find the real config file(s) Do NOT assume a hardcoded path. Candidate locations (check all, edit all that exist): 1. ~/.openclaw/openclaw.json — the gateway's live config on most installs 2. ~/.kimi/kimi-claw/openclaw.json — Kimi Claw mirror, kept in sync on some installs 3. ~/.kimiopenclaw/openclaw.json — legacy desktop path Confirm which one the gateway actually reads with openclaw gateway status (or its JSON config paths). Select that installation's profile/config context before issuing commands. If several files exist, verify which are maintained mirrors and keep those in sync; existence alone does not prove they belong to the same instance. Reconcile an Ansible or other deployment source too when it owns the default, so the next deployment preserves it. Step 2 — Probe the endpoint + model BEFORE touching config Never trust a relay's model listing (GET /v1/models on new-api style relays is frequently incomplete — a model can be absent from the list yet serve fine). The only authority is a real completion probe from the host that will run the bot: Match the Gateway's effective credential and proxy route. An SSH login shell can inherit a dead proxy that the Gateway does not use; record that difference before interpreting a failed probe. Do not print keys or dump the process's full environment. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills daymade/openclaw-model-switch