You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The built-in amazon-bedrock provider sets namespace_tools: true in its capabilities (mod.rs:60). This causes Codex to serialize tools using the {"type": "namespace", ...} wrapper format. However, Bedrock Mantle's Responses API schema validator only accepts "function" and "mcp" tool types, rejecting "namespace" with:
{"error":{"code":"validation_error","message":"Failed to deserialize the JSON body into the target type: ?[13]: Invalid 'tools': unknown variant `namespace`, expected `function` or `mcp` at line 1 column 107773","param":null,"type":"invalid_request_error"}}
This is a separate issue from the URL path bug (#23650 / #21352). Even after fixing the /openai/v1 → /v1 path, users with any meaningful number of tools (MCP servers, built-in shell/apply_patch, etc.) will hit this error because namespace_tools: true wraps all tool definitions in the unsupported format.
Use the amazon-bedrock provider with default config (any registered MCP servers or built-in tools)
Run codex exec "hello" → HTTP 400 validation_error about namespace
With a minimal config (no MCP, features like code_mode/multi_agent_v2 off), the namespace wrapping doesn't fire for the few remaining tools, so it works. But any real-world config triggers it.
Root Cause
// codex-rs/model-provider/src/amazon_bedrock/mod.rs:58-62fncapabilities(&self) -> ProviderCapabilities{ProviderCapabilities{namespace_tools:true,// ← Mantle doesn't support thisimage_generation:false,web_search:false,}}
When namespace_tools is true, core/src/tools/spec_plan.rs:876 wraps Function tools into Namespace:
The "namespace" tool type is an OpenAI-proprietary extension that Bedrock Mantle has not implemented.
Suggested Fix
fncapabilities(&self) -> ProviderCapabilities{ProviderCapabilities{namespace_tools:false,// Mantle only accepts "function" and "mcp"image_generation:false,web_search:false,}}
Environment
Codex CLI v0.135.0
Bedrock Mantle all regions (us-east-1, us-west-2, etc.)
Bug
The built-in
amazon-bedrockprovider setsnamespace_tools: truein its capabilities (mod.rs:60). This causes Codex to serialize tools using the{"type": "namespace", ...}wrapper format. However, Bedrock Mantle's Responses API schema validator only accepts"function"and"mcp"tool types, rejecting"namespace"with:{"error":{"code":"validation_error","message":"Failed to deserialize the JSON body into the target type: ?[13]: Invalid 'tools': unknown variant `namespace`, expected `function` or `mcp` at line 1 column 107773","param":null,"type":"invalid_request_error"}}This is a separate issue from the URL path bug (#23650 / #21352). Even after fixing the
/openai/v1→/v1path, users with any meaningful number of tools (MCP servers, built-in shell/apply_patch, etc.) will hit this error becausenamespace_tools: truewraps all tool definitions in the unsupported format.Reproduction
amazon-bedrockprovider with default config (any registered MCP servers or built-in tools)codex exec "hello"→ HTTP 400 validation_error aboutnamespaceWith a minimal config (no MCP, features like code_mode/multi_agent_v2 off), the namespace wrapping doesn't fire for the few remaining tools, so it works. But any real-world config triggers it.
Root Cause
When
namespace_toolsis true,core/src/tools/spec_plan.rs:876wrapsFunctiontools intoNamespace:The
"namespace"tool type is an OpenAI-proprietary extension that Bedrock Mantle has not implemented.Suggested Fix
Environment
openai.gpt-oss-120bmodel access