mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-20 04:21:23 +00:00
The AI SDK can produce assistant messages with empty parts (parts:[]) when a stream is aborted, and providers reject assistant messages with empty text content. This adds a validation utility that filters both cases before sending messages to createAgentUIStreamResponse and when persisting them.