@@ -100,16 +100,7 @@ def __init__(
100100 auth : httpx .Auth | None = None ,
101101 reconnection_options : StreamableHTTPReconnectionOptions | None = None ,
102102 ) -> None :
103- """Initialize the StreamableHTTP transport.
104-
105- Args:
106- url: The endpoint URL.
107- headers: Optional headers to include in requests.
108- timeout: HTTP timeout for regular operations.
109- sse_read_timeout: Timeout for SSE read operations.
110- auth: Optional HTTPX authentication handler.
111- reconnection_options: Options for configuring reconnection behavior.
112- """
103+ """Initialize the StreamableHTTP transport."""
113104 self .url = url
114105 self .headers = headers or {}
115106 self .timeout = timeout .total_seconds () if isinstance (timeout , timedelta ) else timeout
@@ -344,11 +335,7 @@ async def _handle_post_request(self, ctx: RequestContext) -> None:
344335 if content_type .startswith (JSON ):
345336 await self ._handle_json_response (response , ctx .read_stream_writer , is_initialization )
346337 elif content_type .startswith (SSE ):
347- # Note: _handle_sse_response returns (has_priming_event, last_event_id)
348- # which can be used for reconnection logic if needed
349- _has_priming_event , _last_event_id = await self ._handle_sse_response (
350- response , ctx , is_initialization
351- )
338+ await self ._handle_sse_response (response , ctx , is_initialization )
352339 else :
353340 await self ._handle_unexpected_content_type ( # pragma: no cover
354341 content_type , # pragma: no cover
@@ -598,22 +585,6 @@ async def streamablehttp_client(
598585
599586 `sse_read_timeout` determines how long (in seconds) the client will wait for a new
600587 event before disconnecting. All other HTTP operations are controlled by `timeout`.
601-
602- Args:
603- url: The endpoint URL.
604- headers: Optional headers to include in requests.
605- timeout: HTTP timeout for regular operations.
606- sse_read_timeout: Timeout for SSE read operations.
607- terminate_on_close: Whether to terminate the session on close.
608- httpx_client_factory: Factory function to create the HTTP client.
609- auth: Optional HTTPX authentication handler.
610- reconnection_options: Options for configuring reconnection behavior.
611-
612- Yields:
613- Tuple containing:
614- - read_stream: Stream for reading messages from the server
615- - write_stream: Stream for sending messages to the server
616- - get_session_id_callback: Function to retrieve the current session ID
617588 """
618589 transport = StreamableHTTPTransport (url , headers , timeout , sse_read_timeout , auth , reconnection_options )
619590
0 commit comments