fix(cli): update TUI status bar model name on provider fallback - #6399
Closed
SeeYangZhi wants to merge 1 commit into
Closed
fix(cli): update TUI status bar model name on provider fallback#6399SeeYangZhi wants to merge 1 commit into
SeeYangZhi wants to merge 1 commit into
Conversation
The status bar reads self.model from the CLI class, which is set once at init and never updated when _try_activate_fallback() switches to a backup provider/model in run_agent.py. This causes the TUI to display the original model name while context_length_max changes, creating a confusing mismatch. Read the model name from agent.model (live, updated by fallback) with self.model as fallback before the agent is created. Remove the redundant getattr(self, 'agent') call that was already done above.
Contributor
|
Merged via salvage PR #6754. Your commit cherry-picked onto current main with authorship preserved. Thank you @SeeYangZhi! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agent.model(live, updated by_try_activate_fallback()) instead ofself.model(stale CLI attribute set once at init)getattr(self, "agent")call already done earlier in the methodFixes #6398
Problem
When provider fallback activates, the TUI status bar shows the original model name while
context_length_maxcorrectly updates to the fallback model's limit — a confusing mismatch.self.modelon the CLI class is set once during__init__and never updated mid-session._try_activate_fallback()inrun_agent.pyswapsagent.modelbut the CLI never sees it.