fix(ci): final cleanup of imports and mcp test exception handling

This commit is contained in:
Joy-In-Code 2026-02-26 17:59:13 +05:30
parent 50bf2da05e
commit 8ad0ddc5d1
2 changed files with 10 additions and 0 deletions

View file

@ -18,13 +18,21 @@ from litellm.types.realtime import ALL_DELTA_TYPES
from .litellm_logging import Logging as LiteLLMLogging
if TYPE_CHECKING:
from typing import Protocol
from websockets.asyncio.client import ClientConnection
class WSProtocol(Protocol):
async def send(self, data: str) -> None: ...
async def recv(self, **kwargs: Any) -> Any: ...
async def close(self) -> None: ...
CLIENT_CONNECTION_CLASS = ClientConnection
else:
CLIENT_CONNECTION_CLASS = Any
# Create a thread pool with a maximum of 10 threads
executor = concurrent.futures.ThreadPoolExecutor(max_workers=10)
DefaultLoggedRealTimeEventTypes = [
@ -594,3 +602,4 @@ class RealTimeStreaming:
await forward_task
except asyncio.CancelledError:
pass

View file

@ -293,3 +293,4 @@ class TestProxyMcpStatelessBehavior:
text_b = getattr(result_b.content[0], "text", None)
assert text_b == "300"