diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 512e956b0..eaa2373cc 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -1382,8 +1382,6 @@ async def initialize( verbose_proxy_logger.setLevel( level=logging.DEBUG ) # set proxy logs to debug - litellm.set_verbose = True - dynamic_config = {"general": {}, user_model: {}} if config: ( diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index d49ace138..812157ca0 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -995,15 +995,14 @@ def get_logging_payload(kwargs, response_obj, start_time, end_time): if api_key is not None and isinstance(api_key, str) and api_key.startswith("sk-"): # hash the api_key api_key = hash_token(api_key) - from litellm.caching import Cache - - c = Cache() - cache_key = c.get_cache_key(**kwargs) - if "headers" in metadata and "authorization" in metadata["headers"]: metadata["headers"].pop( "authorization" ) # do not store the original `sk-..` api key in the db + if litellm.cache is not None: + cache_key = litellm.cache.get_cache_key(**kwargs) + else: + cache_key = "Cache OFF" payload = { "request_id": id,