Updated to Mastra 0.19 everything breaks
This is starting to feel like a reoccuring pattern. I am avoiding updating mastra now because every-time a new release is pushed it feels like it is not tested, and it introduces new issues that break our existing workflows.
There is no context here, this is just the output we are getting. Worked fine in 0.16.0, and now its broken. Version 0.17.0 and 0.18.0 were also broken so we omited updating to thoes versions, but now we are missing out on core features because they get added in future versions, that have regressive behaviors.
9 Replies
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8452
GitHub
[DISCORD:1423431095889821778] Updated to Mastra 0.19 everything bre...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1423431095889821778 This is starting to feel like a reoccuring pattern. I am avoiding updating mastra now ...
Hi @Raid55 sorry that this is what you're experiencing, we're doing our best to make sure this isn't the case and this type of feedback is always great. Are you able to give me a little more context here so I can reproduce this issue and fix it?
While we try to avoid issues like this, pre 1.0.0 it should be somewhat expected, every minor version is a breaking change and the framework isn't stable yet (until we ship 1.0.0)
that said we're happy to help you every time you run into a blocking bug upgrading packages
I can say first off that I apologies for my more than usual heated message. I was very frustrated yesterday and I wrote that message in the heat of the moment. I understand that Mastra is a pre 1.0 framework and that a lot of things will break and change as you guys get closer to a full release.
That being said, you should start a "stable" branch tag. Pushing new versions is important to move fast and get feedback quickly, but I need to know when a version is considered "stable", otherwise it creates this fear that when I upgrade mastra I have to manually test every workflow and ensure that there are no regressions. Versions 0.17 and 0.18 broke the structuredOutput streaming for us, using a basic workflow and agent, we could not get streaming to stream back chunks until the whole object was finished. Right now 0.16 seems like the most stable release to date for us. You don't sell yourself yourself as a "in-beta" library, you have a lot of case studies of mastra being used in production, and don't have any warnings on the documentation to not use something in production. So a tag like this might be crucial to giving support to the companies that have trusted mastra with their production AI workflows and agents.
the main annoyance here is that small quality of life changes that are usually non-breaking then get bundled with unusable versions. It would be nice instead to see a version
0.16.1 .2 .3 and so on. For example, we are locked out of the new observability improvements introduced in 0.17 when they could of been added as a patch to 0.16.
as for the issue we are going to debug this further on our end to identify to issue. structuredOutput is working for some of our workflows and not others, so we will try to identify the diff and see what changed. The frustrating part is that this would not error before but it is erroring now. We might be at fault here, and mastra simply pushed an update that catched us doing something wrong. My guess is that we are using z.date() somewhere in our structuredOutput since it is the most obvious issue at first glance.Thanks @Raid55 that's really good feedback, appreciate you taking the time to write that out. The team is having a retro tomorrow so we'll discuss this 🙇♂️
@Daniel Lew and @caleb are working on fixing up structured output API this week so if you're able to share a repro that would go a long way! Otherwise we're working on it right now and we can send you a prerelease to try as soon as we have improvements
Hi @Raid55 , we just shipped some big improvements to structuredOutputs in our latest release @mastra/core@0.21.0 including:
- Using native response format by default (if your model does not support that you can opt into jsonPromptInjection: true which will inject the schema and other information into the prompt to coerce the model to try to return structuredOutput)
- Validating the output properly using zods safeParse and returning a list of detailed zod errors. This allows you to use all Zod's methods like transform and all native zod methods. When something goes wrong you now have detailed error messaging so you can get the model to retry in cases when the LLM trips up
- Only use the structuring sub agent if a model is passed in, otherwise do everything in the main agentic loop
- Better type safety with the response object
- Passing context that was missing before to the structuring agent so it can provide better results
- Merge the subagent stream into the parent stream to get object-result chunks in the main stream.
Try it out and let us know what you think! Let us know if it fixes your issues or if there is still some more work to be done!
i also like to add some frustration with breaking changes. we do need a stable tag to help i think. in some cases i find bugs that require an upgrade to fix but the update breaks other things. i need structuredOutputs for streaming for example, but the deprication f streamVNext breaks our app, using stream also oesnt work (which i posted about earlier to this message)
https://discord.com/channels/1309558646228779139/1428187473623908435