Honor configured model defaults for spawned agents (#33631)

## What changed

- Apply `agents.default_subagent_model` and
  `agents.default_subagent_reasoning_effort` when a spawn request does not
  provide explicit values, including agent job workers.
- Allow full-history forks to use configured defaults or explicit model and
  reasoning-effort overrides while retaining the parent conversation context.
- Preserve the selected model and reasoning effort when an agent role does not
  override them.

## Testing

- Cover configured defaults, explicit override precedence, full-history forks,
  role application, and agent job workers.

GitOrigin-RevId: b1efa8c9abeee82355088fceef57560433144595
This commit is contained in:
jif authored and copyberry committed 2026-07-16 16:08:43 +00:00
1 parent 0f44bca915
commit 21c37fb374
14 files changed
+299 -155

No files matched your search

+2 -2
View File
@@ -71,12 +71,12 @@ fn render_agents_config_lines(config: &Config) -> Vec<Line<'static>> {
)
.into(),
format!(
" - default_subagent_model = {} (not yet wired)",
" - default_subagent_model = {}",
format_optional(config.agent_default_subagent_model.as_deref())
)
.into(),
format!(
" - default_subagent_reasoning_effort = {} (not yet wired)",
" - default_subagent_reasoning_effort = {}",
format_optional(config.agent_default_subagent_reasoning_effort.as_ref())
)
.into(),