You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that subagents called via Task tool can't dynamically select models based on task complexity. Users end up creating duplicate agents (explore-quick, explore-standard, etc.) just to vary models, or waste money using powerful models for simple tasks.
I implemented the unified approach (Solution C) from the issue: added model_tier parameter to Task tool with quick/standard/advanced values. You can configure tier-to-model mappings globally or per-agent, with agent-level overriding global when defined.
Resolution hierarchy:
Agent's explicit model (if set, tier ignored)
Agent-level model_tiers[tier] - if defined
Global model_tiers[tier] - if defined
Parent session model (fallback)
I also added optional variant support to tier configurations (as noted in a later comment on the issue), allowing models to use different reasoning modes.
See #6651 for detailed implementation discussion and configuration examples.
How did you verify your code works?
Tests: Added comprehensive tests covering model tier resolution and variant extraction - 720 total pass, with 12 new tests for the feature (agent tier priority, global tier fallback, variant parsing, and resolution hierarchy).
Manual testing: Have been using this setup locally for about 2 weeks for development work. Configured opencode.json with model_tiers for build and plan agents with different variants. Called Task with different model_tier values daily and verified correct models were used. Confirmed agent tiers override global tiers as expected.
Relation: Earlier work on task delegation and subagent handling; may interact with the model tier selection feature.
These are historical variants/subagent work rather than current duplicates. The current PR (11377) appears to be the primary implementation for model tier selection.
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
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 does this PR do?
Closes #6651
The issue is that subagents called via Task tool can't dynamically select models based on task complexity. Users end up creating duplicate agents (
explore-quick,explore-standard, etc.) just to vary models, or waste money using powerful models for simple tasks.I implemented the unified approach (Solution C) from the issue: added
model_tierparameter to Task tool withquick/standard/advancedvalues. You can configure tier-to-model mappings globally or per-agent, with agent-level overriding global when defined.Resolution hierarchy:
I also added optional
variantsupport to tier configurations (as noted in a later comment on the issue), allowing models to use different reasoning modes.See #6651 for detailed implementation discussion and configuration examples.
How did you verify your code works?
Tests: Added comprehensive tests covering model tier resolution and variant extraction - 720 total pass, with 12 new tests for the feature (agent tier priority, global tier fallback, variant parsing, and resolution hierarchy).
Manual testing: Have been using this setup locally for about 2 weeks for development work. Configured
opencode.jsonwithmodel_tiersfor build and plan agents with different variants. Called Task with differentmodel_tiervalues daily and verified correct models were used. Confirmed agent tiers override global tiers as expected.