@mastra/schema-compat 1.3.6-alpha.3 → 1.3.6

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @mastra/schema-compat
2
2
 
3
+ ## 1.3.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed OpenAI structured output requests failing when a schema uses `z.record()`. The OpenAI compatibility layer now removes the `propertyNames` keyword, which OpenAI strict mode does not permit. Requests that used to fail with "Invalid schema ... 'propertyNames' is not permitted" are now accepted. ([#20977](https://github.com/mastra-ai/mastra/pull/20977))
8
+
9
+ **Known limitation.** OpenAI strict mode cannot express an open-ended map. A `z.record()` field is still sent as a plain object with no value schema, so the model is not told what keys or values to produce. Use an explicit `z.object({ ... })` shape when you need the model to fill a map. See [#19273](https://github.com/mastra-ai/mastra/issues/19273).
10
+
11
+ - Fix supervisor agent tool schemas for Gemini via OpenRouter. Properties with no Gemini-compatible type — most commonly `z.any()`, which serializes to an empty schema — are now rewritten into a permissive `anyOf` instead of being dropped. This resolves the misleading `required[N]: property is not defined` error when using Gemini models through OpenRouter as a supervisor agent (fixes #17325), while keeping fields the model is expected to fill (such as `resumeData` for tool suspend/resume) present in the tool contract. ([#17386](https://github.com/mastra-ai/mastra/pull/17386))
12
+
13
+ - Fixed Zod v3 schema conversion for CommonJS consumers. ([#21147](https://github.com/mastra-ai/mastra/pull/21147))
14
+
15
+ - Fixed tool execute-time input validation for Zod tools on Anthropic Claude 3.5 Haiku. The compat layer now skips string min/max checks that were removed from the model-facing JSON Schema, while preserving refinements, defaults, and other validation semantics. ([#19701](https://github.com/mastra-ai/mastra/pull/19701))
16
+
3
17
  ## 1.3.6-alpha.3
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/schema-compat",
3
- "version": "1.3.6-alpha.3",
3
+ "version": "1.3.6",
4
4
  "description": "Tool schema compatibility layer for Mastra.ai",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -118,13 +118,13 @@
118
118
  "zod-v3": "npm:zod@^3.25.76",
119
119
  "zod-to-json-schema": "^3.25.2",
120
120
  "zod-from-json-schema-v3": "npm:zod-from-json-schema@^0.0.5",
121
- "@internal/ai-sdk-v4": "0.0.68",
122
- "@internal/ai-sdk-v5": "0.0.68",
123
- "@internal/ai-v6": "0.0.68",
124
- "@internal/test-utils": "0.0.57",
125
- "@internal/types-builder": "0.0.96",
126
- "@internal/llm-recorder": "0.0.57",
127
- "@internal/lint": "0.0.121"
121
+ "@internal/ai-sdk-v4": "0.0.69",
122
+ "@internal/ai-sdk-v5": "0.0.69",
123
+ "@internal/ai-v6": "0.0.69",
124
+ "@internal/lint": "0.0.122",
125
+ "@internal/llm-recorder": "0.0.58",
126
+ "@internal/test-utils": "0.0.58",
127
+ "@internal/types-builder": "0.0.97"
128
128
  },
129
129
  "homepage": "https://mastra.ai",
130
130
  "repository": {