diff --git a/litellm/proxy/common_request_processing.py b/litellm/proxy/common_request_processing.py index 13b55bff46..68fa80c2b0 100644 --- a/litellm/proxy/common_request_processing.py +++ b/litellm/proxy/common_request_processing.py @@ -1,5 +1,6 @@ import asyncio import json +import logging import traceback from datetime import datetime from typing import ( @@ -385,11 +386,12 @@ class ProxyBaseLLMRequestProcessing: """ Common request processing logic for both chat completions and responses API endpoints """ - verbose_proxy_logger.debug( - "Request received by LiteLLM:\n{}".format( - json.dumps(self.data, indent=4, default=str) - ), - ) + if verbose_proxy_logger.isEnabledFor(logging.DEBUG): + verbose_proxy_logger.debug( + "Request received by LiteLLM:\n{}".format( + json.dumps(self.data, indent=4, default=str) + ), + ) self.data, logging_obj = await self.common_processing_pre_call_logic( request=request,