feat: standardize timeout values to floats in seconds (#1766)

This commit is contained in:
Yugan 2025-12-19 17:52:56 +05:30 • committed by GitHub
commit 2aa1ad2a69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,8 +31,8 @@ def _extract_session_id_from_endpoint(endpoint_url: str) -> str | None:
async def sse_client(
url: str,
headers: dict[str, Any] | None = None,
timeout: float = 5,
sse_read_timeout: float = 60 * 5,
timeout: float = 5.0,
sse_read_timeout: float = 300.0,
httpx_client_factory: McpHttpClientFactory = create_mcp_http_client,
auth: httpx.Auth | None = None,
on_session_created: Callable[[str], None] | None = None,
@ -46,8 +46,8 @@ async def sse_client(
Args:
url: The SSE endpoint URL.
headers: Optional headers to include in requests.
timeout: HTTP timeout for regular operations.
sse_read_timeout: Timeout for SSE read operations.
timeout: HTTP timeout for regular operations (in seconds).
sse_read_timeout: Timeout for SSE read operations (in seconds).
auth: Optional HTTPX authentication handler.
on_session_created: Optional callback invoked with the session ID when received.
"""