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_async_router_context_window_fallback

Ishaan Jaff54811cf595aa
diff --git a/tests/local_testing/test_router.py b/tests/local_testing/test_router.py
index f4fbeaff1c1..fd4922fbb84 100644
--- a/tests/local_testing/test_router.py
+++ b/tests/local_testing/test_router.py
@@ -768,7 +768,10 @@ async def test_async_router_context_window_fallback(sync_mode):
else:
response = router.completion(
model="gpt-4",
- messages=[{"role": "user", "content": "Who was Alexander?"}],
+ messages=[
+ {"role": "system", "content": text * 2},
+ {"role": "user", "content": "Who was Alexander?"},
+ ],
)
assert "gpt-4-turbo" in response.model
except Exception as e: