Streaming from a workflow step when using Inngest
I'm currently struggling with streaming an agent response from a workflow when running it through the Inngest Dev Server.
For the Mastra workflow I'm using the
workflowRoute with patched streaming support as described in this post.
This works fine when using Mastra standalone and consuming it with AI-SDK on the frontend.
But when I run it through Inngest, I get an error inside @mastra/inngest:
I found an option on the inngestServe function that I tried:
Unfortunately this didn't resolve the issue.
I know this scenario could be considered hacky because of the patch I linked above. But I was just curious if there are any working examples for this use case and whether or not this will be supported at some point.
Thanks in advance for any help!5 Replies
๐ Created GitHub issue: https://github.com/mastra-ai/mastra/issues/10216
๐ If you're experiencing an error, please provide a minimal reproducible example to help us resolve it quickly.
๐ Thank you @Sebastian for helping us improve Mastra!
Hey @Sebastian ! That looks like an oversight to be honest, we haven't done many updates to the Inngest integration since we shipped our new streaming features.
You can follow the above GH issue for updates ๐
@Sebastian if you use writer.custom, it already works but in our next release we will grep all data chunks ourselves.
https://github.com/mastra-ai/mastra/pull/10447
GitHub
fix/workflow step output data chunks by TheIsrael1 ยท Pull Request ...
fix(ai-sdk): propagate custom data chunks from nested workflows in branches to root stream
changeset
Description
Fixes #10260
Fixes #10433
Related Issue(s)
Type of Change
Bug fix (non-breaking...
@Sebastian we fixed this in latest beta. I don't believe we can backport this change easily @rase-
@Ward thanks for the info. I'll try to give the beta another spin next week.