Skip to content

[FEATURE]: Support for Model Variants in (sub)agents #6645

@Blankf

Description

@Blankf

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

When having multiple variants of an model configured.
it would be good to have the agent config point to a specific model variant.

// Global Model Configuration
"anthropic/claude-sonnet-4-5": {
  "name": "anthropic/claude-sonnet-4-5",
  "variants": {
    "thinking": {
      "thinking": {
        "type": "enabled",
        "budget_tokens": 1600
      },
      "max_tokens": 2000
    },
    "fast": {
      "thinking": {
        "type": "disabled"
      }
    }
  }
}

would result in something like

---
description: Performs security audits and identifies vulnerabilities
mode: subagent
model: anthropic/claude-sonnet-4-5:fast
tools:
  write: false
  edit: false
---

You are a security expert. Focus on identifying potential security issues. 
Analyze the provided code and identify vulnerabilities such as SQL injection, 
XSS, or insecure dependency versions.

when i use a config with variants an did not specify any it takes the default model but that seems to prefer thinking.

it errors with

{"message":"The model returned the following errors: messages.1.content.0.type: Expected `thinking` or `redacted_thinking`, but found `text`. When `thinking` is enabled, a final `assistant` message must start with a thinking block (preceeding the lastmost set of `tool_use` and `tool_result` blocks). We recommend you include thinking blocks from previous turns. To avoid this requirement, disable `thinking`. Please consult our documentation at https://docs.claude.com/en/docs/build-with-claude/extended-thinking"}. Received Model Group=anthropic/claude-4-5-sonnet
Available Model Group Fallbacks=Non

when i use a simpel model config

    "anthropic/claude-4-5-sonnet": {
    	"name": "anthropic/claude-4-5-sonnet",
    	"options": {
    		"thinking": {
    			"type": "disabled"
    		}
    	}
    },
---
description: Performs security audits and identifies vulnerabilities
mode: subagent
tools:
  write: false
  edit: false
---

it does work! it takes that model and performs the actions as the security auditor.

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions