Skip to content

Support for Zod v4 #5682

Closed
Closed
@AsharibAli

Description

@AsharibAli

Hi Maintainers,

Zod v4 was recently announced (Introducing Zod 4 beta) and is currently in beta. It brings significant improvements over v3, including:

  • Major performance gains (parsing strings, arrays, objects)
  • Reduced core bundle size
  • Improved TypeScript compiler efficiency
  • New features like z.interface(), JSON schema conversion, metadata, etc.

While Zod v4 introduces breaking changes (detailed in the Migration Guide), upgrading would allow users of ai to benefit from these enhancements, especially when defining complex schemas for tools or input/output validation.

Could you please consider adding support for Zod v4 in ai? It would be helpful to understand if there are plans to address compatibility with the upcoming stable release of Zod v4.

Thank you for your great work on this library!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions