From dd15785db7df35f3c53144279697fb48cf540566 Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Sat, 28 Feb 2026 11:02:03 -0800 Subject: [PATCH] Preserve RedactedDict type through copy() --- litellm/types/proxy/litellm_pre_call_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litellm/types/proxy/litellm_pre_call_utils.py b/litellm/types/proxy/litellm_pre_call_utils.py index 95f0107bf65..e0d3f3dac66 100644 --- a/litellm/types/proxy/litellm_pre_call_utils.py +++ b/litellm/types/proxy/litellm_pre_call_utils.py @@ -10,6 +10,9 @@ class RedactedDict(dict): def __str__(self) -> str: return "RedactedDict(REDACTED)" + def copy(self) -> "RedactedDict": + return RedactedDict(super().copy()) + class SecretFields(TypedDict): """