-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(tui): respect model-agent selection in the home screen #4741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
Overlaps with #4514 - please close this one if that one is the desired fix. |
|
@ucirello is this still a wip? Also if you wanna get it into the correct state ill just close the AI one that was a one shot and a poor one |
|
@rekram1-node - it is good, in the sense that I think it is write. But I didn't want to crowd the AI attempt out. I am going to mark this as ready to review. |
|
@rekram1-node -- I will make one more set of tests, and then I'd ping you, if that's OK. |
|
yeah no problem ping me anytime |
5e44583 to
91277a0
Compare
|
@rekram1-node I think it is OK now. |
|
This does introduce a regression, and note that none of my agents have a hardcoded model id. Now my model selections are persisted but not used regression.mov |
|
@rekram1-node -- moving this to WIP, and digging harder for the issue. |
91277a0 to
68ac1e8
Compare
|
@rekram1-node -- I dug further - and I think I validated the behavior thoroughly. |
68ac1e8 to
067630d
Compare
|
But now if I switch agents and don't have a model set in my config, it resets the model each time. Also it isn't a huge deal but it wipes your last used model for people so if someone upgraded and opened opencode it wouldnt start up with their actual last used model |
|
@rekram1-node -- thank you for working with me. Let me try it harder - thank you. |
067630d to
c427ada
Compare
|
OK - as of c427ada, I think each agent remembers its own model selection independently, so switching between agents no longer causes one agent's model to leak into another. I tested this by assigning different models to Build, Plan, and Docs, then cycling through them repeatedly to confirm no cross-contamination. I also verified that agents with hard-coded models in their config files cannot be overridden through the UI. Then, I sent messages to each agent and confirmed the responses matched the expected model. At last, I check for the persistence across restarts and simulated an upgrade scenario where an existing user with only recent history (no per-agent selections) correctly falls back to their last-used model while hard-coded agents would still take precedence. |
c427ada to
f0c631e
Compare
|
@rekram1-node I should be closer - I tried to test more scenarios, and I tried to find some more. If there is a regression, then I guess it wouldn't be an obvious one. We are getting closer - thanks for working with me. |
|
sounds good, want me to take another look? |
|
@rekram1-node -- yes please. |
8a98ce2 to
61b21aa
Compare
|
Now if I hardcode a model and switch to the agent with hardcoded model the model doesnt change to the specified one |
I will try and address these two additional cases. |
f8ee907 to
6a9856d
Compare
61b21aa to
df4ad3e
Compare
|
I covered these scenarios:
Is there any other scenario that I should cover? |
1416bf8 to
6328a6f
Compare
6328a6f to
caad444
Compare
|
@ucirello so close this is almost perfect. Only thing now is that if I hardcode an agent model, then i have that agent selected, then try to change models. It is impossible to do now |
|
@rekram1-node -- thank you for checking it and for working with me. We'll get there! Ping when I am done with this round of changes. |




This PR restores the agent-model tuple switching behavior of pre-v1.0.
Closes #4344