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]

Update error message for missing Redis config

yuneng-jiangb70ba3e6ed89
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py
index d8304cabd56..db0bb735bab 100644
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@ -5632,11 +5632,6 @@ class ProxyStartupEvent:
"""
Validates that when use_redis_transaction_buffer is enabled,
a Redis cache is properly configured in litellm_settings.
-
- Without Redis, spend updates are silently dropped because:
- - In-memory queues are drained but never pushed to Redis
- - The pod lock manager cannot acquire locks for DB commits
- - No fallback to direct DB writes occurs
"""
from litellm.secret_managers.main import str_to_bool
@@ -5648,10 +5643,9 @@ class ProxyStartupEvent:
if _use_redis_transaction_buffer and redis_usage_cache is None:
raise ValueError(
- "`use_redis_transaction_buffer` is enabled in general_settings, "
- "but no Redis cache is configured. Spend tracking will silently "
- "fail without Redis. Please add a Redis cache configuration in "
- "litellm_settings:\n\n"
+ "`use_redis_transaction_buffer` is enabled in general_settings "
+ "but no Redis cache is configured. This will cause spend updates "
+ "to not be tracked. Add a Redis cache in litellm_settings:\n\n"
"litellm_settings:\n"
" cache: true\n"
" cache_params:\n"