From 2ea6e89b2c17f897a405e0a700ab8a6f2eb3496c Mon Sep 17 00:00:00 2001 From: Milan Date: Fri, 10 Apr 2026 21:06:44 +0300 Subject: [PATCH] fix(a2a): default create_a2a_client timeout to DEFAULT_A2A_AGENT_TIMEOUT Align with aget_agent_card and the DEFAULT_A2A_AGENT_TIMEOUT env var so A2A message/send uses the same default as agent card fetch instead of a hardcoded 60s HTTP read timeout. Also correct aget_agent_card docstring for the timeout parameter. Made-with: Cursor --- litellm/a2a_protocol/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/a2a_protocol/main.py b/litellm/a2a_protocol/main.py index c86549da77a..6154c828804 100644 --- a/litellm/a2a_protocol/main.py +++ b/litellm/a2a_protocol/main.py @@ -615,7 +615,7 @@ async def asend_message_streaming( # noqa: PLR0915 async def create_a2a_client( base_url: str, - timeout: float = 60.0, + timeout: float = DEFAULT_A2A_AGENT_TIMEOUT, extra_headers: Optional[Dict[str, str]] = None, ) -> "A2AClientType": """ @@ -626,7 +626,7 @@ async def create_a2a_client( Args: base_url: The base URL of the A2A agent (e.g., "http://localhost:10001") - timeout: Request timeout in seconds (default: 60.0) + timeout: Request timeout in seconds (default: ``DEFAULT_A2A_AGENT_TIMEOUT`` / env ``DEFAULT_A2A_AGENT_TIMEOUT``) extra_headers: Optional additional headers to include in requests Returns: @@ -711,7 +711,7 @@ async def aget_agent_card( Args: base_url: The base URL of the A2A agent (e.g., "http://localhost:10001") - timeout: Request timeout in seconds (default: 60.0) + timeout: Request timeout in seconds (default: ``DEFAULT_A2A_AGENT_TIMEOUT`` / env ``DEFAULT_A2A_AGENT_TIMEOUT``) extra_headers: Optional additional headers to include in requests Returns: