fix(status): surface auto-fallback model in status and session_status (#96126)#101337
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 7, 2026, 2:45 AM ET / 06:45 UTC. Summary PR surface: Source +15, Tests +83. Total +98 across 6 files. Reproducibility: yes. by source inspection: current main gates both CLI status and session_status mismatch copy on user-pinned selections, so an auto fallback override with a different selected model gets no fallback reason. I did not run a live fallback in this read-only review. Review metrics: none identified. 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: Use a shared explicit model-selection reason that only emits fallback wording for actual fallback state, leaves configured auto subagent selections silent or correctly labeled, and then require redacted real fallback proof for CLI status and session_status. Do we have a high-confidence way to reproduce the issue? Yes by source inspection: current main gates both CLI status and session_status mismatch copy on user-pinned selections, so an auto fallback override with a different selected model gets no fallback reason. I did not run a live fallback in this read-only review. Is this the best way to solve the issue? No. The patch is in the right surfaces, but the fallback heuristic is too broad because configured automatic subagent model selections also persist modelOverrideSource: "auto" and modelOverride. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against de152b1f65a6. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +15, Tests +83. Total +98 across 6 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
Review history (3 earlier review cycles) |
fix(status): surface auto-fallback model in status and session_status (openclaw#96126) When a session falls back to an alternate model via auto-fallback (modelOverrideSource: "auto"), both `openclaw status` and `session_status` silently showed the active fallback model without indicating it differs from the configured primary. The mismatch gate used hasUserPinnedModelSelection() which returns false for auto-fallback. - status.summary.ts: widen mismatch gate from hasUserPinnedModelSelection to entry?.modelOverride != null; emit distinct "fallback selected" reason alongside existing "session override" - status.command-sections.ts: add fallback-specific wording ("auto fallback" / "check provider availability") while keeping the modelSelectionReason filter intact (no false-positive null-reason rows) - status-message.ts: add sessionHasAutoFallback detection for the session_status RPC path; show "auto fallback" / "check provider" label instead of "pinned session" / "clear /model default" Co-Authored-By: Claude <[email protected]> @
76324aa to
e55a808
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Replace entry?.modelOverride != null with hasSessionAutoModelFallbackProvenance(entry) to avoid mislabeling configured subagent automatic model selections as provider fallback. Co-Authored-By: Claude <[email protected]>
Co-authored-by: LZY3538 <[email protected]>
|
Merged via squash.
|
…openclaw#96126) (openclaw#101337) * @ fix(status): surface auto-fallback model in status and session_status (openclaw#96126) When a session falls back to an alternate model via auto-fallback (modelOverrideSource: "auto"), both `openclaw status` and `session_status` silently showed the active fallback model without indicating it differs from the configured primary. The mismatch gate used hasUserPinnedModelSelection() which returns false for auto-fallback. - status.summary.ts: widen mismatch gate from hasUserPinnedModelSelection to entry?.modelOverride != null; emit distinct "fallback selected" reason alongside existing "session override" - status.command-sections.ts: add fallback-specific wording ("auto fallback" / "check provider availability") while keeping the modelSelectionReason filter intact (no false-positive null-reason rows) - status-message.ts: add sessionHasAutoFallback detection for the session_status RPC path; show "auto fallback" / "check provider" label instead of "pinned session" / "clear /model default" Co-Authored-By: Claude <[email protected]> @ * fix(status): narrow fallback detection to real fallback provenance Replace entry?.modelOverride != null with hasSessionAutoModelFallbackProvenance(entry) to avoid mislabeling configured subagent automatic model selections as provider fallback. Co-Authored-By: Claude <[email protected]> * fix(status): distinguish configured models from fallback Co-authored-by: LZY3538 <[email protected]> --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…openclaw#96126) (openclaw#101337) * @ fix(status): surface auto-fallback model in status and session_status (openclaw#96126) When a session falls back to an alternate model via auto-fallback (modelOverrideSource: "auto"), both `openclaw status` and `session_status` silently showed the active fallback model without indicating it differs from the configured primary. The mismatch gate used hasUserPinnedModelSelection() which returns false for auto-fallback. - status.summary.ts: widen mismatch gate from hasUserPinnedModelSelection to entry?.modelOverride != null; emit distinct "fallback selected" reason alongside existing "session override" - status.command-sections.ts: add fallback-specific wording ("auto fallback" / "check provider availability") while keeping the modelSelectionReason filter intact (no false-positive null-reason rows) - status-message.ts: add sessionHasAutoFallback detection for the session_status RPC path; show "auto fallback" / "check provider" label instead of "pinned session" / "clear /model default" Co-Authored-By: Claude <[email protected]> @ * fix(status): narrow fallback detection to real fallback provenance Replace entry?.modelOverride != null with hasSessionAutoModelFallbackProvenance(entry) to avoid mislabeling configured subagent automatic model selections as provider fallback. Co-Authored-By: Claude <[email protected]> * fix(status): distinguish configured models from fallback Co-authored-by: LZY3538 <[email protected]> --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Summary
Fixes #96126.
openclaw statusandsession_statusnow identify an active automatic model fallback without mistaking user-selected models, runtime snapshots, aliases, or configured subagent models for provider failover.What Problem This Solves
Status output showed the active model but did not explain when automatic provider fallback selected it instead of the configured primary. That made a provider outage look like an unexplained configuration change.
Why This Change Was Made
Both status surfaces now carry a closed reason for a configured-versus-selected mismatch:
/model defaultrecovery action;The maintainer repair adds a shared active-fallback predicate at the session-provenance owner. A configured subagent intentionally stores automatic self-origin metadata so cleanup preserves its configured model; only an effective selection that differs from that recorded origin is provider failover.
User Impact
openclaw statuslabels real fallback rows asauto fallbackand suggests checking provider availability.session_statusshows the configured primary next to the live fallback model.Evidence
cbx_5b68069a77a2, exact headfd30f4666d7d80284d623073a5a1f59864a349e7:run_921884422a68: 39 focused tests passed across the provenance helper, CLI status summary/sections, andsession_status.run_dde974d8aa34:pnpm check:changedpassed, including project type checks, lint/format guards, and dependency/import checks.Co-authored-by: LZY3538 [email protected]