-
Notifications
You must be signed in to change notification settings - Fork 50
Upgrade autoevals to zod 4 #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
60fce6c to
1184016
Compare
Braintrust eval reportAutoevals (caitlin/update-zod4-1767120271)
|
Use native toJSONSchema() method from Zod v4 instead of relying on zod-to-json-schema library which is not compatible with Zod v4. Fixes "Invalid schema for function" errors where schemas had 'type: "None"' instead of 'type: "object"'. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Replace direct zodToJsonSchema call with schemaToJson helper for classify_statements function to properly use Zod v4's native toJSONSchema() method - Format JSON dataset files and pnpm-lock.yaml with prettier This completes the Zod v4 compatibility fixes for OpenAI function calling schemas. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
.github/workflows/python.yaml
Outdated
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue with sdk tuple behavior in 3.8, 3.8 has been end of life since 2024
4d528b9 to
947418a
Compare
Upgrade to zod 4.2.1 in preparation of zod 4+ migration. Export from zod/v3 until everything is ready in the braintrust backend
Added Zod as a peer dependency accepting both v3 and v4 (^3.0.0 || ^4.0.0). This ensures consumers have a compatible Zod version installed while allowing flexibility for projects using either Zod 3 or 4. Zod remains in dependencies for build/test purposes, but declaring it as a peer dependency prevents version conflicts when autoevals is used in projects with their own Zod version.
e1137b0 to
2be0919
Compare
cef27af to
7d36c10
Compare
| "openai": "^6.3.0", | ||
| "zod": "^3.25.76", | ||
| "zod-to-json-schema": "^3.24.6" | ||
| "openai": "^6.7.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6.7.0 version is necessary in order to properly support zod 4 with fallbacks to zod 3
No description provided.