Feature hasn't been suggested before.
Describe the enhancement you want to request
OpenCode could natively support task-aware routing across the models it has already resolved, followed by compatible reasoning-variant selection.
I maintain a plugin that demonstrates this workflow: it makes two decisions for each request:
- Select an eligible agent/model for the task.
- Select a reasoning variant supported by that model (
none, low, medium, high, xhigh, or max, depending on the runtime catalog).
The plugin validates the choice against the runtime model catalog and falls back without sending an unsupported variant. See the example implementation and configuration:
https://github.com/Melivo/opencode-plugin-variantizer
This is related to #34370, #8456, #50729, and #49712, but the useful native primitive here is the two-stage, catalog-aware decision: resolve the available models first, then derive the valid thinking/variant choices for the selected model. That would avoid plugins having to recreate model/variant discovery and would make the behavior consistent across TUI, CLI, and other clients.
Suggested behavior
- Resolve the currently available and authorized model catalog.
- Choose a model/agent based on the task, unless the user explicitly pinned one.
- Choose a reasoning variant only from the selected model's resolved capabilities.
- Preserve explicit user model and variant selections over automatic routing.
- Validate the final model-plus-variant pair before the provider request; use a deterministic fallback when automatic classification is unavailable or invalid.
- Expose the effective model and variant in session metadata or logs so the decision is inspectable.
The classification mechanism could be built in or exposed as a stable native extension point. The core should own catalog resolution, precedence, validation, and safe fallback behavior.
Acceptance criteria
- No unsupported variant is sent to a provider because of automatic routing.
- A user-pinned model or variant is never silently replaced.
- Automatic routing works consistently for interactive and one-shot requests without requiring abort-and-resend.
- The effective model, variant, and fallback outcome are observable for debugging.
Feature hasn't been suggested before.
Describe the enhancement you want to request
OpenCode could natively support task-aware routing across the models it has already resolved, followed by compatible reasoning-variant selection.
I maintain a plugin that demonstrates this workflow: it makes two decisions for each request:
none,low,medium,high,xhigh, ormax, depending on the runtime catalog).The plugin validates the choice against the runtime model catalog and falls back without sending an unsupported variant. See the example implementation and configuration:
https://github.com/Melivo/opencode-plugin-variantizer
This is related to #34370, #8456, #50729, and #49712, but the useful native primitive here is the two-stage, catalog-aware decision: resolve the available models first, then derive the valid thinking/variant choices for the selected model. That would avoid plugins having to recreate model/variant discovery and would make the behavior consistent across TUI, CLI, and other clients.
Suggested behavior
The classification mechanism could be built in or exposed as a stable native extension point. The core should own catalog resolution, precedence, validation, and safe fallback behavior.
Acceptance criteria