mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
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:
@@ -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())
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user