Fix: Propagate Generic Type to `GenerateStreamResponse.stream`
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
Checklist (if applicable):
- [x] PR title is following https://www.conventionalcommits.org/en/v1.0.0/
- [x] Tested (manually, unit tested, etc.)
- [ ] Docs updated (updated docs or a docs bug required)
I've encountered the same type inference issue with the stream response. It would be great if this could be merged soon as it's blocking proper TypeScript support for streaming.
@apascal07 quick follow-up on this PR when you have a moment. Happy to adjust anything if needed. Thanks!