#6750: fix(tui): show session model overrides in status bar
gateway
Cluster:
Session Management Enhancements
## Problem
The TUI status bar was showing the default model (e.g., `anthropic/claude-sonnet-4-5`) instead of session-level model overrides. When using `session_status` or `/model` to change models, the footer wouldn't update to reflect the new model.
## Cause
`sessions.list` returned `entry.model` and `entry.modelProvider`, but model overrides are stored in `entry.modelOverride` and `entry.providerOverride`. The TUI's `refreshSessionInfo()` was therefore getting the wrong (non-overridden) model values.
## Solution
Make `sessions.list` prefer the override fields when present:
```typescript
modelProvider: entry?.providerOverride ?? entry?.modelProvider,
model: entry?.modelOverride ?? entry?.model,
```
This allows the TUI footer to correctly display the effective model after session-level model changes.
## Testing
After this fix:
1. Run `openclaw` TUI
2. Change model via `/model opus` or agent's `session_status` tool
3. Footer should now show the updated model (e.g., `anthropic/claude-opus-4-5`)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR updates the gateway’s `sessions.list` mapping so the TUI status bar reflects the *effective* session model after `/model` or `session_status` changes. Specifically, `listSessionsFromStore` now prefers `entry.modelOverride`/`entry.providerOverride` over the base `entry.model`/`entry.modelProvider` when populating `GatewaySessionRow.model` and `.modelProvider`.
The change is localized to `src/gateway/session-utils.ts` and aligns the list output with existing “effective model” logic already used elsewhere (e.g., `resolveSessionModelRef`).
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- The change is a small, targeted field selection adjustment in `sessions.list` output and matches existing override semantics used in `resolveSessionModelRef`. No control flow changes, no API surface changes beyond returning more accurate values when overrides exist.
- No files require special attention
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#21932: fix(tui): eliminate stale model indicator lag in TUI
by graysurf · 2026-02-20
87.0%
#21791: feat(TUI): show main agent model in status footer
by chansuke · 2026-02-20
83.9%
#8083: fix(tui): update model status immediately after /model command
by rohanjangala · 2026-02-03
83.1%
#19087: fix(sessions): sync display fields on model switch
by Suksham-sharma · 2026-02-17
82.8%
#21615: fix(tui): preserve main session model during heartbeat model override
by lailoo · 2026-02-20
81.6%
#16478: fix(gateway): fall back to lookupContextTokens on model switch
by colddonkey · 2026-02-14
81.4%
#11109: fix(tui): prefer config contextTokens over persisted session value
by marezgui · 2026-02-07
81.0%
#7794: fix(tui): refresh session info periodically to reflect config changes
by GuoxiangZu · 2026-02-03
80.3%
#17414: fix(sessions): refresh contextTokens when model override changes
by michaelbship · 2026-02-15
79.2%
#21847: fix(session): /new and /reset no longer carry over model overrides
by hydro13 · 2026-02-20
78.8%