Repository navigation
fix(ui): clarify active model context in picker - #124207
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 15, 2026, 9:13 PM ET / August 16, 2026, 01:13 UTC. ClawSweeper reviewWhat this changesThe PR makes the expanded chat model picker display a selected session’s active context budget separately from the model catalog’s maximum context capacity. Merge readinessKeep open: the picker correctly separates active and maximum context in the demonstrated stable case, but it can still label a stale persisted budget as active after a same-model runtime change. The related producer repair remains open, so this PR needs sequencing or an equivalent provenance-based fix before merge. Priority: P2 Review scores
Verification
How this fits togetherGateway projects a session’s resolved model/runtime alongside its cached context budget, and the Control UI combines that row with the model catalog to render picker metadata. The picker then presents the result to an operator selecting a chat model. flowchart LR
A[Persisted session budget] --> C[Gateway session projection]
B[Current model configuration] --> C
D[Model catalog maximum] --> E[Chat model controls]
C --> E
E --> F[Runtime and model match]
F --> G[Expanded model picker]
G --> H[Operator context information]
Decision needed
Why: The remaining failure is caused by session projection ownership, so only maintainers can choose whether to sequence the linked PRs or consolidate their changes. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +48, Tests +174. Total +222 across 5 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land or incorporate the producer-owned context-window provenance repair from #124303, then rebase this UI work and prove the same-model runtime-transition case renders no stale active budget. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: retain a positive persisted contextTokens value, switch the same model to a new configured runtime, and render the picker after Gateway projects the new runtime with the old budget. Is this the best way to solve the issue? No. The UI runtime/model comparison is a useful guard but cannot establish budget freshness; Gateway must publish producer provenance before the picker labels the value active. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a8857eec0eb5. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
|
Maintainer review at exact head This is independent of the runtime fixes in #120197 and #124137. It is a UI clarification, not a compaction or model-configuration change. The distinction is correct: The latest provider-aware model matching is the right owner-layer repair for the stale-provider finding. One residual state boundary is worth covering if it is not already: before the first native Codex usage event, or immediately after a same-model OpenClaw-to-Codex runtime switch, the session can temporarily retain an older Relationship to our work:
I consider this the right UI seam; it should remain separate from both runtime PRs. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Updated the shared branch without rewriting contributor history. Exact head:
The durable same-model persisted-window freshness seam is intentionally owned by separate producer PR #124303; this PR remains UI-only. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* fix(ui): show active model context budget * fix(ui): simplify compact model label * fix(ui): preserve provider when matching context budget * fix(ui): hide stale context during model switches --------- Co-authored-by: fuller-stack-dev <[email protected]>
Summary
Root cause
The picker rendered only
models.list.contextWindow, which is the model's native capacity. It ignored the selectedsessions.listrow's effectivecontextTokens, so a 272k OpenClaw session appeared to have 1M active context. The first implementation also reconstructed model identity separately and dropped the provider for ambiguous slash-containing IDs; the final patch reuses the canonical server model resolver.Tests
1M · OpenClawopenrouter/google/gemma-4-26b-a4b-itrendered only1M)pnpm ui:i18n:verifypnpm format:checkconfig-safe-writetimeout)Visual proof
Real user-path capture completed on exact head
35779a668cc3c5165babc2fa4a12f01d7beeb20c:agent:main:context-proofsessions.list:272000active tokensmodels.list:1050000native context, OpenClaw runtime272k active · 1M max · OpenClawtbx_01m035f421sc6gttyc4g8jzm4vAgent Transcript
Sanitized, scoped Codex transcript