* 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 |
||
|---|---|---|
| .. | ||
| auth | ||
| guardrail_translation | ||
| test_discoverable_endpoints.py | ||
| test_mcp_cost_calculator.py | ||
| test_mcp_custom_fields.py | ||
| test_mcp_metadata_preservation.py | ||
| test_mcp_server_manager.py | ||
| test_mcp_server.py | ||
| test_mcp_stale_session.py | ||
| test_openapi_to_mcp_generator.py | ||
| test_rest_endpoints.py | ||
| test_ui_session_utils.py | ||