-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Resolve model aliases before thinking/capability validation in explicit agent runs #83810
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Explicit agent runs should resolve model aliases before validating thinking/capability support.
Currently, an alias can resolve correctly for the eventual run, but
--thinkingvalidation may still treat the alias text as a literal model name under the default provider. This makes a valid configured alias look invalid and can cause OpenClaw to reject supported thinking levels.Related preset/config UX issue: #83805
Reproduction
Given a model alias configured roughly like this:
{ "agents": { "defaults": { "models": { "codex/gpt-5.5": { "alias": "code", "params": { "thinking": "xhigh" }, "agentRuntime": { "id": "codex" } } } } } }Run an explicit agent command using the alias and a thinking level supported by the target model/runtime:
openclaw agent \ --agent main \ --model code \ --thinking xhigh \ --message "Reply exactly: OK" \ --jsonCurrent behavior
The command can fail during validation before the alias is treated as its configured target. A representative error is:
That indicates the validation path interpreted the alias as
openai/code, rather than first resolvingcode -> codex/gpt-5.5and validating against the resolved provider/model.This is especially confusing because other parts of model selection may later resolve the alias correctly for execution. The operator can see a configured alias and intend one model/runtime, while validation uses a different provider/model interpretation.
Expected behavior
OpenClaw should resolve explicit model aliases before any capability or thinking-level validation.
For the example above:
--model codeshould resolve tocodex/gpt-5.5--thinking xhighshould be validated againstcodex/gpt-5.5Why this matters
A common recommended setup is:
In that setup, aliases such as
codeorcodexare the user-facing control surface. If alias resolution and capability validation disagree, the configuration feels unreliable and users cannot tell which runtime/model will actually be used.Suggested implementation direction
The explicit agent run path should use the same alias-aware model resolution used elsewhere before validating thinking support. Conceptually:
--modelvalue through that alias index.--thinkingagainst the resolved provider/model.Adjacent improvement
The config currently appears oriented around a single
aliasstring per model entry. It would also help to support multiple aliases for the same target, for example:That would let operators provide ergonomic synonyms without duplicating model entries or risking one alias pointing at an older model.
Environment
Observed on OpenClaw
2026.5.18.