Skip to content

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

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

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