Skip to content

feat: add fromReadableStream to ResponseStream#1987

Open
morgan-coded wants to merge 1 commit into
openai:mainfrom
morgan-coded:fix/1376-response-stream-readable
Open

feat: add fromReadableStream to ResponseStream#1987
morgan-coded wants to merge 1 commit into
openai:mainfrom
morgan-coded:fix/1376-response-stream-readable

Conversation

@morgan-coded

Copy link
Copy Markdown
  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

ResponseStream does not have the same readable-stream rehydration helper that ChatCompletionStream and AssistantStream expose, so callers proxying newline-delimited response stream events cannot turn them back into a ResponseStream. This adds ResponseStream.fromReadableStream() and a protected _fromReadableStream() path that reads ResponseStreamEvent values through Stream.fromReadableStream() and feeds them through the existing response-stream event handling. Generated response resources stay unchanged.

Additional context & links

Fixes #1376

@morgan-coded morgan-coded requested a review from a team as a code owner July 8, 2026 22:40
Copilot AI review requested due to automatic review settings July 8, 2026 22:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Add fromReadableStream or similar to the ResponseStream class

2 participants