Enable incremental tools by default for Amazon Bedrock (#61426)

## What changed

Enable `incremental_tools_legacy` by default so both Amazon Bedrock providers publish tool declarations through `additional_tools` input items. Users can still opt out by setting `incremental_tools_legacy = false`.

## Testing

Update the incremental tool scenarios to cover the default behavior and explicit opt-out for both Bedrock providers. Adjust the Bedrock multi-agent test to verify collaboration tools in `additional_tools` declarations.

GitOrigin-RevId: 7a54aed24039d178f9b7d7f5a3f49fe4d588ffa7
(cherry picked from commit 27e2227b2b)
This commit is contained in:
Alex Kira
2026-11-16 16:17:01 -08:00
committed by Roy Han
parent 72532ecae5
commit 2c4d576654
3 changed files with 11 additions and 8 deletions
@@ -52,9 +52,12 @@ async fn bedrock_catalog_selects_v2_by_default(
Some(MultiAgentVersion::V2)
);
let request = mock.single_request();
let declarations = request.inputs_of_type("additional_tools");
for tool in ["spawn_agent", "followup_task"] {
assert!(
request.tool_by_name("collaboration", tool).is_some(),
declarations
.iter()
.any(|item| responses::namespace_child_tool(item, "collaboration", tool).is_some()),
"default Bedrock catalog should expose collaboration.{tool}",
);
}
@@ -155,12 +155,12 @@ async fn prediction_fork_keeps_inherited_tools() -> Result<()> {
#[test_case(true, None, true, OPENAI_PROVIDER_ID, &[]; "responses_lite")]
#[test_case(true, Some(true), true, OPENAI_PROVIDER_ID, &[]; "announcements_suppressed")]
#[test_case(false, None, false, OPENAI_PROVIDER_ID, &[]; "responses_api")]
#[test_case(false, None, false, AMAZON_BEDROCK_PROVIDER_ID, &[]; "mantle_default")]
#[test_case(false, None, true, AMAZON_BEDROCK_PROVIDER_ID,
&[(Feature::IncrementalToolsLegacy, true), (Feature::IncrementalToolsLegacyGcp, false)]; "mantle_enabled")]
#[test_case(false, None, false, AMAZON_BEDROCK_RUNTIME_PROVIDER_ID, &[]; "runtime_default")]
#[test_case(false, None, true, AMAZON_BEDROCK_RUNTIME_PROVIDER_ID,
&[(Feature::IncrementalToolsLegacy, true), (Feature::IncrementalToolsLegacyGcp, false)]; "runtime_enabled")]
#[test_case(false, None, true, AMAZON_BEDROCK_PROVIDER_ID, &[]; "mantle_default")]
#[test_case(false, None, false, AMAZON_BEDROCK_PROVIDER_ID,
&[(Feature::IncrementalToolsLegacy, false)]; "mantle_opt_out")]
#[test_case(false, None, true, AMAZON_BEDROCK_RUNTIME_PROVIDER_ID, &[]; "runtime_default")]
#[test_case(false, None, false, AMAZON_BEDROCK_RUNTIME_PROVIDER_ID,
&[(Feature::IncrementalToolsLegacy, false)]; "runtime_opt_out")]
#[test_case(false, None, true, GCP_PROVIDER_ID, &[]; "gcp_default")]
#[test_case(false, None, false, GCP_PROVIDER_ID,
&[(Feature::IncrementalToolsLegacyGcp, false), (Feature::IncrementalToolsLegacy, true)]; "gcp_opt_out")]
+1 -1
View File
@@ -1832,7 +1832,7 @@ pub const FEATURES: &[FeatureSpec] = &[
id: Feature::IncrementalToolsLegacy,
key: "incremental_tools_legacy",
stage: Stage::Stable,
default_enabled: false,
default_enabled: true,
},
FeatureSpec {
id: Feature::IncrementalToolsLegacyGcp,