@mastra/schema-compat 0.11.3-alpha.0 → 0.11.4-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mastra/schema-compat
2
2
 
3
+ ## 0.11.4-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixes an issue when the OpenAI reasoning schema compatibility layer was calling defaultValue() as a function, which works in Zod v3 but fails in Zod v4 where defaultValue is stored directly as a value. ([#8090](https://github.com/mastra-ai/mastra/pull/8090))
8
+
9
+ ## 0.11.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Change SchemaCompat zodToJsonSchema ref strategy from none to relative, leading to less schema warnings and smaller converted schema sizes ([#7697](https://github.com/mastra-ai/mastra/pull/7697))
14
+
3
15
  ## 0.11.3-alpha.0
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1369,7 +1369,7 @@ var OpenAIReasoningSchemaCompatLayer = class extends SchemaCompatLayer3 {
1369
1369
  } else if (isDefault(zod.z)(value)) {
1370
1370
  const defaultDef = value._def;
1371
1371
  const innerType = defaultDef.innerType;
1372
- const defaultValue = defaultDef.defaultValue();
1372
+ const defaultValue = typeof defaultDef.defaultValue === "function" ? defaultDef.defaultValue() : defaultDef.defaultValue;
1373
1373
  const constraints = {};
1374
1374
  if (defaultValue !== void 0) {
1375
1375
  constraints.defaultValue = defaultValue;