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 flaky tests

Ishaan Jaff3966c545b4d3
diff --git a/litellm/tests/test_completion.py b/litellm/tests/test_completion.py
index 01435d6a3e0..baf528d8bc5 100644
--- a/litellm/tests/test_completion.py
+++ b/litellm/tests/test_completion.py
@@ -4078,6 +4078,7 @@ def test_completion_nvidia_nim():
# "gemini-1.5-flash",
],
)
[email protected](retries=3, delay=1)
def test_completion_gemini(model):
litellm.set_verbose = True
model_name = "gemini/{}".format(model)
diff --git a/litellm/tests/test_parallel_request_limiter.py b/litellm/tests/test_parallel_request_limiter.py
index 463f9cf50d1..5173bc9c058 100644
--- a/litellm/tests/test_parallel_request_limiter.py
+++ b/litellm/tests/test_parallel_request_limiter.py
@@ -758,6 +758,7 @@ async def test_streaming_router_tpm_limit():
@pytest.mark.asyncio
[email protected](retries=3, delay=1)
async def test_bad_router_call():
litellm.set_verbose = True
model_list = [
diff --git a/litellm/tests/test_router_caching.py b/litellm/tests/test_router_caching.py
index cfe3bc7c0b1..10b23c295bf 100644
--- a/litellm/tests/test_router_caching.py
+++ b/litellm/tests/test_router_caching.py
@@ -142,6 +142,7 @@ async def test_acompletion_caching_on_router():
@pytest.mark.asyncio
[email protected](retries=3, delay=1)
async def test_completion_caching_on_router():
# tests completion + caching on router
try:
diff --git a/litellm/tests/test_streaming.py b/litellm/tests/test_streaming.py
index d7b6af8e1aa..d2ef8aafc7b 100644
--- a/litellm/tests/test_streaming.py
+++ b/litellm/tests/test_streaming.py
@@ -714,6 +714,7 @@ async def test_acompletion_claude_2_stream():
[True, False],
) # ,
@pytest.mark.asyncio
[email protected](retries=3, delay=1)
async def test_completion_gemini_stream(sync_mode):
try:
litellm.set_verbose = True