co-mono/packages
Mario Zechner 4e7a340460 Add Unicode surrogate sanitization for all providers
Fixes issue where unpaired Unicode surrogates in tool results cause JSON serialization errors in API providers, particularly Anthropic.

- Add sanitizeSurrogates() utility function to remove unpaired surrogates
- Apply sanitization in all provider convertMessages() functions:
  - User message text content (string and text blocks)
  - Assistant message text and thinking blocks
  - Tool result output
  - System prompts
- Valid emoji (properly paired surrogates) are preserved
- Add comprehensive test suite covering all 8 providers

Previously only Google and Groq handled unpaired surrogates correctly.
Now all providers (Anthropic, OpenAI Completions/Responses, Google, xAI, Groq, Cerebras, zAI) sanitize text before API submission.
2025-10-13 14:26:54 +02:00
..
agent Bump version to 0.5.44 2025-10-05 23:00:59 +02:00
ai Add Unicode surrogate sanitization for all providers 2025-10-13 14:26:54 +02:00
pods Bump version to 0.5.44 2025-10-05 23:00:59 +02:00
proxy Bump version to 0.5.44 2025-10-05 23:00:59 +02:00
tui Bump version to 0.5.44 2025-10-05 23:00:59 +02:00
web-ui Fix console.log duplication bug in ConsoleRuntimeProvider 2025-10-13 00:20:23 +02:00