litellm/tests/e2e/mcp
mubashir1osmani c274cf321c
test(e2e): poll MCP tools across multi-worker lag (#35047)
* fix(mcp): resolve call_tool by registry without requiring tool map

Multi-worker reloads put MCP servers in the registry from the DB but do
not re-run tools/list on every process. Gating call_tool on
tool_name_to_mcp_server_name_mapping made cold workers 500 with Tool not
found after another worker had already listed the tool. Treat a registry
match on server id/name/alias as enough; upstream rejects unknown tools

* test(e2e): poll MCP register, tools/list, and tools/call across multi-worker lag

Stage multi-worker gateways only load MCP servers and tool maps on the
process that handled the request. Poll until the server is listed, the
tool appears on tools/list, and tools/call is not a cold-worker 500 so
key-access and Datadog MCP e2e stop racing the LB

* Revert "fix(mcp): resolve call_tool by registry without requiring tool map"

This reverts commit 8b56e51e39.

* test(e2e): tighten MCP multi-worker lag classifier

Only retry tools/call on gateway shapes Tool <name> not found and
server_not_found, not any 500 that mentions tool/server not found, so
upstream failures are not retried until the poll deadline

* test(e2e): drop unit file for MCP lag classifier

The live await_call_tool polls already cover multi-worker lag; a separate
string-match unit module is not worth keeping
2026-07-28 22:15:21 -07:00
..
conftest.py
datadog_mcp.py
linear_session_capture.py
mcp_client.py test(e2e): poll MCP tools across multi-worker lag (#35047) 2026-07-28 22:15:21 -07:00
oauth_chat_client.py
test_mcp_access_group_e2e.py test(e2e): poll MCP tools across multi-worker lag (#35047) 2026-07-28 22:15:21 -07:00
test_mcp_chat_completion_oauth_e2e.py
test_mcp_datadog_e2e.py test(e2e): poll MCP tools across multi-worker lag (#35047) 2026-07-28 22:15:21 -07:00
test_mcp_guardrail_e2e.py
test_mcp_key_access_e2e.py test(e2e): poll MCP tools across multi-worker lag (#35047) 2026-07-28 22:15:21 -07:00