Skip to content

fix: OpenAPI tool _request missing timeout causes ReadTimeout with default httpx 5s #4431

Closed

Description

@fuki01

Bug Description

PR #2872 switched OpenAPI tools from requests (sync) to httpx.AsyncClient (async) in rest_api_tool.py. However, the new _request function does not specify a timeout parameter:

async def _request(**request_params) -> httpx.Response:
  async with httpx.AsyncClient(
      verify=request_params.pop("verify", True)
  ) as client:
    return await client.request(**request_params)
  • requests has no default timeout (waits indefinitely)
  • httpx.AsyncClient has a default timeout of 5 seconds

This means API calls that previously worked fine now fail with httpx.ReadTimeout if they take longer than 5 seconds.

Steps to Reproduce

  1. Configure an OpenAPI tool that calls a slower external API
  2. Upgrade from google-adk 1.23.0 to 1.24.0
  3. Execute a tool call that takes more than 5 seconds

Expected Behavior

The API call should succeed as it did in 1.23.0 with requests.

Actual Behavior

httpx.ReadTimeout is raised after 5 seconds.

Suggested Fix

Add an explicit timeout to httpx.AsyncClient in _request. The appropriate value is up to the ADK team, but the current implicit 5s default is too short for many real-world API calls.

Environment

  • google-adk: 1.24.0+
  • Python: 3.13

Activity

  1. added
    tools[Component] This issue is related to tools
    on Feb 10, 2026
  2. added theissue type on Feb 10, 2026
  3. added a commit that references this issue on Feb 10, 2026
    415aa5a
  4. wyf7107 commented on Feb 10, 2026

    @wyf7107
    Collaborator

    @seanzhougoogle do you mind take a look?

  5. added a commit that references this issue on Feb 11, 2026
    69d0179
  6. adk-bot commented on Feb 18, 2026

    @adk-bot
    Collaborator

    Notification: The author has updated the issue description. Maintainers, please review.

  7. haseryo0403 commented on Feb 25, 2026

    @haseryo0403

    I am also encountering this ReadTimeout issue after upgrading to 1.24.0. The default 5-second timeout is too short for our use case as well. I would appreciate it if the fix in PR #4432 could be merged soon.

  8. shuhei9108 commented on Feb 26, 2026

    @shuhei9108

    Any updates on this? We are also encountering this ReadTimeout issue and would love to see the fix merged soon.

  9. fuki01 commented on Feb 28, 2026

    @fuki01
    Author

    @wyf7107 What is the status of this?

  10. haseryo0403 commented on Mar 1, 2026

    @haseryo0403

    @wyf7107 @seanzhou1023 @ryanaiagent
    Frankly, this delay is unacceptable. This regression is completely blocking us from upgrading to 1.24.0 and beyond.

    As long as this implicit 5-second timeout exists, the OpenAPI tools are fundamentally broken for any real-world API calls. Being forced to stay on 1.23.0 is causing severe issues for our operations, and it is extremely frustrating to see a critical bug like this—along with its ready-to-merge PR (#4432)—ignored for weeks.

    Please prioritize this immediately. We desperately need this fix merged and a patch released ASAP because we literally cannot upgrade until it is resolved.

  11. added a commit that references this issue on Apr 9, 2026
    1697e8d
  12. added a commit that references this issue on Aug 11, 2026
    4d00e25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

tools[Component] This issue is related to tools

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions