-
Notifications
You must be signed in to change notification settings - Fork 345
Description
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