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]

test(e2e): bypass the proxy response cache in the mid-conversation system and fallback tests (#37915)

yuneng-jiangadd2d23df22e
diff --git a/tests/e2e/llm_translation/endpoints_client.py b/tests/e2e/llm_translation/endpoints_client.py
index 5df61247db2..fa33737467e 100644
--- a/tests/e2e/llm_translation/endpoints_client.py
+++ b/tests/e2e/llm_translation/endpoints_client.py
@@ -87,6 +87,7 @@ class RichMessagesRequest(BaseModel):
max_tokens: int = 64
system: list[TextBlock]
messages: list[RichMessage]
+ cache: dict[str, bool] = {"no-cache": True}
class CompletionsRequest(BaseModel):
diff --git a/tests/e2e/router/reliability_support.py b/tests/e2e/router/reliability_support.py
index 4dab0aaa3fa..cd70ac45da6 100644
--- a/tests/e2e/router/reliability_support.py
+++ b/tests/e2e/router/reliability_support.py
@@ -56,7 +56,7 @@ def chat_override(
json=ReliabilityChatBody(
model=model,
messages=[ChatMessage(role="user", content=content)],
- max_tokens=16,
+ max_tokens=64,
stream=stream,
router_settings_override=override,
),
diff --git a/tests/e2e/router/test_reliability_fallbacks_e2e.py b/tests/e2e/router/test_reliability_fallbacks_e2e.py
index 5b7d21c6ef7..fe2d924ae2c 100644
--- a/tests/e2e/router/test_reliability_fallbacks_e2e.py
+++ b/tests/e2e/router/test_reliability_fallbacks_e2e.py
@@ -49,7 +49,7 @@ class TestReliabilityFallbacks:
resources.defer(lambda: client.proxy.delete_model(model_id))
resp = chat_override(
- client.proxy, scoped_key, primary, "say hi",
+ client.proxy, scoped_key, primary, f"say hi {unique_marker()}",
override=RouterSettingsOverride(fallbacks=[{primary: ["gpt-5.5"]}]),
)
_assert_served_by_fallback(resp)
@@ -63,7 +63,7 @@ class TestReliabilityFallbacks:
resources.defer(lambda: client.proxy.delete_model(model_id))
resp = chat_override(
- client.proxy, scoped_key, primary, "say hi",
+ client.proxy, scoped_key, primary, f"say hi {unique_marker()}",
override=RouterSettingsOverride(fallbacks=[{primary: ["gpt-5.5"]}]),
)
_assert_served_by_fallback(resp)