Skip to content

feat: Reify SSE state machine#1428

Merged
joshua-mo-143 merged 4 commits intomainfrom
harden-SSE-impl
Feb 24, 2026
Merged

feat: Reify SSE state machine#1428
joshua-mo-143 merged 4 commits intomainfrom
harden-SSE-impl

Conversation

@FayCarsons
Copy link
Copy Markdown
Contributor

I noticed the SSE implementation had an implicit state machine and thought I would refactor it into an explicit one for the sake of safety and maintainability. Also removed a panic and some unnecessary boxing. RetryStrategy is now generic, and we have a with_retry_strategy function for instantiating a GenericEventSource with a particular retry strategy.

I've tested this with all of the anthropic streaming examples.

Copy link
Copy Markdown
Contributor

@joshua-mo-143 joshua-mo-143 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work Fay!

Tested with OpenAI Responses API, seems to work correctly.

@joshua-mo-143 joshua-mo-143 added this pull request to the merge queue Feb 24, 2026
Merged via the queue into main with commit 390c2f6 Feb 24, 2026
6 checks passed
@FayCarsons FayCarsons deleted the harden-SSE-impl branch February 24, 2026 16:27
@github-actions github-actions Bot mentioned this pull request Feb 24, 2026
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.

2 participants