feat: allow spawn_agent model and reasoning effort override (#27385)

This commit is contained in:
Michael Suchacz
2026-07-22 18:43:22 +02:00
committed by GitHub
parent 8a3fb04510
commit 02fd1cc691
14 changed files with 1191 additions and 46 deletions
+2 -1
View File
@@ -187,7 +187,8 @@ parallel.
| Tool | What it does |
|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `spawn_agent` (`type=general` or `explore`) | Delegates a task to a sub-agent with its own context window. |
| `spawn_agent` (`type=general` or `explore`) | Delegates a task to a sub-agent with its own context window. Optionally accepts `model_config_id` and `reasoning_effort` to run the child on a specific enabled model instead of the configured default. |
| `list_subagent_models` | Lists the enabled model configurations the agent can pass to `spawn_agent` as `model_config_id`. |
| `wait_agent` | Waits for a sub-agent to finish and collects its result. |
| `message_agent` | Sends a follow-up message to a running sub-agent. |
| `interrupt_agent` | Halts a sub-agent's current turn; it transitions to waiting or running if there are queued messages. |
+3 -2
View File
@@ -245,7 +245,8 @@ tasks:
| `process_list` | List all tracked processes in the workspace |
| `process_signal` | Send a signal (terminate/kill) to a tracked process |
| `attach_file` | Attach a workspace file to the chat as a durable downloadable attachment |
| `spawn_agent` (`type=general` or `explore`) | Delegate a task to a sub-agent running in parallel |
| `spawn_agent` (`type=general` or `explore`) | Delegate a task to a sub-agent running in parallel, optionally on a specific model |
| `list_subagent_models` | List the models available for `spawn_agent`'s `model_config_id` argument |
| `wait_agent` | Wait for a sub-agent to complete and collect its result |
| `message_agent` | Send a follow-up message to a running sub-agent |
| `interrupt_agent` | Halt a sub-agent's current turn; it transitions to waiting or running if there are queued messages |
@@ -261,7 +262,7 @@ the workspace.
Platform tools (`list_templates`, `read_template`, `create_workspace`,
`start_workspace`, `propose_plan`, `ask_user_question`) and orchestration tools (`spawn_agent`,
`wait_agent`, `message_agent`, `interrupt_agent`, `list_agents`)
`list_subagent_models`, `wait_agent`, `message_agent`, `interrupt_agent`, `list_agents`)
are only available to root chats. Sub-agents do not have access to these
tools and cannot create workspaces or spawn further sub-agents.
+9 -1
View File
@@ -269,12 +269,20 @@ The configurable contexts:
Resolution order, evaluated per chat or subagent:
1. Explicit `model_config_id` on the `spawn_agent` tool call (general and
explore subagents only).
1. Personal override (when the admin gate is on and a model is set).
1. Admin subagent override.
1. The chat's selected model (or the deployment default for new chats).
If a referenced model is later disabled or deleted, that layer is skipped
and resolution falls through to the next.
and resolution falls through to the next. Explicit `spawn_agent` selection
is different: an unusable `model_config_id` fails the tool call instead of
falling through. Agents discover selectable models (and their reasoning
effort ranges) with the `list_subagent_models` tool, which only returns
enabled models usable with the chat owner's credentials. Computer-use
subagents always run on the administrator-configured computer-use model and
reject explicit model selection.
> [!NOTE]
> Both override layers are experimental and may change between releases.