Omit native multi-agent guidance when native tools are disabled (#59732)

## Why

Multi-agent V2 still supplied native tool usage guidance when native tools were disabled, leaving instructions for unavailable tools in model requests.

## What changed

Skip bundled and model catalog role guidance for both root agents and subagents when `disable_native_tools` is enabled. Preserve explicitly configured usage hints.

## Testing

Add coverage for omitted bundled and catalog guidance and preserved configured hints with native tools disabled. Update the request snapshot and assert that spawned agents do not receive native tool call guidance.

GitOrigin-RevId: 6f2facabc95e78cbf64af19636a4daf488bbcc51
This commit is contained in:
Won Park
2026-11-05 20:43:36 +00:00
committed by copyberry
parent 2e58636d16
commit c8a1109fa7
5 changed files with 35 additions and 28 deletions
@@ -52,6 +52,9 @@ pub(crate) fn resolve_usage_hints(
if base.is_empty() {
return None;
}
if config.disable_native_tools {
return None;
}
Some(MultiAgentRoleInstructions::Composed {
base: base.to_owned(),
marked: message.catalog_override().is_some(),