Repository navigation
fix: show exact fallback models in notices and status - #134496
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 4:50 PM ET / 20:50 UTC (Revision 3). ClawSweeper reviewWhat this changesPreserves exact fallback model names and shares terminal-transcript evidence across session diagnostics, /model, and /status so status uses the answering model’s context limit. Merge readiness✅ Ready for maintainer review This remains a useful display repair: current main still collapses literal model prefixes. The earlier producer prerequisite is integrated, the recorded Gateway replay addresses the previous proof request, and no blocking introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s status layer combines configured model selection, session state, and recorded assistant responses. It produces fallback notices, command replies, and Gateway session diagnostics. flowchart TD
A[Selected model] --> D[Fallback display resolver]
B[Session and fallback notice] --> D
C[Bounded terminal transcript] --> D
D --> E{Run and model facts agree?}
E -->|Yes| F[Answering model and context limit]
E -->|No| G[Existing session projection]
F --> H[Status and model displays]
G --> H
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -30, Tests +873, Other -2. Total +841 across 21 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep one bounded fallback projection shared by diagnostics and commands while preserving literal model identities and original session provenance. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main collapses distinct provider-local IDs such as model and custom/model under provider custom. No current-main runtime reproduction was executed during this read-only review. Is this the best way to solve the issue? Yes. Reusing the existing bounded transcript reader and passing prepared model facts removes duplicate interpretation without changing stored selection or introducing a parallel API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against db5371a3b60c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Keep source-authored model overrides while filling omitted capabilities from the same prepared catalog identity. Clear inherited capabilities when the configured API or endpoint changes, and reuse the prepared policy instead of rebuilding its configured catalog. Compose admitted-runtime checks with the public SDK host lifetime and keep internal configuration and authority fields out of prepared results. Retain acquired models through HTTP completion in the affected test flows. Related: #130706, #134496, #143270
Compose admitted model selection with main's retained run resources and preserve configured-default notification in the captured runtime context. Reuse the completion cleanup owner for temporary setup auth and verification files so logical results retain their existing timing while physical cleanup waits for owned work. Keep cleanup assertions and await their test owners. Completes the remaining exact model identity work from #130706 and #134496 through #142100. Model selection, credentials, catalog capabilities, and saved configuration remain tied to the same admitted owner across execution.
Share the bounded, run-verified terminal model projection between Gateway rows, /model and /status without changing stored selection or telemetry. Render the prepared selected and active model facts, preserving literal provider-local prefixes and the original entry's context provenance. Remove duplicate selection and prefix-stripping helpers. Keep unmatched fallback notices on the legacy usage projection path, and validate active context budgets against the original session and final model identity. Refs: #134496, #130706
280d390 to
666dddf
Compare
|
Merged via squash.
|
…34496) Share the bounded, run-verified terminal model projection between Gateway rows, /model and /status without changing stored selection or telemetry. Render the prepared selected and active model facts, preserving literal provider-local prefixes and the original entry's context provenance. Remove duplicate selection and prefix-stripping helpers. Keep unmatched fallback notices on the legacy usage projection path, and validate active context budgets against the original session and final model identity. Refs: openclaw#134496, openclaw#130706
Related: #130706. This is a focused display repair; it does not establish the CPU/stall cause in #130324.
What Problem This Solves
Fixes an issue where
/modeland/statuscould omit the model that answered after fallback, or show its context usage against the selected model's larger window. Fallback notices could also collapse distinct references such ascustom/modelandcustom/custom/modelinto the same label.Why This Change Was Made
Share the existing bounded terminal-transcript reader across Gateway rows and both commands. It accepts an answering model only when the settled run, visible successful assistant message, selected model, and recorded fallback notice agree. The status renderer consumes the prepared model pair and retains the original session entry for auth and context provenance.
Duplicate selection and prefix-stripping helpers are removed. Production code is 30 lines smaller; the obsolete assertion baseline shrinks by two lines. No new configuration, persisted fields, schema, or migration is introduced.
User Impact
Users can distinguish the selected model from the fallback that answered and see the fallback's correct context limit. Repeated fallback notices stay suppressed, recovery clears the notice, and querying status does not change selection or issue a provider request. Previously persisted lossy labels cannot reveal their original identity and are not guessed or reconstructed.
Evidence
Validated commit
666dddf10b6ff4b5a496edbf948551258c1a60b1on main96b5a339f3d9a165bf5c2931b4259a50bf9dafbb, including the separate config repair #144275./model,/status, repeat fallback, recovery, and both recovered commands. Five HTTP requests exercised primary 404/fallback 200 and primary recovery; command queries made zero provider requests./modelshowed selectedcustom/modeland activecustom/custom/model;/statusused the fallback's 128k context window instead of the primary's 1M. Recovery returned status to the primary window. Selection and config stayed unchanged.The earlier standalone dispatcher probe remains failed: it omitted the normal Gateway lifecycle subscriber, so no terminal status or final run ID was persisted, and the process reached its timeout. The successful proof used the real Gateway owner with the same frozen source/build; it did not synthesize lifecycle fields or weaken the reader checks.
Runtime proof uses a synthetic loopback provider and built checkout artifacts, not hosted-provider credentials or an installed npm tarball. Authenticated Telegram callback proof remains waived and is not claimed as passed.