Skip to content

[Bug]: Metadata key 'X-A2A-Extensions' is invalid: INTERNAL: Illegal header key ( gRPC metadata key X-A2A-Extensions is invalid ) #656

@BunnkeiKou

Description

@BunnkeiKou

What happened?

When using the A2A Python SDK with gRPC transport, the client injects metadata key X-A2A-Extensions. gRPC requires metadata keys to be lowercase, so this causes INTERNAL: Illegal header key at runtime.

Environment

OS: macOS (darwin 24.6.0)
Python: 3.12
grpcio: 1.76.0
a2a-sdk: 0.3.22

Steps to Reproduce

Use ClientFactory (or any SDK gRPC client) to send a message over gRPC.
The SDK automatically adds X-A2A-Extensions metadata.
gRPC fails with Illegal header key.

Actual Result

Metadata key 'X-A2A-Extensions' is invalid: INTERNAL: Illegal header key

Expected Result

SDK should use a lowercase metadata key (e.g. x-a2a-extensions), which is valid for gRPC.

Temporary Workaround

Override the header constant at runtime:
from a2a.extensions import common as a2a_ext_commonfrom a2a.client.transports import grpc as a2a_grpc_transporta2a_ext_common.HTTP_EXTENSION_HEADER = "x-a2a-extensions"a2a_grpc_transport.HTTP_EXTENSION_HEADER = "x-a2a-extensions"
Or disable extensions by default in gRPC metadata.

Suggested Fix

Use a lowercase metadata key for gRPC transport, or ensure the header key is normalized to lowercase before attaching metadata.

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

component: clientIssues related to transport logic and configuration for external apps connecting to A2A agents.help wantedExtra attention is neededstatus:awaiting response

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions