From 211800146ef6460fec94ec997d45dabb4e394fdc Mon Sep 17 00:00:00 2001 From: Calum Murray Date: Fri, 18 Jul 2025 14:38:23 -0400 Subject: [PATCH] cleanup: remove unusable code Signed-off-by: Calum Murray --- llama_stack/providers/utils/tools/mcp.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/llama_stack/providers/utils/tools/mcp.py b/llama_stack/providers/utils/tools/mcp.py index d0753933c..76593a4b8 100644 --- a/llama_stack/providers/utils/tools/mcp.py +++ b/llama_stack/providers/utils/tools/mcp.py @@ -48,16 +48,9 @@ async def client_wrapper(endpoint: str, headers: dict[str, str]) -> AsyncGenerat for i, strategy in enumerate(connection_strategies): try: - if strategy == MCPProtol.STREAMABLE_HTTP: - client = streamablehttp_client - elif strategy == MCPProtol.SSE: + client = streamablehttp_client + if strategy == MCPProtol.SSE: client = sse_client - else: - # this should not happen - logger.warning( - "tried to establish MCP connection with UNKNOWN protocol, defaulting to try with STREAMABLE_HTTP" - ) - client = streamablehttp_client async with client(endpoint, headers=headers) as client_streams: async with ClientSession(read_stream=client_streams[0], write_stream=client_streams[1]) as session: await session.initialize()