microsoft / microsoft/agent-framework
Python: A2AAgent rejects int timeouts (only float/httpx.Timeout accepted)
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
### Motivation & Context
`A2AAgent(url=..., timeout=30)` raises `TypeError: Invalid timeout type: `. 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:
```
`timeout=30.0` works, `timeout=30` does not.
### Expected behavior
int timeouts coerce like floats.
env: python main
Contributor guide
Research direction
Start by locating the A2AAgent timeout type guard and inspect how it handles float and httpx.Timeout values. Reproduce the issue with timeout=30, then verify that integer timeouts are accepted and behave like float timeouts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100