Removing the expected functionality for generate broke my workflow
I'm curious why generate is now just the lightest weight wrapper around stream (https://github.com/mastra-ai/mastra/blob/01605282391c6be2c570f9fdcc808e2b063806cd/packages/core/src/agent/agent.ts#L3307). This feels like an opinionated choice, but it was both not made transparent that when you use generate you are now actually using stream (which ended up breaking our workflow) and not justified as to why this opinion is held. By using the function call generate one would expect a different underlying function call than just wrapping stream. Is there anyway we can get the generate functionality back (the same functionality that aisdk offers)?
GitHub
mastra/packages/core/src/agent/agent.ts at 01605282391c6be2c570f9fd...
The TypeScript AI agent framework. ⚡ Assistants, RAG, observability. Supports any LLM: GPT-4, Claude, Gemini, Llama. - mastra-ai/mastra
2 Replies
Hi @Zack ! We moved to stream because we now control our entire agentic loop, whereas before we had a high reliance on the ai-sdk's "generate" implementation which was not compatible with the way we now stream things in the framework. (nested streams for example) (see https://mastra.ai/blog/mastra-streaming for more info)
If you're having issues with the new "generate" implementation then it's likely a bug. Could you share more info about the issue you're running into?
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8475
GitHub
[DISCORD:1423658122299314258] Removing the expected functionality f...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1423658122299314258 I'm curious why generate is now just the lightest weight wrapper around stream ( m...