Skip to content

feat(ai): emit streaming chunks throught the onChunk callback#14331

Merged
aayush-kapoor merged 4 commits intomainfrom
aayush/streaming-chunks
Apr 10, 2026
Merged

feat(ai): emit streaming chunks throught the onChunk callback#14331
aayush-kapoor merged 4 commits intomainfrom
aayush/streaming-chunks

Conversation

@aayush-kapoor
Copy link
Copy Markdown
Collaborator

Background

added as work for #14207

when using the streaming functions and logging telemetry via devtools, the raw chunks couldn't be seen in the viewer.
and that's because the event types weren't being passed through callbacks

Summary

dispatch content chunk types through the global onChunk so that telemetry integrations receive the full stream.

Manual Verification

verified as a part of #14207

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

@tigent tigent bot added ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. bug Something isn't working as documented maintenance CI, internal documentation, automations, etc labels Apr 10, 2026
@aayush-kapoor aayush-kapoor merged commit 2fe1099 into main Apr 10, 2026
17 checks passed
@aayush-kapoor aayush-kapoor deleted the aayush/streaming-chunks branch April 10, 2026 17:59
@vercel-ai-sdk
Copy link
Copy Markdown
Contributor

vercel-ai-sdk bot commented Apr 10, 2026

🚀 Published in:

Package Version
ai 7.0.0-beta.81
@ai-sdk/angular 3.0.0-beta.81
@ai-sdk/langchain 3.0.0-beta.81
@ai-sdk/llamaindex 3.0.0-beta.81
@ai-sdk/otel 1.0.0-beta.27
@ai-sdk/react 4.0.0-beta.81
@ai-sdk/rsc 3.0.0-beta.82
@ai-sdk/svelte 5.0.0-beta.81
@ai-sdk/vue 4.0.0-beta.81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. bug Something isn't working as documented maintenance CI, internal documentation, automations, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants