{{ message }}
Repository navigation
Read model event streams with every SSE line ending - #1050
Merged
Merged
Conversation
Signed-off-by: dada-yan <BinjunYann@gmail.com>
WaylandYang
approved these changes
Oct 2, 2026
WaylandYang
left a comment
Contributor
There was a problem hiding this comment.
Thanks @Maya-Kid. Read the buffer and the three call sites. One shared SseBuffer that normalises CRLF and bare CR before framing, remembers a CR across chunks and keeps bytes until a frame is whole is the right shape, and the every-byte-split test pins it. The 47 tests pass here. Landing it.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

An OpenAI-compatible endpoint using CRLF could send a valid answer that the raw and tool readers reported as
Interruptedwith zero characters; a bare-CR stream also failed in the collected reader. All three readers looked only for LF/LF frame boundaries.Normalize the SSE line endings in a shared byte buffer before framing. It remembers a CR across network chunks, preserves split UTF-8, and keeps the existing completion and interruption semantics. No dependency or public API changes.
Validation:
cargo +1.98.1 fmt --all --check, workspace clippy with-D warnings, workspace tests with PostgreSQL 16/pgvector and required DB/PDF guards, and workspace build pass.