chore: enable namespace tools for Bedrock (#24713)

Client-side namespace tools are now supported by bedrock. Enable
`namespace_tools` for the Amazon Bedrock provider while continuing to
disable unsupported hosted tools such as image generation and web
search.
This commit is contained in:
Celia Chen
2026-05-27 12:39:01 -07:00
committed by GitHub
Unverified
parent 6b4b15a1ed
commit 07a930138f
3 changed files with 13 additions and 13 deletions
@@ -60,7 +60,7 @@ async fn read_amazon_bedrock_provider_capabilities() -> Result<()> {
let received: ModelProviderCapabilitiesReadResponse = to_response(response)?;
let expected = ModelProviderCapabilitiesReadResponse {
namespace_tools: false,
namespace_tools: true,
image_generation: false,
web_search: false,
};
+9 -9
View File
@@ -526,7 +526,7 @@ async fn mcp_and_tool_search_follow_direct_and_deferred_tool_exposure() {
"read_mcp_resource",
]);
let missing_namespace_capability = probe_with(
let bedrock_namespace_capability = probe_with(
|turn| {
turn.model_info.supports_search_tool = true;
use_bedrock_provider(turn);
@@ -537,7 +537,7 @@ async fn mcp_and_tool_search_follow_direct_and_deferred_tool_exposure() {
},
)
.await;
missing_namespace_capability.assert_visible_lacks(&["tool_search"]);
bedrock_namespace_capability.assert_visible_contains(&["tool_search"]);
let enabled = probe_with(
|turn| {
@@ -890,7 +890,7 @@ async fn multi_agent_v2_can_use_configured_tool_namespace() {
}
#[tokio::test]
async fn multi_agent_v2_namespace_is_ignored_without_provider_namespace_support() {
async fn multi_agent_v2_namespace_is_supported_by_bedrock_provider() {
let plan = probe(|turn| {
set_feature(turn, Feature::MultiAgentV2, /*enabled*/ true);
update_config(turn, |config| {
@@ -900,15 +900,15 @@ async fn multi_agent_v2_namespace_is_ignored_without_provider_namespace_support(
})
.await;
plan.assert_visible_contains(&["spawn_agent", "send_message", "list_agents"]);
plan.assert_visible_lacks(&["agents"]);
assert!(
plan.registered_names
.contains(&ToolName::plain("spawn_agent").to_string())
);
plan.assert_visible_contains(&["agents"]);
plan.assert_visible_lacks(&["spawn_agent", "send_message", "list_agents"]);
assert!(
!plan
.registered_names
.contains(&ToolName::plain("spawn_agent").to_string())
);
assert!(
plan.registered_names
.contains(&ToolName::namespaced("agents", "spawn_agent").to_string())
);
}
@@ -57,7 +57,7 @@ impl ModelProvider for AmazonBedrockModelProvider {
fn capabilities(&self) -> ProviderCapabilities {
ProviderCapabilities {
namespace_tools: false,
namespace_tools: true,
image_generation: false,
web_search: false,
}
@@ -131,7 +131,7 @@ mod tests {
}
#[test]
fn capabilities_disable_unsupported_launch_features() {
fn capabilities_disable_unsupported_hosted_tools() {
let provider = AmazonBedrockModelProvider::new(
ModelProviderInfo::create_amazon_bedrock_provider(/*aws*/ None),
);
@@ -139,7 +139,7 @@ mod tests {
assert_eq!(
provider.capabilities(),
ProviderCapabilities {
namespace_tools: false,
namespace_tools: true,
image_generation: false,
web_search: false,
}