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
❌ Without definitions this schema produces 800 enums, which is above the 500 enums OpenAI limit.
First occurrence of a def is left in place, starting with the second one it's copied to definitions and a reference is used.
✅ zod-to-json-schema library has a definitions option that is used to supply definitions, and avoid duplication – resulting in 400 enums.
Alternative approach would be to detect shared definitions, move out to definitions, and replace with refs automatically. This would be a significantly more complex, but easier to use solution. Probably not worth the work for now, since everything is in place to just expose the zod-to-json-schema's definitions option
The text was updated successfully, but these errors were encountered:
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
Allow specifying
schemaDefinitions
as azodResponseFormat
paramProposed signature
Additional context
❌ Without definitions this schema produces 800 enums, which is above the 500 enums OpenAI limit.
First occurrence of a def is left in place, starting with the second one it's copied to definitions and a reference is used.
✅
zod-to-json-schema
library has a definitions option that is used to supply definitions, and avoid duplication – resulting in 400 enums.Alternative approach would be to detect shared definitions, move out to definitions, and replace with refs automatically. This would be a significantly more complex, but easier to use solution. Probably not worth the work for now, since everything is in place to just expose the zod-
to-json-schema
'sdefinitions
optionThe text was updated successfully, but these errors were encountered: