fix(a2a): advertise streaming on agent_registry agent cards - #6781
fix(a2a): advertise streaming on agent_registry agent cards#6781lllakshit wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
@googlebot rescan I have already signed the Google Individual CLA (Lakshit Mathur / lllakshit / llakshitmathur239@gmail.com). Please re-check this pull request. |
|
@DeanChensj Could you please review this PR and let me know if any changes are required? I’d appreciate your feedback so I can address any remaining concerns and move it toward merging into main. |
agent_registry called build_agent_card without capabilities or streaming, so constructed cards advertised streaming:false. Pass streaming=True on that convenience path and document that streaming= is ignored when capabilities is provided. Fixes google#6778
969db70 to
928e643
Compare
|
Rebased this branch onto current main. The CLA check is green and the change is unchanged. Happy to address any review comments. |
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
Problem:
AgentRegistry.get_remote_a2a_agent()builds a card through_compat.build_agent_card()with neithercapabilitiesnorstreaming. The helper then falls through todefault_capabilitieswherestreamingdefaults toFalse, so registry-constructed cards advertisestreaming: false.The issue also asked which public-API shape to use for the
streaming=parameter. This PR takes the non-breaking option: keepstreaming=as the no-capabilities convenience path only. It does not dropstreaming=(that would remove public surface) and does not composestreaming=onto a passedcapabilitiesobject (that would change the meaning of an existing parameter; current tests already lock in "capabilities wins").AgentCardBuilderstill defaultsAgentCapabilities()withoutstreaming=Trueon GitHubmain(#6673 closed without landing here). That is #6672 and is left out of this PR so this stays one concern.Solution:
Pass
streaming=Trueat theagent_registrycall site, which is the convenience pathbuild_agent_cardalready implements. Document thatstreaming=is ignored whencapabilitiesis provided.Testing Plan
Unit Tests:
Commands:
Summary (Python 3.12.10, a2a-sdk 1.1.2, matching the issue repro):
Skipped tests are the existing 0.3-only
@v03_onlycases; this environment is a2a-sdk 1.x. New coverage that runs on 1.x:capabilitiesstill defaultsstreamingtoFalsestreaming=Trueis honoured whencapabilitiesis omittedcapabilitiesobject still wins (no composition)get_remote_a2a_agent()constructed cards advertisestreaming is TrueManual End-to-End (E2E) Tests:
Reproduced the issue snippet against GitHub
mainvs this branch (a2a-sdk 1.1.2):git show upstream/main:.../agent_registry.pystill has nostreaming=on that call. After this change the same call passesstreaming=True.No
adk webUI change; this is card construction only.Checklist
Additional context
I will complete the Google CLA if it is not already on file.
Assisted by an AI coding tool; I reviewed the diff, ran the tests above, and confirmed the issue still reproduces on
main.