You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 11, 2026. It is now read-only.
there are quite a few schema constraints when using structured outputs, and many of the AI functions in the stdlib use features like .optional(), .default(), etc which are not supported
zod-to-json-schema both openai's vendored version and the official package with openai mode don't support structured outputs
see the ai sdk's notes on structured outputs. they explicitly make them opt-in and warn about schema compatibility
this will involve changes to the underlying zod-to-json-schema IF the user is using structured outputs, so we'll need to expose a different version of the AI functions in this case
.optional(),.default(), etc which are not supportedzod-to-json-schemaboth openai's vendored version and the official package withopenaimode don't support structured outputszod-to-json-schemaIF the user is using structured outputs, so we'll need to expose a different version of the AI functions in this casesee #702 for a repro