zodFunction
helper rejects default()
and min()
Zod methods in validation schemas for function calling
#1119
Labels
bug
Something isn't working
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
When using the
zodFunction
helper found here, Zod schemas containingdefault()
andmin()
methods are rejected with errors like'default' is not permitted
and'minLength' is not permitted
. These methods work fine when using the examplezodFunction
utility provided here, but not with the exported helper function.default()
for enums seems to work in both cases, but not for other types of values.To Reproduce
zodFunction
Helper):Code snippets
No response
OS
Windows 11
Node version
v20.16.0
Library version
4.67.1
The text was updated successfully, but these errors were encountered: