@mastra/schema-compat 1.3.3 → 1.3.4-alpha.1

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,31 @@
1
1
  # @mastra/schema-compat
2
2
 
3
+ ## 1.3.4-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - test(schema-compat): fix 'successful' typo in provider e2e test descriptions ([#19167](https://github.com/mastra-ai/mastra/pull/19167))
8
+
9
+ ## 1.3.4-alpha.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Fixed Meta (Llama) and DeepSeek schemas leaking raw number bounds to the model. A field like `z.number().int()` was sent to the model with bogus `minimum: -9007199254740991` / `maximum: 9007199254740991` values, and `z.number().min(1).max(50)` leaked `minimum`/`maximum` keywords, even though OpenAI, Google, and Anthropic already strip these. Numeric constraints are now moved into the field description for Meta and DeepSeek too, matching the other providers. ([#19073](https://github.com/mastra-ai/mastra/pull/19073))
14
+
15
+ **Before** (Meta/DeepSeek, `z.object({ age: z.number().min(0).max(120) })`):
16
+
17
+ ```json
18
+ { "age": { "type": "number", "minimum": 0, "maximum": 120 } }
19
+ ```
20
+
21
+ **After**:
22
+
23
+ ```json
24
+ { "age": { "type": "number", "description": "constraints: greater than or equal to 0, lower than or equal to 120" } }
25
+ ```
26
+
27
+ Closes #19072.
28
+
3
29
  ## 1.3.3
4
30
 
5
31
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -5869,6 +5869,8 @@ var DeepSeekSchemaCompatLayer = class extends SchemaCompatLayer3 {
5869
5869
  this.defaultObjectHandler(schema);
5870
5870
  } else if (isArraySchema(schema)) {
5871
5871
  this.defaultArrayHandler(schema);
5872
+ } else if (isNumberSchema(schema)) {
5873
+ this.defaultNumberHandler(schema);
5872
5874
  } else if (isStringSchema(schema)) {
5873
5875
  this.defaultStringHandler(schema);
5874
5876
  }
@@ -6280,6 +6282,8 @@ var MetaSchemaCompatLayer = class extends SchemaCompatLayer3 {
6280
6282
  this.defaultObjectHandler(schema);
6281
6283
  } else if (isArraySchema(schema)) {
6282
6284
  this.defaultArrayHandler(schema);
6285
+ } else if (isNumberSchema(schema)) {
6286
+ this.defaultNumberHandler(schema);
6283
6287
  } else if (isStringSchema(schema)) {
6284
6288
  this.defaultStringHandler(schema);
6285
6289
  }