[PR #7156] feat: add variant support for subagents (#7138) [alt of #7140] #12277

Open
opened 2026-02-16 18:17:12 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7156

State: open
Merged: No


Summary

Adds agent-level default variant configuration so each agent can define a preferred reasoning effort (e.g., "low", "medium", "high"). User-provided variants still take precedence.

Resolution order: user input > agent config

Changes

Core backend

  • Add variant field to agent config schema
  • Resolve variant in llm.ts using input.user.variant ?? input.agent.variant
  • Subagents use their own configured variant (no parent cascade)

TUI / Desktop

  • Show effective variant in the prompt bar

Example

Agent config:

# .opencode/agent/oracle.md
---
model: anthropic/claude-sonnet-4
variant: "high"
---

Closes #7138

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7156 **State:** open **Merged:** No --- ### Summary Adds agent-level default `variant` configuration so each agent can define a preferred reasoning effort (e.g., "low", "medium", "high"). User-provided variants still take precedence. **Resolution order:** user input > agent config ### Changes **Core backend** - Add `variant` field to agent config schema - Resolve variant in `llm.ts` using `input.user.variant ?? input.agent.variant` - Subagents use their own configured variant (no parent cascade) **TUI / Desktop** - Show effective variant in the prompt bar ### Example Agent config: ```yaml # .opencode/agent/oracle.md --- model: anthropic/claude-sonnet-4 variant: "high" --- ``` Closes #7138
yindo added the pull-request label 2026-02-16 18:17:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12277