From 0c44333cfc38d558d9f1e92e8f6898222311aeef Mon Sep 17 00:00:00 2001 From: Suryaansh Date: Wed, 28 Jan 2026 06:36:22 +0530 Subject: [PATCH] Fix TUI footer to show the actual model you're using When you switch models via /models, the footer was still showing the old provider name instead of updating to show what you just selected. This was confusing because the token stats were live but the model name was stuck on the default. The issue was that the footer reads from the session list, which only looked at model/modelProvider fields (set after agent runs). When you manually switch models, it actually sets providerOverride/modelOverride instead, so we need to resolve the effective model considering those overrides. Now calls resolveSessionModelRef() to get the right model name, so the footer immediately reflects what you picked. --- src/gateway/session-utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gateway/session-utils.ts b/src/gateway/session-utils.ts index 164be999e..013b198bd 100644 --- a/src/gateway/session-utils.ts +++ b/src/gateway/session-utils.ts @@ -553,6 +553,7 @@ export function listSessionsFromStore(params: { entry?.label ?? originLabel; const deliveryFields = normalizeSessionDeliveryFields(entry); + const resolvedModel = resolveSessionModelRef(cfg, entry); return { key, entry, @@ -578,8 +579,8 @@ export function listSessionsFromStore(params: { outputTokens: entry?.outputTokens, totalTokens: total, responseUsage: entry?.responseUsage, - modelProvider: entry?.modelProvider, - model: entry?.model, + modelProvider: resolvedModel.provider, + model: resolvedModel.model, contextTokens: entry?.contextTokens, deliveryContext: deliveryFields.deliveryContext, lastChannel: deliveryFields.lastChannel ?? entry?.lastChannel,