Skip to content

Python: A2AAgent rejects int timeouts (only float/httpx.Timeout accepted) #8515

Closed

Description

Motivation & Context

A2AAgent(url=..., timeout=30) raises TypeError: Invalid timeout type: <class 'int'>. the type guard only accepts float and httpx.Timeout, but an int timeout is the most natural way to write it and httpx itself accepts ints everywhere (PEP 484 numeric tower: int is acceptable where float is expected).

Reproduction

from agent_framework.a2a import A2AAgent
A2AAgent(url="http://localhost:9999", timeout=30)
# TypeError: Invalid timeout type: <class 'int'>

timeout=30.0 works, timeout=30 does not.

Expected behavior

int timeouts coerce like floats.

env: python main

Activity

  1. added
    pythonUsage: [Issues, PRs], Target: Python
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Sep 18, 2026
  2. aslamalkarywk7 commented on Sep 18, 2026

    @aslamalkarywk7

    Hi! I would like to take this on. Plan: accept int timeouts in A2AAgent by normalizing to float/httpx.Timeout at the boundary, plus a regression test. Please let me know if that direction sounds right. Thanks!

  3. ManoharPaturi commented on Sep 19, 2026

    @ManoharPaturi
    ContributorAuthor

    Islam Al-Nashar (@aslamalkarywk7) Islam El-Nashar (aslamalkarywk7)
    appreciate it! there's already a PR open for this one (#8516), but it could use a proper review. come take a look and let's finish it together, the server-url tests are all yours if you want them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonUsage: [Issues, PRs], Target: PythontriageUsage: [Issues], Target: All issues that still need to be triaged

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions