openclaw model switch

Other Community

Skill notes

Step 1 — Find the real config file(s)

Do NOT assume a hardcoded path. Candidate locations (check all, edit all that exist): ~/.openclaw/openclaw.json — the gateway's live config on most installs ~/.kimi/kimi-claw/openclaw.json — Kimi Claw mirror, kept in sync on some installs ~/.kimi_openclaw/openclaw.json — legacy desktop path Confirm which one the gateway actually reads: openclaw gateway status prints

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: Expected: HTTP 200 and a content array in the body. 401 Invalid token with a token you just verified works elsewhere → the wire key is being hijacked (see trap #1 in the

Step 3 — Switch the model

The script: discovers and backs up every candidate config to <config-dir>/config-backups/, adds the model definition if known, sets agents.defaults.model.primary, syncs mirror files, and restarts the gateway with --restart.

Step 4 — Verify end-to-end (mandatory)

A restarted gateway proves nothing. Run one real agent turn and read the result metadata: Success looks like: "result": "success", "fallbackUsed": false, and the gateway log shows agent model: <provider>/<model> (thinking=...). "result": "success" with fallbackUsed: true means your target failed and a fallback saved the turn — the config is still wrong.

Common failures → read the troubleshooting reference

Symptom · Most likely trap LLM error new_api_error: Invalid token, but the token works in curl · Trap #1 — env KIMI_API_KEY hijacks the provider's wire key Thinking level "max" is not supported ... Use one of: off, on · Trap #2 — kimi-provider plugin hardcodes binary thinking; bypass with a custom provider Thinking level ... Use one of: off, minimal, low, medium, high · Trap #2 variant — anthropic-messages base profile; unlock via params.canonicalModelId

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Other
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@daymade · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Required · Vendor-specific
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
Network behavior
External requests
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1 — Find the real config file(s)

Do NOT assume a hardcoded path. Candidate locations (check all, edit all that exist): `~/.openclaw/openclaw.json` — the gateway's live config on most installs `~/.kimi/kimi-claw/openclaw.json` — Kimi Claw mirror, kept in sync on some installs `~/.kimi_openclaw/openclaw.json` — legacy desktop path Confirm which one the gateway actually reads: `openclaw gateway status` prints

02
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: Expected: `HTTP 200` and a `content` array in the body. `401 Invalid token` with a token you just verified works elsewhere → the wire key is being hijacked (see trap #1 in the

03
Step 3 — Switch the model

The script: discovers and backs up every candidate config to `<config-dir>/config-backups/`, adds the model definition if known, sets `agents.defaults.model.primary`, syncs mirror files, and restarts the gateway with `--restart`.

04
Step 4 — Verify end-to-end (mandatory)

A restarted gateway proves nothing. Run one real agent turn and read the result metadata: Success looks like: `"result": "success"`, `"fallbackUsed": false`, and the gateway log shows `agent model: <provider>/<model> (thinking=...)`. `"result": "success"` with `fallbackUsed: true` means your target failed and a fallback saved the turn — the config is still wrong.

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.