Skip to content

Conversation

@cpinn
Copy link

@cpinn cpinn commented Dec 23, 2025

No description provided.

@cpinn cpinn force-pushed the caitlin/update-zod4 branch from 60fce6c to 1184016 Compare December 23, 2025 23:40
@github-actions
Copy link

github-actions bot commented Dec 23, 2025

Braintrust eval report

Autoevals (caitlin/update-zod4-1767120271)

Score Average Improvements Regressions
NumericDiff 75.1% (+0pp) 7 🟢 4 🔴
Time_to_first_token 1.42tok (-0.05tok) 83 🟢 36 🔴
Llm_calls 1.55 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 279.25tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 18.11tok (+0.1tok) 44 🟢 42 🔴
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 297.35tok (+0.1tok) 44 🟢 42 🔴
Estimated_cost 0$ (+0$) - -
Duration 1.43s (-0.06s) 187 🟢 32 🔴
Llm_duration 2.9s (-0.11s) 94 🟢 25 🔴

cpinn and others added 6 commits December 23, 2025 16:24
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>
@cpinn cpinn marked this pull request as ready for review December 29, 2025 16:37
@cpinn cpinn marked this pull request as draft December 29, 2025 16:38
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
Copy link
Author

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

@cpinn cpinn force-pushed the caitlin/update-zod4 branch from 4d528b9 to 947418a Compare December 29, 2025 18:59
@cpinn cpinn changed the title update to zod 4 update to zod 4, stay on zod /v3 for now Dec 29, 2025
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.
@cpinn cpinn force-pushed the caitlin/update-zod4 branch from e1137b0 to 2be0919 Compare December 29, 2025 20:17
@cpinn cpinn changed the title update to zod 4, stay on zod /v3 for now update to zod 4, stay on zod /v3 for compatibility Dec 29, 2025
@cpinn cpinn force-pushed the caitlin/update-zod4 branch from cef27af to 7d36c10 Compare December 29, 2025 21:15
@cpinn cpinn marked this pull request as ready for review December 29, 2025 21:16
"openai": "^6.3.0",
"zod": "^3.25.76",
"zod-to-json-schema": "^3.24.6"
"openai": "^6.7.0",
Copy link
Author

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

@cpinn cpinn changed the title update to zod 4, stay on zod /v3 for compatibility Upgrade autoevals to zod 4 Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants