fix: Add support for multimodal content (text + images)
Fixes crashes when processing OpenAI Chat Completion requests with
multimodal content (array format). Previously, the code assumed message
content is always a string, causing Presidio errors and 502/503 responses
when LibreChat Agents sent vision requests.
Changes:
- Add extractTextContent() utility to safely extract text from both
string and array content formats
- Update PII detection to handle multimodal messages
- Update secrets detection to extract text from array content
- Update message redaction to preserve images while redacting text
- Fix dashboard display to show readable content instead of [object Object]
This enables full support for OpenAI's multimodal API format while
maintaining PII/secrets protection on text portions.
Resolves issues with LibreChat Agents feature returning 502 errors.