December 24, 2025
Fix Zod 4 compatibility for storage schema detection (#11431)
If you're using Zod 4, buildStorageSchema was failing to detect nullable and optional fields correctly. This caused NOT NULL constraint failed errors when storing observability spans and other data.
This fix enables proper schema detection for Zod 4 users, ensuring nullable fields like parentSpanId are correctly identified and don't cause database constraint violations.
Fix OpenAI structured output compatibility for fields with .default() values (#11434)
When using Zod schemas with .default() fields (e.g., z.number().default(1)), OpenAI's structured output API was failing with errors like Missing '<field>' in required. This happened because zod-to-json-schema doesn't include fields with defaults in the required array, but OpenAI requires all properties to be required.
This fix converts .default() fields to .nullable() with a transform that returns the default value when null is received, ensuring compatibility with OpenAI's strict mode while preserving the original default value semantics.
Full Changelog: 4cbe850
Fetched April 7, 2026