Skip to content

Allow runSubagent tool to specify a language model #298380

@digitarald

Description

@digitarald

Problem

When the LLM invokes the runSubagent built-in tool, the subagent always inherits the parent agent's model (or the custom agent's configured model). There is no way for the LLM to explicitly choose a different model for a subagent invocation, even when the user asks for it (e.g. "use Claude to research this").

Why:

  • Multi-model consensus-based review, multiple models running in different subagents; has a growing fanbase
  • Picking a faster model for quick research tasks

Proposal

Add an optional model parameter to the runSubagent tool schema that accepts a qualified model name in "Model Name (Vendor)" format. The schema should dynamically enumerate available agent-mode-suitable models so the LLM knows which values are valid.

Model resolution priority

  1. Explicit model parameter — if provided and resolved
  2. Agent-configured model — from the custom agent's .agent.md file
  3. Main model — the model running the parent agent

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions