From 583e334bd229ba4fee04ef201a2744f95b0d5758 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 7d3e30f865c..f75a3ff562f 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 d3f9f6a1a32..53372750512 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