Python: Fix inconsistent response_id in A2AAgent message handling#5276
Open
kartikmadan11 wants to merge 1 commit intomicrosoft:mainfrom
Open
Python: Fix inconsistent response_id in A2AAgent message handling#5276kartikmadan11 wants to merge 1 commit intomicrosoft:mainfrom
kartikmadan11 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
…oft#5263) A2AAgent set response_id to message_id when processing A2AMessage responses but used task.id for Task-based responses, causing inconsistent response_id values across the two code paths. Now response_id consistently uses task_id (falling back to a generated UUID for standalone messages), while message_id is propagated to the dedicated message_id field on AgentResponseUpdate. Fixes microsoft#5263
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
A2AAgentsetsresponse_idinconsistently depending on the response type:response_id = message_id(a per-message identifier)response_id = task.id(a per-operation identifier)This means downstream code receiving
response_idgets semantically different values depending on which wire format the remote agent chose, even for the same logical operation.Fixes #5263
Description
response_idnow consistently usestask_id(the operation-level identifier) across both code paths, falling back to a generated UUID for standalone messages that have no associated task.message_idis propagated to the dedicatedmessage_idfield onAgentResponseUpdate, which was previously unused in the A2AMessage path.Before:
After:
Contribution Checklist