fix(provider-utils): fix SSE parser bug (CRLF)#6197
Merged
lgrammel merged 3 commits intovercel:mainfrom May 7, 2025
Merged
Conversation
lgrammel
approved these changes
May 7, 2025
lgrammel
reviewed
May 7, 2025
.changeset/shaggy-singers-promise.md
Outdated
| @@ -0,0 +1,5 @@ | |||
| --- | |||
| '@ai-sdk/provider-utils': major | |||
lgrammel
reviewed
May 7, 2025
.changeset/shaggy-singers-promise.md
Outdated
| '@ai-sdk/provider-utils': major | ||
| --- | ||
|
|
||
| SSE parser bug (CRLF should be handled correctly) |
Collaborator
There was a problem hiding this comment.
pls change to fix(provider-utils): fix SSE parser bug (CRLF)
CRLF pointer was incorrectly implemented in event-source-parser-stream
da881f2 to
8c7fcc7
Compare
lgrammel
pushed a commit
that referenced
this pull request
May 7, 2025
## Background The below MCP SSE message will make the stream reader timeout. ``` data: /message?sessionId=123\r\nevent: endpoint ``` ## Summary Fix the `splitLines` parser issue. The CRLF pointer was incorrectly implemented.
lgrammel
added a commit
that referenced
this pull request
May 7, 2025
## Background The below MCP SSE message will make the stream reader timeout. ``` data: /message?sessionId=123\r\nevent: endpoint ``` ## Summary Fix the `splitLines` parser issue. The CRLF pointer was incorrectly implemented. Co-authored-by: Wei-Chieh Hsia <passion804222@gmail.com>
iteratetograceness
pushed a commit
to iteratetograceness/ai
that referenced
this pull request
May 9, 2025
…6200) ## Background The below MCP SSE message will make the stream reader timeout. ``` data: /message?sessionId=123\r\nevent: endpoint ``` ## Summary Fix the `splitLines` parser issue. The CRLF pointer was incorrectly implemented. Co-authored-by: Wei-Chieh Hsia <passion804222@gmail.com>
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.
CRLF pointer was incorrectly implemented in event-source-parser-stream
Background
The below MCP SSE message will make the stream reader timeout.
Summary
Fix the
splitLinesparser issue. The CRLF pointer was incorrectly implemented.Verification
pnpm testTasks
pnpm changesetin the project root)pnpm prettier-fixin the project root)