mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-10 23:06:52 +00:00
923b1cfd92
* fix: strip stale mcp-session-id header to prevent 'Session not found' error loop When VSCode reconnects to LiteLLM's MCP endpoint after a reload, it sends a stale mcp-session-id header. The session was already cleaned up, causing a 404 'Session not found' error. VSCode retries with the same stale ID, creating an infinite error loop. Before forwarding requests to the StreamableHTTP session manager, check if the mcp-session-id header references a valid session. If the session doesn't exist, strip the header so a new session is created automatically. Fixes #20292 * refactor: extract stale session handling into _strip_stale_mcp_session_header helper
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/test_litellm
This folder can only run mock tests.