From a49bd460e0b072cc4fbe268f4ae442df908f10ca Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 19 Mar 2025 17:38:24 -0700 Subject: [PATCH] get_custom_logger_for_prompt_management --- litellm/litellm_core_utils/litellm_logging.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index b8e7df870b..0a51fb2072 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -447,7 +447,9 @@ class Logging(LiteLLMLoggingBaseClass): self.messages = messages return model, messages, non_default_params - def get_custom_logger_for_prompt_management(self, model: str) -> CustomLogger: + def get_custom_logger_for_prompt_management( + self, model: str + ) -> Optional[CustomLogger]: for ( custom_logger_compatible_callback ) in litellm._known_custom_logger_compatible_callbacks: @@ -468,7 +470,7 @@ class Logging(LiteLLMLoggingBaseClass): ) if len(custom_prompt_management_loggers) > 0: return custom_prompt_management_loggers[0] - raise ValueError(f"No custom logger found for model: {model}") + return None def _get_raw_request_body(self, data: Optional[Union[dict, str]]) -> dict: if data is None: