feat: add GetExtendedAgentCardRequest as input parameter to GetExtendedAgentCard method#767
Conversation
…edAgentCard method
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a change to the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly adds the GetExtendedAgentCardRequest parameter to the get_extended_agent_card method across various client and transport layers, aligning it with the A2A specification. The changes are consistent and well-tested in the modified files.
However, a key component, TenantTransportDecorator, appears to have been missed. It needs to be updated to reflect the new method signature of get_extended_agent_card to avoid breaking its functionality. Additionally, the newly added test file for this decorator, tests/client/transports/test_tenant_decorator.py, contains a call that is inconsistent with the new method signature, which will cause test failures. Please refer to the specific comments for detailed suggestions to address these issues.
I am having trouble creating individual review comments. Click here to see my feedback.
tests/client/transports/test_tenant_decorator.py (6-20)
To use GetExtendedAgentCardRequest in this test file, it needs to be imported. Please add it to this import block, maintaining alphabetical order.
from a2a.types.a2a_pb2 import (
AgentCard,
CancelTaskRequest,
CreateTaskPushNotificationConfigRequest,
DeleteTaskPushNotificationConfigRequest,
GetExtendedAgentCardRequest,
GetTaskPushNotificationConfigRequest,
GetTaskRequest,
ListTaskPushNotificationConfigsRequest,
ListTasksRequest,
Message,
Part,
SendMessageRequest,
StreamResponse,
SubscribeToTaskRequest,
)
tests/client/transports/test_tenant_decorator.py (132-136)
The get_extended_agent_card method signature has been updated to require a request parameter, but this test call is missing it. This will cause a TypeError.
It also appears that TenantTransportDecorator itself has not been updated in this PR to handle this new parameter. Please ensure you update TenantTransportDecorator.get_extended_agent_card to accept and forward the request parameter to the underlying transport, and then update this test as suggested.
# Test get_extended_agent_card
card = MagicMock(spec=AgentCard);
mock_transport.get_extended_agent_card.return_value = card;
request = GetExtendedAgentCardRequest();
res = await decorator.get_extended_agent_card(request);
assert res is card
Spec defines
rpc GetExtendedAgentCard(GetExtendedAgentCardRequest) returns (AgentCard). CurrentlyGetExtendedAgentCarddoes not takeGetExtendedAgentCardRequestas input parameter.Fixes #766 🦕