Description
The http_request tool calls session.request(**request_kwargs) at line 884 without a timeout parameter. The Python requests library defaults to no timeout, so a non-responsive server will block the agent indefinitely.
The word "timeout" does not appear anywhere in http_request.py. The TOOL_SPEC input schema also has no timeout field.
Reproduction
# Agent calls http_request to a server that hangs
# The tool never returns, the agent is stuck
Suggested fix
- Add a default timeout (e.g. 30 seconds) to
session.request():
request_kwargs.setdefault("timeout", 30)
response = session.request(**request_kwargs)
- Optionally add a
timeout parameter to the TOOL_SPEC input schema so the model or user can override it per request.
Happy to submit a PR for this.
Description
The
http_requesttool callssession.request(**request_kwargs)at line 884 without atimeoutparameter. The Pythonrequestslibrary defaults to no timeout, so a non-responsive server will block the agent indefinitely.The word "timeout" does not appear anywhere in
http_request.py. TheTOOL_SPECinput schema also has no timeout field.Reproduction
Suggested fix
session.request():timeoutparameter to theTOOL_SPECinput schema so the model or user can override it per request.Happy to submit a PR for this.