opencode
opencode copied to clipboard
feat: add config setting to avoid subagents models overriding session model
What does this PR do?
Adds a new config setting which, when enabled, stops models used in subagents and commands from bubbling up and overriding the main session model on completion.
I am unsure if this is a bug or intended behaviour. It seems like odd behaviour to me that running subagents would modify the parent session's model (and I'd very much not like to have to add a config setting) but I couldn't really be certain based on the comment above it.
How did you verify your code works?
Ran it locally and confirmed behaviour was fixed. Ran tests.
Fixes #7430