Skip to content

Switchyard lets LLM applications route traffic across models and providers while preserving native OpenAI and Anthropic API compatibility - enabling flexible model selection, benchmarking, and cost/performance optimization.

Rust

fix(litellm): Fix the E2E test (#1294)

Graham King8cb13bb60e70
diff --git a/examples/litellm/tests/integration/test_e2e.py b/examples/litellm/tests/integration/test_e2e.py
index f271312ad..aabdf947e 100644
--- a/examples/litellm/tests/integration/test_e2e.py
+++ b/examples/litellm/tests/integration/test_e2e.py
@@ -172,16 +172,14 @@ async def test_stage_plugin_routes_live_requests_to_both_gpt_5_6_models(
@pytest.mark.e2e
@pytest.mark.parametrize("litellm_base_url", ["random"], indirect=True)
-async def test_random_plugin_routes_live_requests_to_both_gpt_5_6_models(
+async def test_random_plugin_routes_live_requests_to_gpt_5_6_models(
litellm_base_url: str,
) -> None:
- """Exercise the seeded Random profile against both live deployments."""
- selected = []
+ """Exercise the seeded Random profile against the live deployments."""
for index in range(2):
- _, selected_model = await _complete(
+ response, selected_model = await _complete(
litellm_base_url,
[{"role": "user", "content": f"Reply with the number {index}."}],
)
- selected.append(selected_model)
-
- assert selected == [SOL_MODEL, TERRA_MODEL]
+ assert response.get("model") == MODEL_GROUP
+ assert selected_model in {SOL_MODEL, TERRA_MODEL}