Add service tier overrides to spawned agents#22139
Conversation
jif-oai
left a comment
There was a problem hiding this comment.
Let's simplify a bit the tests but that's good for me
|
|
||
| const SPAWN_AGENT_INHERITED_MODEL_GUIDANCE: &str = "Spawned agents inherit your current model by default. Omit `model` to use that preferred default; set `model` only when an explicit override is needed."; | ||
| const SPAWN_AGENT_MODEL_OVERRIDE_DESCRIPTION: &str = "Optional model override for the new agent. Leave unset to inherit the same model as the parent, which is the preferred default. Only set this when the user explicitly asks for a different model or the task clearly requires one."; | ||
| const SPAWN_AGENT_SERVICE_TIER_OVERRIDE_DESCRIPTION: &str = "Optional service tier override for the new agent. Leave unset unless the user explicitly asks for a service tier override. When unset, the spawned agent inherits the parent's active service tier if its effective model supports it; otherwise no service tier is used."; |
There was a problem hiding this comment.
"When unset, the spawned agent inherits the parent's active service tier if its effective model supports it; otherwise no service tier is used."
This sounds like a lot of information for 0-shot (and so consuming some useless tokens
| @@ -444,6 +445,311 @@ async fn multi_agent_v2_spawn_defaults_to_full_fork_and_rejects_child_model_over | |||
| ); | |||
| } | |||
|
|
|||
There was a problem hiding this comment.
this is a lot of tests to test every single combination. But could we have just one test that has multiple assertion? This would unclog a bit CI
| requested_service_tier: Option<&str>, | ||
| ) -> Result<(), FunctionCallError> { | ||
| let Some(candidate_service_tier) = requested_service_tier.or(parent_service_tier) else { | ||
| config.service_tier = None; |
There was a problem hiding this comment.
Do really want to set it to None? I feel like we should just ignore but keep what was already in the config
jif-oai
left a comment
There was a problem hiding this comment.
Let's simplify a bit the tests but that's good for me
Why
Spawned agents can already override
modelandreasoning_effort, but they have no equivalent way to opt into a model-supported service tier. That makes it impossible to preserve or intentionally select tiered execution behavior when delegating work to a sub-agent, even though the model catalog already advertises supportedservice_tiers.What changed
service_tierto both legacy andMultiAgentV2spawn_agenttool inputs.spawn_agenttool guidance.service_tierusable on full-history forks, while still honoring the existing model/reasoning fork restrictions.service_tieralongside other spawn metadata whenhide_spawn_agent_metadatais enabled.Verification
Added focused coverage for:
spawn_agentschema exposure forservice_tierLocal Rust tests were not run in this workspace per repo guidance; the new coverage is included for CI.