fix(logging): redact Bedrock streamed reasoningContent and file annotations in provider_specific_fields

This commit is contained in:
mateo-berri 2026-11-04 09:28:21 -08:00
parent 1b93114661
commit 102bd94828
2 changed files with 4 additions and 0 deletions

View file

@ -279,6 +279,8 @@ def _redacted_provider_specific_fields(fields: Mapping[str, object]) -> Mapping[
for key in (
"thinking_blocks",
"reasoningContentBlocks",
"reasoningContent",
"annotations",
"citations",
"citation",
"citationsContent",

View file

@ -59,6 +59,8 @@ def _provider_fields() -> dict[str, object]:
"reasoning_details": [{"type": "reasoning.text", "text": SECRET, "index": 0, "format": "unknown"}],
"thinking_blocks": [{"type": "thinking", "thinking": SECRET}],
"reasoningContentBlocks": [{"reasoningText": {"text": SECRET}}],
"reasoningContent": {"reasoningText": {"text": SECRET}},
"annotations": [{"type": "file", "file": {"name": "notes.pdf", "content": [{"type": "text", "text": SECRET}]}}],
"citations": [{"cited_text": SECRET}],
"citationsContent": [{"citations": [{"location": {}}], "content": [{"text": SECRET}]}],
"citation": {"type": "char_location", "cited_text": SECRET},