@mastra/schema-compat 0.0.0-ai-v5-20250813235735 → 0.0.0-bundle-recursion-20251030002519

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 (65) hide show
  1. package/CHANGELOG.md +107 -2
  2. package/README.md +0 -4
  3. package/dist/chunk-5WM4A32G.cjs +83 -0
  4. package/dist/chunk-5WM4A32G.cjs.map +1 -0
  5. package/dist/chunk-U2HXWNAF.js +77 -0
  6. package/dist/chunk-U2HXWNAF.js.map +1 -0
  7. package/dist/index.cjs +859 -134
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.ts +3 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +858 -135
  12. package/dist/index.js.map +1 -1
  13. package/dist/provider-compats/anthropic.d.ts +5 -3
  14. package/dist/provider-compats/anthropic.d.ts.map +1 -1
  15. package/dist/provider-compats/deepseek.d.ts +5 -3
  16. package/dist/provider-compats/deepseek.d.ts.map +1 -1
  17. package/dist/provider-compats/google.d.ts +5 -3
  18. package/dist/provider-compats/google.d.ts.map +1 -1
  19. package/dist/provider-compats/meta.d.ts +5 -3
  20. package/dist/provider-compats/meta.d.ts.map +1 -1
  21. package/dist/provider-compats/openai-reasoning.d.ts +5 -3
  22. package/dist/provider-compats/openai-reasoning.d.ts.map +1 -1
  23. package/dist/provider-compats/openai.d.ts +5 -3
  24. package/dist/provider-compats/openai.d.ts.map +1 -1
  25. package/dist/schema-compatibility-v3.d.ts +288 -0
  26. package/dist/schema-compatibility-v3.d.ts.map +1 -0
  27. package/dist/schema-compatibility-v4.d.ts +279 -0
  28. package/dist/schema-compatibility-v4.d.ts.map +1 -0
  29. package/dist/schema-compatibility.d.ts +79 -164
  30. package/dist/schema-compatibility.d.ts.map +1 -1
  31. package/dist/types.d.ts +6 -0
  32. package/dist/types.d.ts.map +1 -0
  33. package/dist/utils-test-suite.d.ts +2 -0
  34. package/dist/utils-test-suite.d.ts.map +1 -0
  35. package/dist/utils.d.ts +16 -4
  36. package/dist/utils.d.ts.map +1 -1
  37. package/dist/zod-to-json-test-suite.d.ts +6 -0
  38. package/dist/zod-to-json-test-suite.d.ts.map +1 -0
  39. package/dist/zod-to-json.cjs +12 -0
  40. package/dist/zod-to-json.cjs.map +1 -0
  41. package/dist/zod-to-json.d.ts +6 -0
  42. package/dist/zod-to-json.d.ts.map +1 -0
  43. package/dist/zod-to-json.js +3 -0
  44. package/dist/zod-to-json.js.map +1 -0
  45. package/dist/zodTypes.d.ts +21 -0
  46. package/dist/zodTypes.d.ts.map +1 -0
  47. package/package.json +34 -10
  48. package/.turbo/turbo-build.log +0 -4
  49. package/eslint.config.js +0 -6
  50. package/src/index.ts +0 -39
  51. package/src/provider-compats/anthropic.ts +0 -43
  52. package/src/provider-compats/deepseek.ts +0 -35
  53. package/src/provider-compats/google.ts +0 -62
  54. package/src/provider-compats/meta.ts +0 -36
  55. package/src/provider-compats/openai-reasoning.ts +0 -91
  56. package/src/provider-compats/openai.ts +0 -56
  57. package/src/provider-compats.test.ts +0 -383
  58. package/src/schema-compatibility.test.ts +0 -491
  59. package/src/schema-compatibility.ts +0 -592
  60. package/src/utils.test.ts +0 -463
  61. package/src/utils.ts +0 -205
  62. package/tsconfig.build.json +0 -9
  63. package/tsconfig.json +0 -5
  64. package/tsup.config.ts +0 -17
  65. package/vitest.config.ts +0 -7
