Skip to content

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]

fix(e2e): register the load mock model through load_key instead of an autouse fixture so harness tests run without a proxy

mateo-berri33fb38056ddc
diff --git a/tests/e2e/load/conftest.py b/tests/e2e/load/conftest.py
index d9b1b2d9d69..89a571af83e 100644
--- a/tests/e2e/load/conftest.py
+++ b/tests/e2e/load/conftest.py
@@ -51,10 +51,8 @@ def _model_is_servable(proxy: ProxyClient, model_name: str) -> bool:
return isinstance(result, Success) and any(entry.id == model_name for entry in result.data.data)
[email protected](scope="session", autouse=True)
-def _ensure_load_model( # pyright: ignore[reportUnusedFunction] # pytest autouse session fixture, wired by name
- client: LoadClient,
-) -> Iterator[None]:
[email protected](scope="session")
+def ensure_load_model(client: LoadClient) -> Iterator[None]:
proxy = client.proxy
if _model_is_servable(proxy, LOAD_MODEL):
yield
@@ -78,7 +76,9 @@ def _ensure_load_model( # pyright: ignore[reportUnusedFunction] # pytest autou
@pytest.fixture
-def load_key(resources: ResourceManager, client: LoadClient) -> str:
+def load_key(
+ resources: ResourceManager, client: LoadClient, ensure_load_model: None
+) -> str:
key = client.proxy.generate_key(KeyGenerateBody(models=[LOAD_MODEL], user_id="e2e-load"))
resources.defer(lambda: client.proxy.delete_key(key))
return key