From 19b44e3e05f5a33efc76cb162b40327731bb5406 Mon Sep 17 00:00:00 2001 From: yucheng Date: Mon, 14 Sep 2026 19:49:10 +0000 Subject: [PATCH] style(logging): format callback redaction flow Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/litellm_core_utils/litellm_logging.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index c9dc1d49a36..eebd61b5b86 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -3194,7 +3194,9 @@ class Logging(LiteLLMLoggingBaseClass): ) if isinstance(callback, CustomLogger): # custom logger class - callback_model_call_details: Final[dict] = self.model_call_details # mutable-ok: callback payload API + callback_model_call_details: Final[dict] = ( + self.model_call_details + ) # mutable-ok: callback payload API ################################## # call redaction hook for custom logger standard_redacted_model_call_details: Final[dict] = ( # mutable-ok: callback payload API @@ -3202,11 +3204,15 @@ class Logging(LiteLLMLoggingBaseClass): model_call_details=callback_model_call_details ) ) - streaming_redacted_model_call_details: Final[dict] = redact_streaming_responses_for_custom_logger( # mutable-ok: callback payload API - model_call_details=standard_redacted_model_call_details, custom_logger=callback + streaming_redacted_model_call_details: Final[dict] = ( + redact_streaming_responses_for_custom_logger( # mutable-ok: callback payload API + model_call_details=standard_redacted_model_call_details, custom_logger=callback + ) ) - redacted_model_call_details: Final[dict] = redact_model_call_details_for_custom_logger( # mutable-ok: callback payload API - model_call_details=streaming_redacted_model_call_details, custom_logger=callback + redacted_model_call_details: Final[dict] = ( + redact_model_call_details_for_custom_logger( # mutable-ok: callback payload API + model_call_details=streaming_redacted_model_call_details, custom_logger=callback + ) ) ################################## if self.stream is True: