Skip to content

Conversation

@sokoliva
Copy link
Contributor

@sokoliva sokoliva commented Nov 24, 2025

Headers are now updated with extensions before the get_agent_card call which has headers as input parameters.

  • Follow the CONTRIBUTING Guide.
  • Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
    • Important Prefixes for release-please:
      • fix: which represents bug fixes, and correlates to a SemVer patch.
      • feat: represents a new feature, and correlates to a SemVer minor.
      • feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major.

Fixes #504 🦕

Release-As: 0.3.19

…rts. Headers are now updated with extensions before the get_agent_card call.
@sokoliva sokoliva requested a review from a team as a code owner November 24, 2025 10:12
@sokoliva sokoliva requested a review from lkawka November 24, 2025 10:12
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @sokoliva, 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 addresses a bug where extensions were not being correctly passed in HTTP headers during the get_card operations for both JSON-RPC and REST transports. The changes ensure that the update_extension_header utility is consistently applied, guaranteeing that any specified extensions are included in the outgoing requests. This resolves an issue (Fixes #504) and enhances the reliability of agent card retrieval with custom extensions.

Highlights

  • JSON-RPC Transport Extension Support: The get_card method in the JSON-RPC transport now correctly incorporates extensions into the HTTP headers for both initial agent card retrieval and subsequent extended card requests.
  • REST Transport Extension Support: Similarly, the get_card method in the REST transport has been updated to ensure extensions are properly included in HTTP headers for both initial and extended agent card fetches.
  • Comprehensive Test Coverage: New asynchronous test cases have been added for both JSON-RPC and REST transports to validate that extensions are correctly applied to HTTP GET requests when fetching agent cards, covering scenarios where no card is initially provided and when extended card support is enabled.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly adds support for extensions in the get_card methods for both JSON-RPC and REST transports by ensuring the extension headers are included in the initial agent card request. The changes are logical and the new tests provide good coverage for the added functionality.

I've identified a potential pre-existing bug in the jsonrpc transport's get_card method where it returns the old agent card instead of the newly fetched extended card. I've also suggested some minor refactoring in the test files to reduce code duplication and improve maintainability.

Overall, this is a good fix. Please see my detailed comments.

@sokoliva sokoliva merged commit 847f18e into a2aproject:main Nov 25, 2025
7 checks passed
sokoliva pushed a commit that referenced this pull request Nov 25, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.3.19](v0.3.18...v0.3.19)
(2025-11-25)


### Bug Fixes

* **jsonrpc, rest:** `extensions` support in `get_card` methods in
`json-rpc` and `rest` transports
([#564](#564))
([847f18e](847f18e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: Extension support for Client

2 participants