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
Fix flaky test_caching_with_ttl by using distinct mock responses
yuneng-jiang670f8a1dd180
diff --git a/tests/local_testing/test_caching.py b/tests/local_testing/test_caching.pyindex 16564cc690e..01004e4bfa0 100644--- a/tests/local_testing/test_caching.py+++ b/tests/local_testing/test_caching.py@@ -200,9 +200,9 @@ def test_caching_with_ttl():litellm.set_verbose = Truelitellm.cache = Cache()response1 = completion(- model="gpt-3.5-turbo", messages=messages, caching=True, ttl=0, mock_response="Hello world from cache test"+ model="gpt-3.5-turbo", messages=messages, caching=True, ttl=0, mock_response="Hello world from cache test 1")- response2 = completion(model="gpt-3.5-turbo", messages=messages, caching=True, mock_response="Hello world from cache test")+ response2 = completion(model="gpt-3.5-turbo", messages=messages, caching=True, mock_response="Hello world from cache test 2")print(f"response1: {response1}")print(f"response2: {response2}")litellm.cache = None # disable cache