diff --git a/litellm/litellm_core_utils/redact_messages.py b/litellm/litellm_core_utils/redact_messages.py index 55741790954..18bacc88c6c 100644 --- a/litellm/litellm_core_utils/redact_messages.py +++ b/litellm/litellm_core_utils/redact_messages.py @@ -148,7 +148,7 @@ def _redacted_provider_specific_fields(fields: Mapping[str, object]) -> Mapping[ **fields, **({"reasoning_content": REDACTED_BY_LITELLM} if fields.get("reasoning_content") is not None else {}), **({"reasoning": REDACTED_BY_LITELLM} if fields.get("reasoning") is not None else {}), - **{key: None for key in ("thinking_blocks", "reasoningContentBlocks", "citations") if key in fields}, + **{key: None for key in ("thinking_blocks", "reasoningContentBlocks", "citations", "reasoning_details") if key in fields}, } diff --git a/tests/unit/litellm_core_utils/test_redact_messages.py b/tests/unit/litellm_core_utils/test_redact_messages.py index f279cf82cef..dc9148f6526 100644 --- a/tests/unit/litellm_core_utils/test_redact_messages.py +++ b/tests/unit/litellm_core_utils/test_redact_messages.py @@ -52,6 +52,7 @@ def _provider_fields() -> dict[str, object]: return { "reasoning_content": SECRET, "reasoning": SECRET, + "reasoning_details": [{"type": "reasoning.text", "text": SECRET, "index": 0, "format": "unknown"}], "thinking_blocks": [{"type": "thinking", "thinking": SECRET}], "reasoningContentBlocks": [{"reasoningText": {"text": SECRET}}], "citations": [{"cited_text": SECRET}],