@@ -1,592 +0,0 @@
1
- import type { Schema, LanguageModel } from 'ai';
2
- import type { JSONSchema7 } from 'json-schema';
3
- import { z, ZodOptional, ZodObject, ZodArray, ZodUnion, ZodString, ZodNumber, ZodDate, ZodDefault, ZodNull } from 'zod';
4
- import type { ZodTypeAny } from 'zod';
5
- import type { Targets } from 'zod-to-json-schema';
6
- import { convertZodSchemaToAISDKSchema } from './utils';
7
-
8
- export type SchemaCompatModel = Exclude<LanguageModel, string>;
9
-
10
- /**
11
- * All supported string validation check types that can be processed or converted to descriptions.
12
- * @constant
13
- */
14
- export const ALL_STRING_CHECKS = ['regex', 'emoji', 'email', 'url', 'uuid', 'cuid', 'min', 'max'] as const;
15
-
16
- /**
17
- * All supported number validation check types that can be processed or converted to descriptions.
18
- * @constant
19
- */
20
- export const ALL_NUMBER_CHECKS = [
21
- 'min', // gte internally
22
- 'max', // lte internally
23
- 'multipleOf',
24
- ] as const;
25
-
26
- /**
27
- * All supported array validation check types that can be processed or converted to descriptions.
28
- * @constant
29
- */
30
- export const ALL_ARRAY_CHECKS = ['min', 'max', 'length'] as const;
31
-
32
- export const isOptional = (v: ZodTypeAny): v is ZodOptional<any> => v instanceof ZodOptional;
33
- export const isObj = (v: ZodTypeAny): v is ZodObject<any, any, any> => v instanceof ZodObject;
34
- export const isNull = (v: ZodTypeAny): v is ZodNull => v instanceof ZodNull;
35
- export const isArr = (v: ZodTypeAny): v is ZodArray<any, any> => v instanceof ZodArray;
36
- export const isUnion = (v: ZodTypeAny): v is ZodUnion<[ZodTypeAny, ...ZodTypeAny[]]> => v instanceof ZodUnion;
37
- export const isString = (v: ZodTypeAny): v is ZodString => v instanceof ZodString;
38
- export const isNumber = (v: ZodTypeAny): v is ZodNumber => v instanceof ZodNumber;
39
- export const isDate = (v: ZodTypeAny): v is ZodDate => v instanceof ZodDate;
40
- export const isDefault = (v: ZodTypeAny): v is ZodDefault<any> => v instanceof ZodDefault;
41
-
42
- /**
43
- * Zod types that are not supported by most AI model providers and should be avoided.
44
- * @constant
45
- */
46
- export const UNSUPPORTED_ZOD_TYPES = ['ZodIntersection', 'ZodNever', 'ZodNull', 'ZodTuple', 'ZodUndefined'] as const;
47
-
48
- /**
49
- * Zod types that are generally supported by AI model providers.
50
- * @constant
51
- */
52
- export const SUPPORTED_ZOD_TYPES = [
53
- 'ZodObject',
54
- 'ZodArray',
55
- 'ZodUnion',
56
- 'ZodString',
57
- 'ZodNumber',
58
- 'ZodDate',
59
- 'ZodAny',
60
- 'ZodDefault',
61
- ] as const;
62
-
63
- /**
64
- * All Zod types (both supported and unsupported).
65
- * @constant
66
- */
67
- export const ALL_ZOD_TYPES = [...SUPPORTED_ZOD_TYPES, ...UNSUPPORTED_ZOD_TYPES] as const;
68
-
69
- /**
70
- * Type representing string validation checks.
71
- */
72
- export type StringCheckType = (typeof ALL_STRING_CHECKS)[number];
73
-
74
- /**
75
- * Type representing number validation checks.
76
- */
77
- export type NumberCheckType = (typeof ALL_NUMBER_CHECKS)[number];
78
-
79
- /**
80
- * Type representing array validation checks.
81
- */
82
- export type ArrayCheckType = (typeof ALL_ARRAY_CHECKS)[number];
83
-
84
- /**
85
- * Type representing unsupported Zod schema types.
86
- */
87
- export type UnsupportedZodType = (typeof UNSUPPORTED_ZOD_TYPES)[number];
88
-
89
- /**
90
- * Type representing supported Zod schema types.
91
- */
92
- export type SupportedZodType = (typeof SUPPORTED_ZOD_TYPES)[number];
93
-
94
- /**
95
- * Type representing all Zod schema types (supported and unsupported).
96
- */
97
- export type AllZodType = (typeof ALL_ZOD_TYPES)[number];
98
-
99
- /**
100
- * Utility type to extract the shape of a Zod object schema.
101
- */
102
- export type ZodShape<T extends z.AnyZodObject> = T['shape'];
103
-
104
- /**
105
- * Utility type to extract the keys from a Zod object shape.
106
- */
107
- export type ShapeKey<T extends z.AnyZodObject> = keyof ZodShape<T>;
108
-
109
- /**
110
- * Utility type to extract the value types from a Zod object shape.
111
- */
112
- export type ShapeValue<T extends z.AnyZodObject> = ZodShape<T>[ShapeKey<T>];
113
-
114
- // Add constraint types at the top
115
-
116
- type StringConstraints = {
117
- minLength?: number;
118
- maxLength?: number;
119
- email?: boolean;
120
- url?: boolean;
121
- uuid?: boolean;
122
- cuid?: boolean;
123
- emoji?: boolean;
124
- regex?: string;
125
- };
126
-
127
- type NumberConstraints = {
128
- gt?: number;
129
- gte?: number;
130
- lt?: number;
131
- lte?: number;
132
- multipleOf?: number;
133
- };
134
-
135
- type ArrayConstraints = {
136
- minLength?: number;
137
- maxLength?: number;
138
- exactLength?: number;
139
- };
140
-
141
- type DateConstraints = {
142
- minDate?: string;
143
- maxDate?: string;
144
- dateFormat?: string;
145
- };
146
-
147
- export type ModelInformation = {
148
- modelId: string;
149
- provider: string;
150
- };
151
-
152
- /**
153
- * Abstract base class for creating schema compatibility layers for different AI model providers.
154
- *
155
- * This class provides a framework for transforming Zod schemas to work with specific AI model
156
- * provider requirements and limitations. Each provider may have different support levels for
157
- * JSON Schema features, validation constraints, and data types.
158
- *
159
- * @abstract
160
- *
161
- * @example
162
- * ```typescript
163
- * import { SchemaCompatLayer } from '@mastra/schema-compat';
164
- * import type { LanguageModelV1 } from 'ai';
165
- *
166
- * class CustomProviderCompat extends SchemaCompatLayer {
167
- * constructor(model: LanguageModelV1) {
168
- * super(model);
169
- * }
170
- *
171
- * shouldApply(): boolean {
172
- * return this.getModel().provider === 'custom-provider';
173
- * }
174
- *
175
- * getSchemaTarget() {
176
- * return 'jsonSchema7';
177
- * }
178
- *
179
- * processZodType<T extends z.AnyZodObject>(value: z.ZodTypeAny): ShapeValue<T> {
180
- * // Custom processing logic for this provider
181
- * switch (value._def.typeName) {
182
- * case 'ZodString':
183
- * return this.defaultZodStringHandler(value, ['email', 'url']);
184
- * default:
185
- * return this.defaultUnsupportedZodTypeHandler(value);
186
- * }
187
- * }
188
- * }
189
- * ```
190
- */
191
- export abstract class SchemaCompatLayer {
192
- private model: ModelInformation;
193
-
194
- /**
195
- * Creates a new schema compatibility instance.
196
- *
197
- * @param model - The language model this compatibility layer applies to
198
- */
199
- constructor(model: ModelInformation) {
200
- this.model = model;
201
- }
202
-
203
- /**
204
- * Gets the language model associated with this compatibility layer.
205
- *
206
- * @returns The language model instance
207
- */
208
- getModel(): ModelInformation {
209
- return this.model;
210
- }
211
-
212
- /**
213
- * Determines whether this compatibility layer should be applied for the current model.
214
- *
215
- * @returns True if this compatibility layer should be used, false otherwise
216
- * @abstract
217
- */
218
- abstract shouldApply(): boolean;
219
-
220
- /**
221
- * Returns the JSON Schema target format for this provider.
222
- *
223
- * @returns The schema target format, or undefined to use the default 'jsonSchema7'
224
- * @abstract
225
- */
226
- abstract getSchemaTarget(): Targets | undefined;
227
-
228
- /**
229
- * Processes a specific Zod type according to the provider's requirements.
230
- *
231
- * @param value - The Zod type to process
232
- * @returns The processed Zod type
233
- * @abstract
234
- */
235
- abstract processZodType(value: ZodTypeAny): ZodTypeAny;
236
-
237
- /**
238
- * Default handler for Zod object types. Recursively processes all properties in the object.
239
- *
240
- * @param value - The Zod object to process
241
- * @returns The processed Zod object
242
- */
243
- public defaultZodObjectHandler(
244
- value: ZodObject<any, any, any>,
245
- options: { passthrough?: boolean } = { passthrough: true },
246
- ): ZodObject<any, any, any> {
247
- const processedShape = Object.entries(value.shape).reduce<Record<string, ZodTypeAny>>((acc, [key, propValue]) => {
248
- acc[key] = this.processZodType(propValue as ZodTypeAny);
249
- return acc;
250
- }, {});
251
-
252
- let result: ZodObject<any, any, any> = z.object(processedShape);
253
-
254
- if (value._def.unknownKeys === 'strict') {
255
- result = result.strict();
256
- }
257
- if (value._def.catchall && !(value._def.catchall instanceof z.ZodNever)) {
258
- result = result.catchall(value._def.catchall);
259
- }
260
-
261
- if (value.description) {
262
- result = result.describe(value.description);
263
- }
264
-
265
- if (options.passthrough && value._def.unknownKeys === 'passthrough') {
266
- result = result.passthrough();
267
- }
268
-
269
- return result;
270
- }
271
-
272
- /**
273
- * Merges validation constraints into a parameter description.
274
- *
275
- * This helper method converts validation constraints that may not be supported
276
- * by a provider into human-readable descriptions.
277
- *
278
- * @param description - The existing parameter description
279
- * @param constraints - The validation constraints to merge
280
- * @returns The updated description with constraints, or undefined if no constraints
281
- */
282
- public mergeParameterDescription(
283
- description: string | undefined,
284
- constraints:
285
- | NumberConstraints
286
- | StringConstraints
287
- | ArrayConstraints
288
- | DateConstraints
289
- | { defaultValue?: unknown },
290
- ): string | undefined {
291
- if (Object.keys(constraints).length > 0) {
292
- return (description ? description + '\n' : '') + JSON.stringify(constraints);
293
- } else {
294
- return description;
295
- }
296
- }
297
-
298
- /**
299
- * Default handler for unsupported Zod types. Throws an error for specified unsupported types.
300
- *
301
- * @param value - The Zod type to check
302
- * @param throwOnTypes - Array of type names to throw errors for
303
- * @returns The original value if not in the throw list
304
- * @throws Error if the type is in the unsupported list
305
- */
306
- public defaultUnsupportedZodTypeHandler<T extends z.AnyZodObject>(
307
- value: z.ZodTypeAny,
308
- throwOnTypes: readonly UnsupportedZodType[] = UNSUPPORTED_ZOD_TYPES,
309
- ): ShapeValue<T> {
310
- if (throwOnTypes.includes(value._def?.typeName as UnsupportedZodType)) {
311
- throw new Error(`${this.model.modelId} does not support zod type: ${value._def?.typeName}`);
312
- }
313
- return value as ShapeValue<T>;
314
- }
315
-
316
- /**
317
- * Default handler for Zod array types. Processes array constraints according to provider support.
318
- *
319
- * @param value - The Zod array to process
320
- * @param handleChecks - Array constraints to convert to descriptions vs keep as validation
321
- * @returns The processed Zod array
322
- */
323
- public defaultZodArrayHandler(
324
- value: ZodArray<any, any>,
325
- handleChecks: readonly ArrayCheckType[] = ALL_ARRAY_CHECKS,
326
- ): ZodArray<any, any> {
327
- const zodArrayDef = value._def;
328
- const processedType = this.processZodType(zodArrayDef.type);
329
-
330
- let result = z.array(processedType);
331
-
332
- const constraints: ArrayConstraints = {};
333
-
334
- if (zodArrayDef.minLength?.value !== undefined) {
335
- if (handleChecks.includes('min')) {
336
- constraints.minLength = zodArrayDef.minLength.value;
337
- } else {
338
- result = result.min(zodArrayDef.minLength.value);
339
- }
340
- }
341
-
342
- if (zodArrayDef.maxLength?.value !== undefined) {
343
- if (handleChecks.includes('max')) {
344
- constraints.maxLength = zodArrayDef.maxLength.value;
345
- } else {
346
- result = result.max(zodArrayDef.maxLength.value);
347
- }
348
- }
349
-
350
- if (zodArrayDef.exactLength?.value !== undefined) {
351
- if (handleChecks.includes('length')) {
352
- constraints.exactLength = zodArrayDef.exactLength.value;
353
- } else {
354
- result = result.length(zodArrayDef.exactLength.value);
355
- }
356
- }
357
-
358
- const description = this.mergeParameterDescription(value.description, constraints);
359
- if (description) {
360
- result = result.describe(description);
361
- }
362
- return result;
363
- }
364
-
365
- /**
366
- * Default handler for Zod union types. Processes all union options.
367
- *
368
- * @param value - The Zod union to process
369
- * @returns The processed Zod union
370
- * @throws Error if union has fewer than 2 options
371
- */
372
- public defaultZodUnionHandler(value: ZodUnion<[ZodTypeAny, ...ZodTypeAny[]]>): ZodTypeAny {
373
- const processedOptions = value._def.options.map((option: ZodTypeAny) => this.processZodType(option));
374
- if (processedOptions.length < 2) throw new Error('Union must have at least 2 options');
375
- let result = z.union(processedOptions as [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]);
376
- if (value.description) {
377
- result = result.describe(value.description);
378
- }
379
- return result;
380
- }
381
-
382
- /**
383
- * Default handler for Zod string types. Processes string validation constraints.
384
- *
385
- * @param value - The Zod string to process
386
- * @param handleChecks - String constraints to convert to descriptions vs keep as validation
387
- * @returns The processed Zod string
388
- */
389
- public defaultZodStringHandler(
390
- value: ZodString,
391
- handleChecks: readonly StringCheckType[] = ALL_STRING_CHECKS,
392
- ): ZodString {
393
- const constraints: StringConstraints = {};
394
- const checks = value._def.checks || [];
395
- type ZodStringCheck = (typeof checks)[number];
396
- const newChecks: ZodStringCheck[] = [];
397
- for (const check of checks) {
398
- if ('kind' in check) {
399
- if (handleChecks.includes(check.kind as StringCheckType)) {
400
- switch (check.kind) {
401
- case 'regex': {
402
- constraints.regex = `A string that must match the regex pattern: ${check.regex.source}, with flags: ${check.regex.flags}`;
403
- break;
404
- }
405
- case 'emoji': {
406
- constraints.emoji = true;
407
- break;
408
- }
409
- case 'email': {
410
- constraints.email = true;
411
- break;
412
- }
413
- case 'url': {
414
- constraints.url = true;
415
- break;
416
- }
417
- case 'uuid': {
418
- constraints.uuid = true;
419
- break;
420
- }
421
- case 'cuid': {
422
- constraints.cuid = true;
423
- break;
424
- }
425
- case 'min': {
426
- constraints.minLength = check.value;
427
- break;
428
- }
429
- case 'max': {
430
- constraints.maxLength = check.value;
431
- break;
432
- }
433
- }
434
- } else {
435
- newChecks.push(check);
436
- }
437
- }
438
- }
439
- let result = z.string();
440
- for (const check of newChecks) {
441
- result = result._addCheck(check);
442
- }
443
- const description = this.mergeParameterDescription(value.description, constraints);
444
- if (description) {
445
- result = result.describe(description);
446
- }
447
- return result;
448
- }
449
-
450
- /**
451
- * Default handler for Zod number types. Processes number validation constraints.
452
- *
453
- * @param value - The Zod number to process
454
- * @param handleChecks - Number constraints to convert to descriptions vs keep as validation
455
- * @returns The processed Zod number
456
- */
457
- public defaultZodNumberHandler(
458
- value: ZodNumber,
459
- handleChecks: readonly NumberCheckType[] = ALL_NUMBER_CHECKS,
460
- ): ZodNumber {
461
- const constraints: NumberConstraints = {};
462
- const checks = value._def.checks || [];
463
- type ZodNumberCheck = (typeof checks)[number];
464
- const newChecks: ZodNumberCheck[] = [];
465
- for (const check of checks) {
466
- if ('kind' in check) {
467
- if (handleChecks.includes(check.kind as NumberCheckType)) {
468
- switch (check.kind) {
469
- case 'min':
470
- if (check.inclusive) {
471
- constraints.gte = check.value;
472
- } else {
473
- constraints.gt = check.value;
474
- }
475
- break;
476
- case 'max':
477
- if (check.inclusive) {
478
- constraints.lte = check.value;
479
- } else {
480
- constraints.lt = check.value;
481
- }
482
- break;
483
- case 'multipleOf': {
484
- constraints.multipleOf = check.value;
485
- break;
486
- }
487
- }
488
- } else {
489
- newChecks.push(check);
490
- }
491
- }
492
- }
493
- let result = z.number();
494
- for (const check of newChecks) {
495
- switch (check.kind) {
496
- case 'int':
497
- result = result.int();
498
- break;
499
- case 'finite':
500
- result = result.finite();
501
- break;
502
- default:
503
- result = result._addCheck(check);
504
- }
505
- }
506
- const description = this.mergeParameterDescription(value.description, constraints);
507
- if (description) {
508
- result = result.describe(description);
509
- }
510
- return result;
511
- }
512
-
513
- /**
514
- * Default handler for Zod date types. Converts dates to ISO strings with constraint descriptions.
515
- *
516
- * @param value - The Zod date to process
517
- * @returns A Zod string schema representing the date in ISO format
518
- */
519
- public defaultZodDateHandler(value: ZodDate): ZodString {
520
- const constraints: DateConstraints = {};
521
- const checks = value._def.checks || [];
522
- type ZodDateCheck = (typeof checks)[number];
523
- const newChecks: ZodDateCheck[] = [];
524
- for (const check of checks) {
525
- if ('kind' in check) {
526
- switch (check.kind) {
527
- case 'min':
528
- const minDate = new Date(check.value);
529
- if (!isNaN(minDate.getTime())) {
530
- constraints.minDate = minDate.toISOString();
531
- }
532
- break;
533
- case 'max':
534
- const maxDate = new Date(check.value);
535
- if (!isNaN(maxDate.getTime())) {
536
- constraints.maxDate = maxDate.toISOString();
537
- }
538
- break;
539
- default:
540
- newChecks.push(check);
541
- }
542
- }
543
- }
544
- constraints.dateFormat = 'date-time';
545
- let result = z.string().describe('date-time');
546
- const description = this.mergeParameterDescription(value.description, constraints);
547
- if (description) {
548
- result = result.describe(description);
549
- }
550
- return result;
551
- }
552
-
553
- /**
554
- * Default handler for Zod optional types. Processes the inner type and maintains optionality.
555
- *
556
- * @param value - The Zod optional to process
557
- * @param handleTypes - Types that should be processed vs passed through
558
- * @returns The processed Zod optional
559
- */
560
- public defaultZodOptionalHandler(
561
- value: ZodOptional<any>,
562
- handleTypes: readonly AllZodType[] = SUPPORTED_ZOD_TYPES,
563
- ): ZodTypeAny {
564
- if (handleTypes.includes(value._def.innerType._def.typeName as AllZodType)) {
565
- return this.processZodType(value._def.innerType).optional();
566
- } else {
567
- return value;
568
- }
569
- }
570
-
571
- /**
572
- * Processes a Zod object schema and converts it to an AI SDK Schema.
573
- *
574
- * @param zodSchema - The Zod object schema to process
575
- * @returns An AI SDK Schema with provider-specific compatibility applied
576
- */
577
- public processToAISDKSchema(zodSchema: z.ZodSchema): Schema {
578
- const processedSchema = this.processZodType(zodSchema);
579
-
580
- return convertZodSchemaToAISDKSchema(processedSchema, this.getSchemaTarget());
581
- }
582
-
583
- /**
584
- * Processes a Zod object schema and converts it to a JSON Schema.
585
- *
586
- * @param zodSchema - The Zod object schema to process
587
- * @returns A JSONSchema7 object with provider-specific compatibility applied
588
- */
589
- public processToJSONSchema(zodSchema: z.ZodSchema): JSONSchema7 {
590
- return this.processToAISDKSchema(zodSchema).jsonSchema;
591
- }
592
- }