Bedrock Runtime: raise the 64-character tool-name limit for MCP interoperability
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
No SDK file or test is identified because the report describes a Bedrock Runtime service-side constraint rather than a Python serialization issue. Reproduce the request using Converse with a 65-character toolSpec.name, then review the linked ToolSpecification API documentation; done means the service supports the requested longer names or documents a supported aliasing mechanism.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Amazon Bedrock Runtime Converse limits toolConfig.tools[].toolSpec.name to 64 characters. Modern MCP clients qualify tool names with a server or application namespace, which can make otherwise valid tool names exceed this limit and cause Bedrock to reject the entire request before inference.
Please consider raising the Bedrock Runtime tool-name limit to at least 128 characters, or providing another service-supported mechanism for stable long-name aliases.
This is a Bedrock Runtime service API compatibility request rather than an SDK serialization bug. It is being filed here because the AWS SDK for Python currently targets Bedrock Runtime and provides a public AWS-owned feedback tracker.
Use case: Codex Apps over Bedrock
OpenAI Codex exposes app tools through MCP using model-visible names shaped like:
mcp__codex_apps__<tool_name>
The namespace consumes 17 characters, leaving only 47 characters for the individual tool name under the Bedrock limit.
Codex originally normalized MCP names to 64 bytes. OpenAI PR #39594 raised that limit to 128 bytes to match the OpenAI Responses API. Consequently, names between 65 and 128 characters are valid in Codex but fail when an OpenAI-compatible gateway forwards the request to Bedrock Runtime.
The Codex regression and reproduction details are tracked here:
https://github.com/openai/codex/issues/46188
Original Codex name-length issue and changes:
- https://github.com/openai/codex/issues/1289
- https://github.com/openai/codex/pull/1571
- https://github.com/openai/codex/pull/39594
Reproduction
- Invoke Bedrock Runtime
Conversewith a model that supports tool use. - Include a
toolSpec.namecontaining 65 valid ASCII characters. - Bedrock rejects the request with a
ValidationExceptionindicating that the member length must be less than or equal to 64.
The same failure occurs when one codex_apps MCP name exceeds the limit because Bedrock validates the complete tool configuration before model execution.
API constraint:
https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ToolSpecification.html
Expected behavior
Ideally, Bedrock Runtime would accept tool names of at least 128 characters consistently across:
ToolSpecification.nameSpecificToolChoice.name- returned
toolUse.namevalues - tool names replayed in conversation history
If the runtime limit cannot be raised, a documented service-supported aliasing or capability-negotiation mechanism would help clients avoid provider-specific request failures.
Current workaround
A proxy deterministically shortens names to 64 characters, preserves uniqueness with a hash suffix, and reverse-maps returned tool calls to their original MCP names. This works but requires every client or gateway to implement its own bidirectional mapping.
Related AWS-owned reports currently work around the same constraint by shortening names rather than changing the Runtime limit:
- https://github.com/aws/bedrock-agentcore-starter-toolkit/issues/308
- https://github.com/awslabs/mcp/issues/2395
Environment
- Client: OpenAI Codex CLI 0.153.2 / Codex Apps MCP tools
- Backend: Amazon Bedrock Runtime through an OpenAI-compatible gateway
- Platform: macOS
- SDK applicability: service-side constraint; reproducible through any AWS SDK exposing
Converse
- Ngôn ngữ chính
- Python
- Star
- 171
- Fork
- 24
- Merge trung bình
- 10 giờ 47 phút
- Pull request đã merge (30 ngày)
- 7
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws/aws-sdk-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/aws-sdk-python#13 ·
-
Support Python 3.11 Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
aws/aws-sdk-python#92 ·
-
announcement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
aws/aws-sdk-python#90 ·
-
announcement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
aws/aws-sdk-python#84 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
aws/aws-sdk-python#18 ·
Tất cả issue của aws/aws-sdk-python
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
use-agent-os/agent-os#3314 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
BasedHardware/omi#15662 · 1 bình luận ·
-
documentation help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
AiursoftWeb/AnduinOS-2#19 ·