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 for pl obj

Ishaan Jaffdb0ad40e9888
diff --git a/litellm/tests/test_caching.py b/litellm/tests/test_caching.py
index db2e7e1c414..660cf68ea95 100644
--- a/litellm/tests/test_caching.py
+++ b/litellm/tests/test_caching.py
@@ -1985,3 +1985,14 @@ async def test_dual_cache_uses_redis():
value = await _cache_obj.async_get_cache(key=f"current_usage: {current_usage}")
print("value from dual cache", value)
assert value == 10
+
+
+async def test_proxy_logging_setup():
+ """
+ Assert always_read_redis is True when used by internal usage cache
+ """
+ from litellm.proxy.utils import ProxyLogging
+
+ pl_obj = ProxyLogging()
+ assert pl_obj.internal_usage_cache.always_read_redis is True