Skip to content

Conversation

cyy12345
Copy link
Contributor

The underlying aconnect_sse library will overwrite the header and timeout of what's set in the httpx_client.

From a user using adk a2a_remote_agent library, they would pass in these information in the httpx_client. I have tried this fix in my local setup.

@cyy12345 cyy12345 requested a review from a team as a code owner September 19, 2025 22:59
Copy link
Contributor

Summary of Changes

Hello @cyy12345, 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 critical issue where the aconnect_sse library was inadvertently overwriting the httpx_client's configured timeout and headers during streaming JSON-RPC requests. By explicitly propagating these settings into the modified_kwargs, the fix ensures that client-defined network parameters are consistently applied, resolving a reported problem for users of the adk a2a_remote_agent library and maintaining expected behavior.

Highlights

  • Timeout Propagation: The httpx_client's read timeout is now explicitly passed to the modified_kwargs for streaming requests, ensuring that the configured timeout is respected by the underlying aconnect_sse library.
  • Header Preservation: The httpx_client's headers are now explicitly copied and passed to the modified_kwargs for streaming requests, preventing them from being overwritten by the aconnect_sse library.
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

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 aims to fix an issue where headers and timeout from the httpx_client were not being passed to streaming requests. The implementation correctly extracts these values but has a side effect of overwriting any headers or timeout values set by interceptors. My review includes a suggestion to merge headers and use setdefault for the timeout to respect interceptor-provided values. I've also noted that the resubscribe method has a similar issue that should be addressed for consistency.

@holtskinner holtskinner merged commit 675354a into a2aproject:main Sep 22, 2025
6 checks passed
holtskinner pushed a commit that referenced this pull request Sep 23, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.3.7](v0.3.6...v0.3.7)
(2025-09-22)


### Bug Fixes

* jsonrpc client send streaming request header and timeout field
([#475](#475))
([675354a](675354a))
* Task state is not persisted to task store after client disconnect
([#472](#472))
([5342ca4](5342ca4)),
closes [#464](#464)

---
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.

3 participants