From f0224860345ee01a974d76459e37bddfc5b5dd66 Mon Sep 17 00:00:00 2001 From: Emerson Gomes Date: Sat, 26 Sep 2026 11:49:54 -0500 Subject: [PATCH] fix(logging): avoid copying Responses output twice --- litellm/litellm_core_utils/redact_messages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/litellm_core_utils/redact_messages.py b/litellm/litellm_core_utils/redact_messages.py index d7d1d9128d1..2a41934f43b 100644 --- a/litellm/litellm_core_utils/redact_messages.py +++ b/litellm/litellm_core_utils/redact_messages.py @@ -173,7 +173,7 @@ def _redact_responses_api_output_dict(output_items, redacted_str: str): def _redacted_responses_api_response(response: Mapping[str, object]) -> dict[str, object]: - output: Final = copy.deepcopy(response.get("output")) + output: Final = response.get("output") if isinstance(output, list): _redact_responses_api_output_dict(output, REDACTED_BY_LITELLM) return {