| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Add an optional model parameter to the task tool so a primary agent can choose a subagent model at runtime using "provider/model-id" format. Model selection order: explicit task model -> subagent configured model -> parent assistant message model. Explicit overrides are gated behind a new model_override permission that defaults to "ask", so users control which models agents can switch to without a prompt-injection escalation risk. Also adds test coverage for the existing per-agent model feature (frontmatter model field) which previously had no tests, and tests for the new runtime override including format validation, permission checking, and priority over the agent configured model. Closes anomalyco#17595, anomalyco#32730
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #29447: feat(opencode): add task model override Why it's related: This is the exact same feature mentioned in the PR description. PR #29447 has been waiting for review since May and implements the same task tool model override functionality. The current PR (35800) is an independent implementation of the same feature. |
Sorry, something went wrong.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
|
really need this, i don't have to write a bunch of special agent def files if this get merged. |
Sorry, something went wrong.
|
@pratikranaa It's not clear to me skimming the code if the variant can also be overridden? I think definitely all of these should be possible:
For example, the parent model could be "xhigh" and call a "low" subagent or vice versa. If this is possible already, I think the docs/tool should be updated so it's more visible. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Issue for this PR
Closes #17595, #32730
Type of change
What does this PR do?
Adds an optional model parameter to the task tool so a primary agent can pick a subagent model at runtime using provider/model-id format.
Model priority: explicit model param → subagent configured model frontmatter → parent assistant message model.
Explicit overrides are gated behind a new model_override permission (defaults to ask) to prevent prompt-injection escalation to expensive models.
How did you verify your code works?
Screenshots / recordings
N/A — backend logic change, no UI.
Checklist
Note: #29447 implements the same feature but has been waiting for review since May. This is an independent implementation.