fix: work around ADK empty Part(text='') breaking A2A responses#96
Open
luis5tb wants to merge 1 commit intoRHEcosystemAppEng:mainfrom
Open
fix: work around ADK empty Part(text='') breaking A2A responses#96luis5tb wants to merge 1 commit intoRHEcosystemAppEng:mainfrom
luis5tb wants to merge 1 commit intoRHEcosystemAppEng:mainfrom
Conversation
dmartinol
reviewed
Apr 15, 2026
dmartinol
reviewed
Apr 15, 2026
|
|
||
| # Check every other content field. | ||
| return ( | ||
| part.function_call is None |
Collaborator
There was a problem hiding this comment.
this long list of conditions seems hard to maintain in case they add more fields.
isn't there a way to generate a summary (e.g. json-ize it) and just check it, instead?
Add EmptyPartFilterPlugin to strip empty text parts from model responses before they reach the ADK A2A part converter, which incorrectly treats text='' as falsy and drops the part entirely. When all parts are empty the plugin returns a fallback message instead of leaving the client in a broken thinking state. Upstream bug: google/adk-python#5341 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8ca1960 to
ed2da02
Compare
yuvalk
reviewed
Apr 15, 2026
| UsageTrackingPlugin(), | ||
| MCPOutputSizeGuardPlugin(), | ||
| EmptyPartFilterPlugin(), | ||
| ], |
Collaborator
There was a problem hiding this comment.
this will not cleanly revert. better to do in two separate commits
(I assume we'll want to revert this once the bug is fixed)
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.
Add EmptyPartFilterPlugin to strip empty text parts from model responses before they reach the ADK A2A part converter, which incorrectly treats text='' as falsy and drops the part entirely. When all parts are empty the plugin returns a fallback message instead of leaving the client in a broken thinking state.
Upstream bug: google/adk-python#5341