From 1b93114661dc61766b7089cf5564077ff3ec0885 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Wed, 4 Nov 2026 08:39:33 -0800 Subject: [PATCH] fix(logging): redact vector store, RAG, Groq tool, Databricks agent and tool search results in provider_specific_fields --- litellm/litellm_core_utils/redact_messages.py | 5 +++++ tests/unit/litellm_core_utils/test_redact_messages.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/litellm/litellm_core_utils/redact_messages.py b/litellm/litellm_core_utils/redact_messages.py index 0e49f68043d..996ffed03f4 100644 --- a/litellm/litellm_core_utils/redact_messages.py +++ b/litellm/litellm_core_utils/redact_messages.py @@ -290,6 +290,11 @@ def _redacted_provider_specific_fields(fields: Mapping[str, object]) -> Mapping[ "web_search_results", "tool_results", "code_interpreter_results", + "search_results", + "rerank_results", + "executed_tools", + "custom_outputs", + "tool_search_items", "token_ids", ) 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 47654321fa1..361a376d5fc 100644 --- a/tests/unit/litellm_core_utils/test_redact_messages.py +++ b/tests/unit/litellm_core_utils/test_redact_messages.py @@ -66,6 +66,11 @@ def _provider_fields() -> dict[str, object]: "web_search_results": [{"type": "web_search_tool_result", "content": [{"title": SECRET}]}], "tool_results": [{"type": "web_fetch_tool_result", "content": {"text": SECRET}}], "code_interpreter_results": [{"stdout": SECRET}], + "search_results": [{"object": "vector_store.search_results.page", "data": [{"content": [{"text": SECRET}]}]}], + "rerank_results": {"results": [{"document": {"text": SECRET}}]}, + "executed_tools": [{"type": "search", "search_results": {"results": [{"content": SECRET}]}}], + "custom_outputs": {"answer": SECRET}, + "tool_search_items": [{"type": "tool_search_output", "tools": [{"description": SECRET}]}], "compaction_blocks": [{"type": "compaction", "content": SECRET, "signature": "compaction-signature"}], "compaction_start": {"type": "compaction", "content": SECRET}, "compaction_delta": {"type": "compaction_delta", "content": SECRET},