From d9ff13b6241b0f9eeb1ed445ccfc28f031f6a385 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 30 Mar 2024 20:10:56 -0700 Subject: [PATCH] fix(utils.py): set redis_usage_cache to none by default --- litellm/proxy/utils.py | 4 +++- litellm/tests/test_blocked_user_list.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index 7d3e30f865..f75a3ff562 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -48,7 +48,9 @@ class ProxyLogging: """ def __init__( - self, user_api_key_cache: DualCache, redis_usage_cache: Optional[RedisCache] + self, + user_api_key_cache: DualCache, + redis_usage_cache: Optional[RedisCache] = None, ): ## INITIALIZE LITELLM CALLBACKS ## self.call_details: dict = {} diff --git a/litellm/tests/test_blocked_user_list.py b/litellm/tests/test_blocked_user_list.py index d3f9f6a1a3..5337275051 100644 --- a/litellm/tests/test_blocked_user_list.py +++ b/litellm/tests/test_blocked_user_list.py @@ -61,7 +61,7 @@ from litellm.proxy.utils import DBClient from starlette.datastructures import URL from litellm.caching import DualCache -proxy_logging_obj = ProxyLogging(user_api_key_cache=DualCache()) +proxy_logging_obj = ProxyLogging(user_api_key_cache=DualCache(), redis_usage_cache=None) @pytest.fixture