Skip to content

Conversation

@activadee
Copy link
Owner

Leverage Zod 4's native toJSONSchema() method instead of manually
parsing internal _def structure. This reduces adapter complexity
from ~250 lines to ~85 lines and improves maintainability.

  • Update peer dependency from zod ^3.0.0 to ^4.0.0
  • Replace manual type inspection with schema.toJSONSchema() call
  • Update isZodSchema to detect toJSONSchema method presence
  • Simplify tests to use actual Zod schemas instead of mocks

claude added 2 commits January 1, 2026 02:29
Leverage Zod 4's native toJSONSchema() method instead of manually
parsing internal _def structure. This reduces adapter complexity
from ~250 lines to ~85 lines and improves maintainability.

- Update peer dependency from zod ^3.0.0 to ^4.0.0
- Replace manual type inspection with schema.toJSONSchema() call
- Update isZodSchema to detect toJSONSchema method presence
- Simplify tests to use actual Zod schemas instead of mocks
Update installation docs to specify Zod 4 or later is required
for structured output validation with the SDK.
@activadee activadee merged commit 61df4c8 into main Jan 1, 2026
1 check passed
@activadee activadee deleted the claude/simplify-zod-adapter-9UaOU branch January 1, 2026 02:32
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.

3 participants