The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(e2e): repair two suites broken by intentional behaviour changes
Yuneng Jiang9e0659212a02
diff --git a/tests/e2e/models.py b/tests/e2e/models.pyindex 79d9e011f7e..b5229744d6f 100644--- a/tests/e2e/models.py+++ b/tests/e2e/models.py@@ -851,6 +851,15 @@ class ModelListEntry(BaseModel):id: str+class ModelsListParams(BaseModel):+ """Query for GET /v1/models. A wildcard route such as ``openai/gpt-5.4*`` is+ listed only under ``return_wildcard_routes``; without it the route is dropped+ and only its expansions remain, so a readiness poll for the pattern itself+ never resolves."""++ return_wildcard_routes: bool = True++class ModelsListResponse(BaseModel):"""GET /v1/models on the data plane: the deployments the gateway can actuallyserve right now. Used to confirm a freshly created model has propagated fromdiff --git a/tests/e2e/proxy_client.py b/tests/e2e/proxy_client.pyindex 2d382a610e1..cdc20e5299a 100644--- a/tests/e2e/proxy_client.py+++ b/tests/e2e/proxy_client.py@@ -55,6 +55,7 @@ from models import (ModelMode,ModelNewBody,ModelNewResponse,+ ModelsListParams,ModelsListResponse,ModelUpdateBody,OcrBody,@@ -336,7 +337,7 @@ class ProxyClient:lambda poll_timeout: self.transport.get("/v1/models",headers=headers,- params=NoBody(),+ params=ModelsListParams(),response_type=ModelsListResponse,timeout=poll_timeout,),diff --git a/tests/e2e/router/test_auto_router_regressions_e2e.py b/tests/e2e/router/test_auto_router_regressions_e2e.pyindex 35ba2c8d3d1..188db2a8eb5 100644--- a/tests/e2e/router/test_auto_router_regressions_e2e.py+++ b/tests/e2e/router/test_auto_router_regressions_e2e.py@@ -597,9 +597,20 @@ class TestSemanticAutoRouterResponses:))assert answer.id, "/v1/responses through the semantic auto-router returned no response id"- rows: Final = proxy.poll_logs_for_key(key, min_rows=1)+ rows: Final = proxy.poll_logs_for_key(+ key,+ min_rows=2,+ predicate=lambda logged: any(row.model == EMBEDDING_MODEL for row in logged),+ )+ embedding_rows: Final = tuple(row for row in rows if row.model == EMBEDDING_MODEL)+ assert embedding_rows, (+ "the routing embedding was not billed to the caller's key; "+ f"spend logs show {tuple(row.model for row in rows)}"+ )_assert_served_only_by(- rows, CHEAP_SERVED | {semantic_auto_router.target}, "semantic auto-router /v1/responses string input"+ [row for row in rows if row.model != EMBEDDING_MODEL],+ CHEAP_SERVED | {semantic_auto_router.target},+ "semantic auto-router /v1/responses string input",)