litellm/tests/e2e/mcp
Yuneng Jiang 09a98f5505
test(e2e): settle control-plane writes across every replica, not just one
The suite already waits for a new model or agent to become servable before
handing it back, but that wait returns on the first successful read. Every
request opens a fresh connection (e2e_http calls requests.* with no Session), so
a load-balanced Service routes each one independently: one successful read proves
one replica converged, and the caller's next request re-rolls and can land on a
replica that has not reloaded yet.

At replicaCount: 2 this surfaced as 30 failures on a SHA that is green at 1
replica -- 400 "Invalid model name passed", 404 "Guardrail not found", "no
healthy deployments for this model", and a /model/info listing that contained
one of two models created moments apart.

Add PROPAGATION_TIMEOUT (default 15s, override E2E_PROPAGATION_TIMEOUT) and
settle_propagation(), sized off the proxy's proxy_config_reload_interval_seconds
(30s by default, 7s on the e2e stack) plus margin, and settle after every
control-plane create whose object the suite then uses:

- ProxyClient.create_model and A2AClient.register_agent, after their existing
  polls -- the poll still fails loudly if the object never appears at all
- GuardrailsClient.register, which had no barrier; create_content_filter_guardrail
  and create_bedrock_guardrail now route through it instead of POSTing directly
- the guardrail creates in mcp_client and logging_client
- the vertex passthrough model, whose body cannot go through create_model

Left alone: the /model/new calls that assert a 403 or read back a status code,
since they never use the model.
2026-08-07 19:36:30 -07:00
..
conftest.py test(e2e): harden stage flakes for batches, UI, and MCP (#33831) 2026-07-18 19:11:54 +00:00
datadog_mcp.py test(e2e): cover MCP access-group tool selection at key creation (#34480) 2026-07-24 16:18:40 -07:00
linear_session_capture.py test(e2e): drive a real Linear OAuth MCP through chat completions under both ingress headers 2026-07-22 23:29:10 -07:00
mcp_client.py test(e2e): settle control-plane writes across every replica, not just one 2026-08-07 19:36:30 -07:00
oauth_chat_client.py test(e2e): drive a real Linear OAuth MCP through chat completions under both ingress headers 2026-07-22 23:29:10 -07:00
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(e2e): drive a real Linear OAuth MCP through chat completions under both ingress headers 2026-07-22 23:29:10 -07:00
test_mcp_datadog_e2e.py test(e2e): skip the three Datadog MCP tool-call tests pending LIT-5052 (#35380) 2026-07-31 17:19:20 +00:00
test_mcp_guardrail_e2e.py test(e2e): skip the three Datadog MCP tool-call tests pending LIT-5052 (#35380) 2026-07-31 17:19:20 +00:00
test_mcp_key_access_e2e.py test(e2e): skip the three Datadog MCP tool-call tests pending LIT-5052 (#35380) 2026-07-31 17:19:20 +00:00