Skip to content

Conversation

Dinesh-Gautam
Copy link

Fixes: #3603

Context

The GenerateStreamResponse interface did not propagate its generic O type to the stream property.
As a result, the chunks yielded by stream were always typed as GenerateResponseChunk<unknown>,
forcing users to manually assert types and losing schema-based type inference.

What Was Changed

Updated the GenerateStreamResponse interface to propagate the generic O type to the stream property.

After Changes

Screenshot 2025-09-22 211707

Checklist (if applicable):

@github-actions github-actions bot added the js label Sep 22, 2025
@Dinesh-Gautam Dinesh-Gautam marked this pull request as draft September 22, 2025 16:49
@Dinesh-Gautam Dinesh-Gautam marked this pull request as ready for review September 22, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[JS] Incorrect Generic Type for generateStream's Stream Response
1 participant