fix(agents): avoid inviting provider swaps in model alias guidance#85155
fix(agents): avoid inviting provider swaps in model alias guidance#85155extrasmall0 wants to merge 5 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 1, 2026, 5:48 AM ET / 09:48 UTC. Summary PR surface: Source +32, Tests +82. Total +114 across 4 files. Reproducibility: yes. at source level. Current main and v2026.6.11 still render the reported Model Aliases guidance, and current main's resolver preserves slash-form exact refs before alias lookup. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land this only after exact provider/model refs are preserved for every known provider route through a generic provider-known check, plus final-head sessions_spawn proof for exact refs and slash-form aliases. Do we have a high-confidence way to reproduce the issue? Yes, at source level. Current main and v2026.6.11 still render the reported Model Aliases guidance, and current main's resolver preserves slash-form exact refs before alias lookup. Is this the best way to solve the issue? No, not yet. The prompt wording is the right layer, but the resolver repair should preserve exact refs for all known provider routes and the final runtime path needs real behavior proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cf2efbe5d515. Label changesLabel justifications:
Evidence reviewedPR surface: Source +32, Tests +82. Total +114 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Frosted Signal Puff Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
Updated the PR body again so the proof fields now use the gate's exact accepted labels, and the evidence line explicitly points at the terminal output shown below. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
This tightens the model-alias guidance in the right layer. The old phrasing, "full provider/model is also accepted," was ambiguous about priority and left room for the model to treat a provider swap as an acceptable first move. The replacement makes the invariant explicit: qualified provider/model strings pass through verbatim, and aliases are only shortcuts for unqualified requests. The guard conditions ( |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
Updated this to keep slash-form aliases valid while preserving exact provider/model passthrough. Added the focused slash-form alias prompt case. Validated:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Updated this to resolve exact configured aliases before treating a slash-containing value as a provider/model ref. Unknown Validated:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Pushed a small follow-up for the resolver concern. The subagent spawn path now keeps exact built-in provider/model refs like Validation: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
please review thanks |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(agents): avoid inviting provider swaps in model alias guidance This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Closing due to inactivity. |
Summary
Real behavior proof
Behavior or issue addressed: with model aliases configured, the generated system prompt was telling the model to prefer an alias even when an exact
provider/modeloverride was already specified.Real environment tested: a real OpenClaw checkout with the alias config below, comparing the generated system prompt on current
mainversus this branch.Config used:
Exact steps or command run after this patch:
mainEvidence after fix: copied live output from the generated prompt comparison.
Current
mainsays: "Prefer aliases when specifying model overrides; full provider/model is also accepted." It then listscopilot-4.1: github-copilot/gpt-4.1andopenai-4.1: openai/gpt-4.1.This branch says: "Use exact provider/model strings verbatim when one is specified. Aliases are shortcuts for unqualified model requests." It then lists the same alias mappings.
Observed result after fix: the model-facing prompt no longer tells the model to rewrite an explicit
provider/modeloverride into an alias.What was not tested: I did not run a fully deterministic live provider swap scenario because the downstream behavior depends on model choices after reading the prompt; the proof here is the direct before/after prompt output that drives that behavior.
Testing
pnpm vitest src/agents/system-prompt.test.tsCloses #61949