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

Author: ManoharPaturiCreated Sep 18, 2026Updated Sep 18, 2026
Labelspythontriage

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

python
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

Source: microsoft/agent-framework