https://linen.dev logo
Tools - Zod 4 + mastra still does not work
# 🖥│support-forum
y
Description
u
Hey @yairtheyair, Could you provide some context regarding the issue you are facing and share a reproducible code snippet along with the exact error logs?
y
It breaks my production right now so it's my focus for today. I will share full code in half an hour but it's really just a mastra agent with latest zod latest mastra and latest composio and throws a parameters not defined error something like that
error: TypeError: undefined is not an object (evaluating 'schema._zod.def')
UPDATE: its vercel ai gateway bug, not on your side i think
a
I see, could you share your SDK versions and reproducible code snippet? It'll help us understand the issue.
y
UPDATE: it is a bug in composio actually. (there was not a bug in vercel ai gateway). I downgraded from zod 4 to zod 3 and it all works.
Still my prod is down (since my packages depend on zod 4 cant just downgrade zod). Using composio latest + mastra latest + composio mastra provider latest
PLEASE advice
a
Hi @yairtheyair, Just jumping in here to help. We were unable to reproduce this issue on our end and would need additional details to troubleshoot the issue. Could you please create an issue on [GitHub](https://github.com/ComposioHQ/composio/issues/new?template=bug-report.yml) or share the same information here? We'll prioritize this to help get you back up!
y
Found the problem, https://github.com/ComposioHQ/composio/blob/next/ts/packages/providers/mastra/src/index.ts#L96 These 2 lines of code, I removed the jsonSchemaToZodSchema calls (just return parameters without jsonSchemaToZodSchema) and it work with zod 4. Bottom line problem is at @composio/mastra latest provider
a
Ah I see, thanks for debugging! Mind creating an issue on GitHub? We'll fix this on priority.
y
Will create it, will try to downgrade the composio mastra provider for now...
https://github.com/ComposioHQ/composio/issues/2109 i think this is the same bug from 2 days ago
also i would really appreciate any ETA or notice when this will be fixed đź‘‘
still crashes
a
thanks for mentioning, i've shared this with team and we'll check this issue and update on the issue.