Streamed replies were dropped, persisting blank assistant messages

FixAIService
Shipped
July 18, 2026 at 9:41 PM UTC
Author
Kamo
Commit
8a9a63b

Every successful chat completion came back as an EMPTY assistant bubble. The assistant rows were being saved with content_len=0 and is_error=false, so there was nothing to debug from — the clients were faithfully rendering nothing. Cause: the streaming adapters filtered on a literal "data: " prefix (`filter(line -> line.startsWith("data: "))`). WebClient decodes text/event-stream itself, so chunks arrive with that prefix ALREADY stripped — every token was filtered out, the Flux completed empty, and doOnComplete persisted "". It only showed up on a SUCCESSFUL response, which is why the HuggingFace org (which always failed with model_not_supported and surfaced its error) looked different from the - OpenAiCompatibleAdapter / HuggingFaceAdapter: accept SSE chunks with OR without the "data: " prefix instead of requiring it. - ChatOrchestrationService: a stream completing with zero tokens is a failure, not an answer — log the provider/model and persist an explicit error (is_error=true) so it is visible instead of a silent blank bubble.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing