openclaw - 💡(How to fix) Fix [Bug]: Regression of #68390 — `openclaw models set <alias>` still resolves to bogus `openai/sonnet` on 2026.5.12

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

openclaw models set <alias> still resolves the alias to a bogus <inferred-provider>/<alias> entry instead of looking up the configured alias table. This appears to be a regression of #68390 (closed 2026-04-25); reproduced on 2026.5.12 (f066dd2). Filing as a new issue because #68390 is locked.

Root Cause

Summary

openclaw models set <alias> still resolves the alias to a bogus <inferred-provider>/<alias> entry instead of looking up the configured alias table. This appears to be a regression of #68390 (closed 2026-04-25); reproduced on 2026.5.12 (f066dd2). Filing as a new issue because #68390 is locked.

Fix Action

Fix / Workaround

Workaround is the same as in the original report — pass the fully qualified id: openclaw models set anthropic/claude-sonnet-4-6 resolves correctly.

Impact and severity

Medium. Silent misconfig leaves users on a bogus model id that doesn't exist in any provider catalog; first real chat turn fails. Has a workaround (use fully qualified id) but the alias path is the obvious user-facing one and the failure is silent at config time.

Code Example

$ openclaw models list | grep sonnet
anthropic/claude-sonnet-4-6    text    195k    no    yes    configured,alias:sonnet

---

$ openclaw models set sonnet
Config overwrite: /Users/<me>/.openclaw/openclaw.json (sha256 …)
Updated ~/.openclaw/openclaw.json
Default model: openai/sonnet

$ openclaw models status --plain
[agents/auth-profiles] read anthropic credentials from claude cli keychain
openai/sonnet

---

gateway: auto-enabled plugins for this runtime without writing config:
- openai/sonnet model configured, enabled automatically.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

openclaw models set <alias> still resolves the alias to a bogus <inferred-provider>/<alias> entry instead of looking up the configured alias table. This appears to be a regression of #68390 (closed 2026-04-25); reproduced on 2026.5.12 (f066dd2). Filing as a new issue because #68390 is locked.

Steps to reproduce

  1. Fresh install: npm i -g openclaw@latest (no prior ~/.openclaw config carried over).
  2. Confirm Anthropic Sonnet is registered under its expected alias:
$ openclaw models list | grep sonnet
anthropic/claude-sonnet-4-6    text    195k    no    yes    configured,alias:sonnet
  1. Run openclaw models set sonnet.

Expected behavior

Per #68390's accepted fix scope: the alias sonnet should resolve to anthropic/claude-sonnet-4-6, and agents.defaults.model.primary should be set to that id without creating a new model entry.

Actual behavior

Default is silently written as openai/sonnet, not anthropic/claude-sonnet-4-6:

$ openclaw models set sonnet
Config overwrite: /Users/<me>/.openclaw/openclaw.json (sha256 …)
Updated ~/.openclaw/openclaw.json
Default model: openai/sonnet

$ openclaw models status --plain
[agents/auth-profiles] read anthropic credentials from claude cli keychain
openai/sonnet

On next gateway restart the bogus model is auto-enabled (still without resolving to the real Sonnet):

gateway: auto-enabled plugins for this runtime without writing config:
- openai/sonnet model configured, enabled automatically.

Workaround is the same as in the original report — pass the fully qualified id: openclaw models set anthropic/claude-sonnet-4-6 resolves correctly.

OpenClaw version

2026.5.12 (f066dd2)

Operating system

macOS 15.x (Darwin 25.4.0)

Install method

npm i -g openclaw@latest (prefix ~/.npm-global)

Model

N/A (config-time failure, before any model is invoked)

Provider / routing chain

N/A

Additional provider/model setup details

No prior custom config. ~/.openclaw/openclaw.json written for the first time by openclaw models set sonnet. Auth profile present: anthropic:claude-cli (claude-cli/oauth). Happy to attach the resulting openclaw.json snapshot on request.

Logs, screenshots, and evidence

See Actual behavior section above for the literal models set / models status output and the post-restart gateway log line.

Impact and severity

Medium. Silent misconfig leaves users on a bogus model id that doesn't exist in any provider catalog; first real chat turn fails. Has a workaround (use fully qualified id) but the alias path is the obvious user-facing one and the failure is silent at config time.

Related

  • Regression of #68390 (closed 2026-04-25, locked).
  • Possibly related: #73657, #74423.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Per #68390's accepted fix scope: the alias sonnet should resolve to anthropic/claude-sonnet-4-6, and agents.defaults.model.primary should be set to that id without creating a new model entry.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Regression of #68390 — `openclaw models set <alias>` still resolves to bogus `openai/sonnet` on 2026.5.12