Skip to content

fix(client): handle \r\n SSE line endings, release GIL in Python#15

Merged
lostmygithubaccount merged 2 commits intomainfrom
cody/sse-fixes
Apr 6, 2026
Merged

fix(client): handle \r\n SSE line endings, release GIL in Python#15
lostmygithubaccount merged 2 commits intomainfrom
cody/sse-fixes

Conversation

@lostmygithubaccount
Copy link
Copy Markdown
Member

Summary

  • Normalize \r\n to \n in SSE buffer before parsing for spec compliance
  • Release GIL during blocking chat() network I/O in Python bindings via py.allow_threads()
  • Add unit tests for \r\n SSE event parsing (single + multiple events)

@lostmygithubaccount lostmygithubaccount enabled auto-merge (squash) April 5, 2026 23:54
lostmygithubaccount and others added 2 commits April 5, 2026 20:33
- Normalize \r\n to \n in SSE buffer before parsing (spec compliance)
- Wrap blocking chat() with py.allow_threads() to release GIL during network I/O
- Add tests for \r\n SSE event parsing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lostmygithubaccount lostmygithubaccount merged commit 5243f55 into main Apr 6, 2026
1 check passed
@lostmygithubaccount lostmygithubaccount deleted the cody/sse-fixes branch April 6, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant