-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: /status usage should follow session-selected model after /model switch #93322
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug type
Bug / model switching status regression
Summary
After switching a live session with
/model, the/status/session_statuscard should resolve provider usage from the session-selected model, not from the configured default model/provider.On
OpenClaw 2026.6.6, a live Telegram direct session was pinned toopenai/gpt-5.5, but/statusdisplayed a DeepSeek API balance as the single status-card usage line:That
Balance ¥22.75is the DeepSeek provider balance, while the active session model shown on the same card is OpenAI.Why this is wrong
/modelis session-scoped. Users expect/statusfor that session to answer: "what model/auth/usage is this session currently using?"If the configured default is DeepSeek but the current session is switched to OpenAI,
/statusshould show OpenAI usage/limits.Conversely, if the configured default is OpenAI but the current session is switched to DeepSeek,
/statusshould show DeepSeek usage/balance.The status card should follow the current session's selected/effective model, not the global default model.
Steps to reproduce
/statusor invokesession_statusfor the current session.Expected behavior
The status card should show usage for the session-selected/effective model provider:
or otherwise omit the usage line if OpenAI/Codex usage cannot be resolved.
It should not show DeepSeek balance as the usage line for an OpenAI-selected session.
Actual behavior
/statusshowed the selected model as OpenAI but the usage line as DeepSeek balance:Running
openclaw status --usageon the same host showed both provider usage snapshots, including OpenAI usage, so the OpenAI usage source existed. The bug is specifically that the session status card picked/displayed the wrong provider summary for the current session.Environment
Suspected cause
The status text path appears to mix raw/default provider inputs with session override fields when deciding which provider usage summary to load.
A likely fix is to resolve a single "selected/effective session model" first, using
sessionEntry.providerOverride/sessionEntry.modelOverridewhen present, and use that same resolved provider/model for:currentUsageProvider/ provider usage summary selectionThis also appears related to the broader session model/auth state split tracked in #87957 and model-switch state bugs like #92415.
Acceptance criteria
/model openai/gpt-5.5,/statususage follows OpenAI/Codex usage, not the configured default provider./statususage follows DeepSeek balance/usage./statusandsession_status.