OpenClaw Model Switch
Safely diagnose and edit openclaw.json to switch OpenClaw models and repair 401, "no available channel", and thinking-level errors.
Dev & CodingAdvanced★ 1,323⑂ 212AI score 8/10Last updated: Aug 8, 2026
What it does
- Locates the config file the gateway actually reads (checks
~/.openclaw/openclaw.json, the Kimi Claw mirror, and legacy paths) and keeps all mirrors in sync. - Probes the endpoint and model with a real completion request before editing anything, since relay
/v1/modelslistings are often incomplete. - Runs
scripts/switch-model.pyto back up configs, add the model definition, setagents.defaults.model.primary, and restart the gateway. - Forces mandatory end-to-end verification via one real agent turn, checking
result: successandfallbackUsed: false. - Ships a symptom → trap table: env
KIMI_API_KEYhijacking the wire key, plugin-hardcoded binary thinking, model not served for a group/network, and edits applied to the wrong file.
Who it's for
- Operators running their own OpenClaw / 龙虾 bot who upgrade or roll back models (k2p6 → k3) regularly.
- Anyone stuck on 401s or silent fallbacks after a model change.
- Admins whose config edits keep getting overwritten by mirror sync.
Examples
- "Upgrade OpenClaw to k3" → confirm config path → curl probe returns HTTP 200 →
switch-model.py k3 --restart→ verify with an agent turn. - "Bot throws
Invalid tokenalthough the same token works in curl" → diagnosed as trap #1, an environment variable hijacking the provider key. - "
Thinking level \"max\" is not supported" → guided workaround using a custom provider orparams.canonicalModelId.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/daymade/claude-code-skills/HEAD/openclaw-model-switch/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the openclaw-model-switch folder from the GitHub repo daymade/claude-code-skills into my ~/.claude/skills/openclaw-model-switch/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/daymade/claude-code-skills.git && mkdir -p ~/.claude/skills && cp -r claude-code-skills/openclaw-model-switch ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/daymade/claude-code-skills.git - Create the skills directory:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r claude-code-skills/openclaw-model-switch ~/.claude/skills/ - Verify with
ls ~/.claude/skills/openclaw-model-switch— you should seeSKILL.md,scripts/, andreferences/. - Restart Claude Code and ask something like "switch my OpenClaw model to k3".
- Prerequisites: the
openclawCLI,python3,curl, and your relay baseUrl/apiKey. Never commit config files containing API keys to version control.
View source on GitHub ↗License: MIT