AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

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/models listings are often incomplete.
  • Runs scripts/switch-model.py to back up configs, add the model definition, set agents.defaults.model.primary, and restart the gateway.
  • Forces mandatory end-to-end verification via one real agent turn, checking result: success and fallbackUsed: false.
  • Ships a symptom → trap table: env KIMI_API_KEY hijacking 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

  1. "Upgrade OpenClaw to k3" → confirm config path → curl probe returns HTTP 200 → switch-model.py k3 --restart → verify with an agent turn.
  2. "Bot throws Invalid token although the same token works in curl" → diagnosed as trap #1, an environment variable hijacking the provider key.
  3. "Thinking level \"max\" is not supported" → guided workaround using a custom provider or params.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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI 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.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/daymade/claude-code-skills.git
  3. Create the skills directory: mkdir -p ~/.claude/skills
  4. Copy just this skill: cp -r claude-code-skills/openclaw-model-switch ~/.claude/skills/
  5. Verify with ls ~/.claude/skills/openclaw-model-switch — you should see SKILL.md, scripts/, and references/.
  6. Restart Claude Code and ask something like "switch my OpenClaw model to k3".
  7. Prerequisites: the openclaw CLI, python3, curl, and your relay baseUrl/apiKey. Never commit config files containing API keys to version control.