fix(logging): redact vector store, RAG, Groq tool, Databricks agent and tool search results in provider_specific_fields

This commit is contained in:
mateo-berri 2026-11-04 08:39:33 -08:00
parent 0b899980d4
commit 1b93114661
2 changed files with 10 additions and 0 deletions

View file

@ -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

View file

@ -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},