Repository navigation
fix(tui): drop a fusion leg's model pin when the leg moves to another provider - #620
Open
sosidudku1 wants to merge 2 commits into
Open
sosidudku1 wants to merge 2 commits into
sosidudku1 wants to merge 2 commits into
Conversation
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.
What
Re-applying fusion with a different orchestrator or worker provider (
setRunModeInConfig, the TUI run-mode switch) merged the new provider pin over the stored fusion block but kept the storedorchestratorModel/workerModel. Those pins name a model of the previous provider, so the new leg was displayed and priced as the old model.setRunModeInConfignow drops a leg's model pin when that leg moves to a different provider, unless the same change sets a new model pin. Re-applying the same provider keeps the pin; the other leg's pin is untouched. A model pin on a leg that was never pinned to a provider is left alone, the same rule #597 uses for removal.Sibling of #597 (which does the same when a provider is removed). The two touch different files and do not conflict.
Tests
src/tui/persist-run-mode.test.ts: five new cases. Two reproduce the bug and fail on main (both legs move, only one leg moves); three guard the cases that must not change (legs re-applied unchanged, model pin on a leg with no provider pin, new pin comes with the move).npm run lintclean;npx vitest run src/tui/persist-run-mode.test.ts src/tui/run-mode src/config/llm-run-mode-config.test.ts: 70/70.