mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
sanitizeStreamingChunk() only stripped zero-width characters (U+200B, U+200C, U+200D, U+FEFF) from OpenAI-format choices[].delta.content. Anthropic-native content_block_delta events with text_delta or thinking_delta payloads bypassed that path entirely, leaking U+200D to clients on the Messages API streaming route. Add a content_block_delta branch that strips zero-width characters from delta.text and delta.thinking before returning the event, matching the existing OpenAI path behavior from #5857. Co-authored-by: Austin Liu <austinliu@Austins-MacBook-Air-3.local>