Loading...
Loading...
Switch or repair the model configuration of an OpenClaw instance (e.g. Kimi k2p6 → k3): change the default model, add model definitions, and fix model-config failures — 401 "Invalid token", "No available channel / model not found", thinking-level rejections ("Thinking level X is not supported"), and config edits that don't take effect. Use whenever the user wants to switch/upgrade/rollback the OpenClaw model (切换模型/换模型/ 升级模型), or says the OpenClaw/龙虾 bot's model is misconfigured (模型配的错了), or the bot falls back / errors on LLM calls.
npx skill4agent add daymade/claude-code-skills openclaw-model-switchopenclaw.json~/.openclaw/openclaw.json~/.kimi/kimi-claw/openclaw.json~/.kimi_openclaw/openclaw.jsonopenclaw gateway statusConfig (service): <path>GET /v1/modelscurl -sS -o /tmp/probe.json -w "HTTP %{http_code}\n" \
-X POST "<baseUrl>/v1/messages" \
-H "Authorization: Bearer <apiKey>" \
-H "Content-Type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d '{"model":"<model-id>","max_tokens":16,"messages":[{"role":"user","content":"hi"}]}'HTTP 200content401 Invalid token503 No available channelpython3 scripts/switch-model.py <model-id> --restart
# target a specific provider instead of the guessed one:
python3 scripts/switch-model.py k3 --provider kimi-relay --restart
# explicit config path (skips discovery):
python3 scripts/switch-model.py k3 --config ~/.openclaw/openclaw.json --restart<config-dir>/config-backups/agents.defaults.model.primary--restartopenclaw agent --local --json --agent main --session-id verify-$(date +%s) -m "ping""result": "success""fallbackUsed": falseagent model: <provider>/<model> (thinking=...)"result": "success"fallbackUsed: true| Symptom | Most likely trap |
|---|---|
| Trap #1 — env |
| Trap #2 — kimi-provider plugin hardcodes binary thinking; bypass with a custom provider |
| Trap #2 variant — anthropic-messages base profile; unlock via |
| Trap #3 — model not served for this group/network; listing ≠ availability |
| Edit saved + gateway restarted, nothing changed | Trap #5 — edited the wrong file / mirror not synced |
config-backups/apiKeyheadersenvpython3 -m json.tool openclaw.json > /dev/null