Add ability to change the model from the browser #3210
Draft
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.
This adds the ability to change the model from the browser. There are 3 methods shown here under
do_model_selector
(first two commented out). I don't know aider I tried having aider do so it mostly generated the first solution. The current implementation is closest to what I think happens on the command line but the command line really throws nearly everything away so it may not be doing that as well.If the current implementation is best ill simplify this down to remove the code I didn't end up needing. The second method self.get_coder which called cli_main again (and thus the force_model changes in cli_main) are the only reason cli_main has force_model so that would be removed if that method isn't used.
It works thats about all I can attest to.