Skip to content

[Bug]: Regression of #68390 — openclaw models set <alias> still resolves to bogus openai/sonnet on 2026.5.12 #83233

@dacoliveira-dot

Description

@dacoliveira-dot

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

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions