fix(adka2a): exclude artifacts from input-required A2A responses#972
Open
anishesg wants to merge 1 commit into
Open
fix(adka2a): exclude artifacts from input-required A2A responses#972anishesg wants to merge 1 commit into
anishesg wants to merge 1 commit into
Conversation
## Link to Issue Signed-off-by: anish <anishesg@users.noreply.github.com>
Contributor
Author
|
checked the CI failure - all tests actually pass, including the modified test case. the bare "FAIL" at the end without a package name or error message looks like a CI infrastructure glitch. local runs with the same flags pass cleanly. can we re-run the workflow? |
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.
Link to Issue
Fixes #913
Problem
When adk-go sends A2A responses for input-required tasks, it includes artifacts containing messages alongside the status update. This format diverges from adk-python's implementation, which sends only a rich history structure without artifacts. The artifacts section triggers incorrect behavior in adk-python clients connecting via RemoteA2aAgent, causing them to generate a spurious
mock_function_call_for_required_user_input.Solution
Modified the A2A response serialization in
server/adka2a/v2/input_required.goandserver/adka2a/v2/executor.goto ensure that for input-required tasks, all content (function calls, responses, and text messages) is included in the status message instead of being sent as separate artifacts. This aligns adk-go's response format with adk-python's expectations.The fix includes two key changes:
input_required.go, theinputRequiredProcessornow accumulates all parts from events after detecting a long-running function call, placing them in the status message rather than leaving them to be sent as artifacts.executor.go, thewriteFinalTaskStatusmethod now skips sending the partial artifact reset when the final state isTaskStateInputRequired.Testing Plan
Unit Tests
server/adka2a/v2/processor_test.go