From dd21fb57b5236de00f669f685b52812cc052156e Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Sun, 5 Jul 2026 20:36:29 -0400 Subject: [PATCH] Unblock: unpack v2 streamable_http_client 2-tuple (Phase C interim) --- fastmcp_slim/fastmcp/client/transports/http.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fastmcp_slim/fastmcp/client/transports/http.py b/fastmcp_slim/fastmcp/client/transports/http.py index 280a93d4a..effdae122 100644 --- a/fastmcp_slim/fastmcp/client/transports/http.py +++ b/fastmcp_slim/fastmcp/client/transports/http.py @@ -197,8 +197,11 @@ class StreamableHttpTransport(ClientTransport): http_client, streamable_http_client(self.url, http_client=http_client) as transport, ): - read_stream, write_stream, get_session_id = transport - self._get_session_id_cb = get_session_id + # SDK v2 streamable_http_client yields a 2-tuple (read, write); + # the get_session_id callback is no longer part of the transport. + # Phase C: source the session id from the session/transport itself. + read_stream, write_stream = transport + self._get_session_id_cb = None async with ClientSession( read_stream, write_stream, **session_kwargs ) as session: