Skip to content

fix(extensibility): update a2a-sdk Message serialization for protobuf-based types - #270

Open
rishikunnath2747 wants to merge 2 commits into
SAP:mainfrom
rishikunnath2747:fix_a2a_issue
Open

fix(extensibility): update a2a-sdk Message serialization for protobuf-based types#270
rishikunnath2747 wants to merge 2 commits into
SAP:mainfrom
rishikunnath2747:fix_a2a_issue

Conversation

@rishikunnath2747

Copy link
Copy Markdown
Contributor

Description

a2a-sdk >= 1.0 changed a2a.types.Message from a Pydantic model to a protobuf-generated type. This broke two call sites in extensibility/client.py:

  • message.model_dump(mode="json") — protobuf has no .model_dump(), causing a silent warning and empty message body
  • Message(**response_json) — protobuf constructor rejects camelCase keys, silently dropping all fields from the hook response

Replaced with google.protobuf.json_format.MessageToDict and ParseDict respectively. Also bumped the a2a-sdk lower bound to >=1.0.0.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Dependency update

How to Test

  1. Install a2a-sdk>=1.0.0
  2. Configure an agent with an n8n hook and trigger it
  3. Verify the hook executes successfully and the response Message fields are correctly populated (previously all fields were silently dropped)

Checklist

  • I have read the Contributing Guidelines
  • I have verified that my changes solve the issue
  • I have added/updated automated tests to cover my changes
  • All tests pass locally
  • I have verified that my code follows the Code Guidelines
  • I have updated documentation (if applicable)
  • I have added type hints for all public APIs
  • My code does not contain sensitive information (credentials, tokens, etc.)
  • I have followed Conventional Commits for commit messages

Replace model_dump/Message(**kwargs) with protobuf-compatible MessageToDict/ParseDict and bump a2a-sdk lower bound to >=1.0.0
@rishikunnath2747
rishikunnath2747 requested a review from a team as a code owner August 13, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant