@mastra/schema-compat 1.3.17 → 1.3.18-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.
Files changed (77) hide show
  1. package/dist/_types/{@internal_ai-sdk-v4 → @internal_ai-sdk-v4@0.0.95}/dist/index.d.ts +52 -13
  2. package/dist/_types/{@internal_ai-sdk-v5 → @internal_ai-sdk-v5@0.0.95}/dist/index.d.ts +145 -43
  3. package/dist/_types/{@internal_ai-v6 → @internal_ai-v6@0.0.95}/dist/index.d.ts +151 -31
  4. package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/resolve.d.ts +1 -1
  5. package/dist/_types/{ajv → ajv@8.20.0}/dist/types/index.d.ts +1 -1
  6. package/dist/index.cjs +67 -2
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.js +67 -2
  9. package/dist/index.js.map +1 -1
  10. package/dist/json-schema/utils.d.ts +1 -1
  11. package/dist/json-schema.d.ts +3 -3
  12. package/dist/provider-compats/anthropic.d.ts +2 -2
  13. package/dist/provider-compats/deepseek.d.ts +2 -2
  14. package/dist/provider-compats/google.d.ts +1 -1
  15. package/dist/provider-compats/google.d.ts.map +1 -1
  16. package/dist/provider-compats/meta.d.ts +2 -2
  17. package/dist/provider-compats/openai.d.ts +1 -1
  18. package/dist/schema.types.d.ts +4 -4
  19. package/dist/standard-schema/adapters/ai-sdk.d.ts +2 -2
  20. package/dist/standard-schema/adapters/json-schema.d.ts +2 -2
  21. package/dist/standard-schema/adapters/zod-v4.d.ts +1 -1
  22. package/dist/standard-schema/standard-schema.d.ts +2 -2
  23. package/dist/standard-schema/standard-schema.types.d.ts +1 -1
  24. package/dist/zod-to-json.d.ts +1 -1
  25. package/package.json +14 -14
  26. /package/dist/_types/{@internal_ai-sdk-v4 → @internal_ai-sdk-v4@0.0.95}/package.json +0 -0
  27. /package/dist/_types/{@internal_ai-sdk-v5 → @internal_ai-sdk-v5@0.0.95}/package.json +0 -0
  28. /package/dist/_types/{@internal_ai-v6 → @internal_ai-v6@0.0.95}/package.json +0 -0
  29. /package/dist/_types/{@standard-schema_spec → @standard-schema_spec@1.1.0}/dist/index.d.ts +0 -0
  30. /package/dist/_types/{@standard-schema_spec → @standard-schema_spec@1.1.0}/package.json +0 -0
  31. /package/dist/_types/{@types_json-schema → @types_json-schema@7.0.15}/index.d.ts +0 -0
  32. /package/dist/_types/{@types_json-schema → @types_json-schema@7.0.15}/package.json +0 -0
  33. /package/dist/_types/{ajv → ajv@8.20.0}/dist/ajv.d.ts +0 -0
  34. /package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/codegen/code.d.ts +0 -0
  35. /package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/codegen/index.d.ts +0 -0
  36. /package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/codegen/scope.d.ts +0 -0
  37. /package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/errors.d.ts +0 -0
  38. /package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/index.d.ts +0 -0
  39. /package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/ref_error.d.ts +0 -0
  40. /package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/rules.d.ts +0 -0
  41. /package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/util.d.ts +0 -0
  42. /package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/validate/dataType.d.ts +0 -0
  43. /package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/validate/index.d.ts +0 -0
  44. /package/dist/_types/{ajv → ajv@8.20.0}/dist/compile/validate/subschema.d.ts +0 -0
  45. /package/dist/_types/{ajv → ajv@8.20.0}/dist/core.d.ts +0 -0
  46. /package/dist/_types/{ajv → ajv@8.20.0}/dist/runtime/validation_error.d.ts +0 -0
  47. /package/dist/_types/{ajv → ajv@8.20.0}/dist/types/json-schema.d.ts +0 -0
  48. /package/dist/_types/{ajv → ajv@8.20.0}/dist/types/jtd-schema.d.ts +0 -0
  49. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/applicator/additionalItems.d.ts +0 -0
  50. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/applicator/additionalProperties.d.ts +0 -0
  51. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/applicator/anyOf.d.ts +0 -0
  52. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/applicator/contains.d.ts +0 -0
  53. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/applicator/dependencies.d.ts +0 -0
  54. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/applicator/if.d.ts +0 -0
  55. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/applicator/index.d.ts +0 -0
  56. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/applicator/items2020.d.ts +0 -0
  57. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/applicator/not.d.ts +0 -0
  58. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/applicator/oneOf.d.ts +0 -0
  59. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/applicator/propertyNames.d.ts +0 -0
  60. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/discriminator/index.d.ts +0 -0
  61. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/discriminator/types.d.ts +0 -0
  62. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/errors.d.ts +0 -0
  63. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/format/format.d.ts +0 -0
  64. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +0 -0
  65. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +0 -0
  66. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/validation/const.d.ts +0 -0
  67. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/validation/dependentRequired.d.ts +0 -0
  68. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/validation/enum.d.ts +0 -0
  69. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/validation/index.d.ts +0 -0
  70. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/validation/limitNumber.d.ts +0 -0
  71. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/validation/multipleOf.d.ts +0 -0
  72. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/validation/pattern.d.ts +0 -0
  73. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/validation/required.d.ts +0 -0
  74. /package/dist/_types/{ajv → ajv@8.20.0}/dist/vocabularies/validation/uniqueItems.d.ts +0 -0
  75. /package/dist/_types/{ajv → ajv@8.20.0}/package.json +0 -0
  76. /package/dist/_types/{fast-uri → fast-uri@3.1.9}/package.json +0 -0
  77. /package/dist/_types/{fast-uri → fast-uri@3.1.9}/types/index.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { JSONSchema7 } from '../../@types_json-schema/index.js';
1
+ import { JSONSchema7 } from '../../@types_json-schema@7.0.15/index.js';
2
2
  import { ServerResponse } from 'node:http';
3
3
  import { ServerResponse as ServerResponse_2 } from 'http';
4
4
  import { z } from 'zod/v4';
@@ -326,10 +326,12 @@ declare namespace _ai_sdk_provider_utils {
326
326
  getRuntimeEnvironmentUserAgent,
327
327
  injectJsonInstructionIntoMessages,
328
328
  isAbortError,
329
+ isArrayBuffer,
329
330
  isBrowserRuntime,
330
331
  isNonNullable,
331
332
  isParsableJson,
332
333
  isSameOrigin,
334
+ isUint8Array,
333
335
  isUrlSupported,
334
336
  jsonSchema,
335
337
  lazySchema,
@@ -351,6 +353,7 @@ declare namespace _ai_sdk_provider_utils {
351
353
  safeParseJSON,
352
354
  safeValidateTypes,
353
355
  secureJsonParse,
356
+ stringifyWithBigIntAndCycles,
354
357
  stripFileExtension,
355
358
  tool,
356
359
  validateDownloadUrl,
@@ -396,6 +399,36 @@ export declare class AISDKError extends Error {
396
399
  protected static hasMarker(error: unknown, marker: string): boolean;
397
400
  }
398
401
 
402
+ /**
403
+ * AnyValue can be:
404
+ * - a string, number, boolean value
405
+ * - a byte array (Uint8Array)
406
+ * - array of any value
407
+ * - map from string to any value (a plain Object)
408
+ * - null (an empty value)
409
+ *
410
+ * https://opentelemetry.io/docs/specs/otel/common/#anyvalue
411
+ *
412
+ * Notable JavaScript types that are excluded:
413
+ * - `undefined` - Excluding this means the common practice in instrumentations,
414
+ * using `undefined` to mean "no value for this optional attribute", can
415
+ * remain supported.
416
+ * - `BigInt`
417
+ * - TypedArrays other than `Uint8Array`
418
+ * - subclasses of Object, e.g. Date, Error
419
+ *
420
+ * The TypeScript type `unknown` is used for `AnyValue`. This has some
421
+ * implications:
422
+ * - Callers of `@opentelemetry/api` APIs using `AnyValue` can pass in
423
+ * whatever type. This was always the case for (untyped) JavaScript usage.
424
+ * - SDK implementations of `@opentelemetry/api` need to document if/when they
425
+ * support a subset of AnyValue types.
426
+ * - Using `unknown` allows future changes to support more types (e.g. BigInt).
427
+ *
428
+ * @since 1.10.0
429
+ */
430
+ declare type AnyValue = unknown;
431
+
399
432
  export declare class APICallError extends AISDKError {
400
433
  private readonly [symbol$c];
401
434
  readonly url: string;
@@ -453,24 +486,20 @@ declare type asUITool<TOOL extends UITool | Tool> = TOOL extends Tool ? InferUIT
453
486
  export declare type AsyncIterableStream<T> = AsyncIterable<T> & ReadableStream<T>;
454
487
 
455
488
  /**
456
- * Attributes is a map from string to attribute values.
489
+ * Attributes is a mapping from string to attribute values.
490
+ * https://opentelemetry.io/docs/specs/otel/common/#attribute-collections
457
491
  *
458
- * Note: only the own enumerable keys are counted as valid attribute keys.
459
- *
460
- * @since 1.3.0
492
+ * @since 1.1.0
461
493
  */
462
494
  declare interface Attributes {
463
- [attributeKey: string]: AttributeValue | undefined;
495
+ [attributeKey: string]: AnyValue;
464
496
  }
465
497
 
466
498
  /**
467
- * Attribute values may be any non-nullish primitive value except an object.
468
- *
469
- * null or undefined attribute values are invalid and will result in undefined behavior.
470
- *
471
- * @since 1.3.0
499
+ * @since 1.1.0
500
+ * @deprecated use AnyValue
472
501
  */
473
- declare type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
502
+ declare type AttributeValue = AnyValue;
474
503
 
475
504
  declare type BaseToolCall = {
476
505
  type: 'tool-call';
@@ -1444,6 +1473,66 @@ export declare type DeepPartial<T> = T extends FlexibleSchema ? DeepPartialInter
1444
1473
 
1445
1474
  declare type DeepPartialInternal<T> = T extends null | undefined | string | number | boolean | symbol | bigint | void | Date | RegExp | ((...arguments_: any[]) => unknown) | (new (...arguments_: any[]) => unknown) ? T : T extends Map<infer KeyType, infer ValueType> ? PartialMap<KeyType, ValueType> : T extends Set<infer ItemType> ? PartialSet<ItemType> : T extends ReadonlyMap<infer KeyType, infer ValueType> ? PartialReadonlyMap<KeyType, ValueType> : T extends ReadonlySet<infer ItemType> ? PartialReadonlySet<ItemType> : T extends object ? T extends ReadonlyArray<infer ItemType> ? ItemType[] extends T ? readonly ItemType[] extends T ? ReadonlyArray<DeepPartialInternal<ItemType | undefined>> : Array<DeepPartialInternal<ItemType | undefined>> : PartialObject<T> : PartialObject<T> : unknown;
1446
1475
 
1476
+ declare interface DeepSeekFetchConfig {
1477
+ /** Pin the target URL instead of allowing the model to choose it. */
1478
+ url?: string;
1479
+ }
1480
+
1481
+ declare interface DeepSeekFetchInput {
1482
+ url: string;
1483
+ }
1484
+
1485
+ declare type DeepSeekFetchOutput = DeepSeekFetchResponse | GatewayToolError;
1486
+
1487
+ declare interface DeepSeekFetchResponse {
1488
+ title?: string | null;
1489
+ /** Page content as Markdown. */
1490
+ content: string;
1491
+ }
1492
+
1493
+ declare const deepseekFetchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<DeepSeekFetchInput, DeepSeekFetchOutput, DeepSeekFetchConfig>;
1494
+
1495
+ declare interface DeepSeekSearchConfig {
1496
+ /** Pin the query instead of allowing the model to choose it. */
1497
+ query?: string;
1498
+ /** Maximum number of results, 1–50 (default: 10). */
1499
+ count?: number;
1500
+ /** Include available page content (default: false). */
1501
+ needContent?: boolean;
1502
+ /** Original question, 1–128 Unicode characters; null means absent. */
1503
+ oriQuestion?: string | null;
1504
+ /** Developer-configured IP address for result localization. */
1505
+ localization?: string;
1506
+ }
1507
+
1508
+ declare interface DeepSeekSearchInput {
1509
+ query: string;
1510
+ count?: number;
1511
+ need_content?: boolean;
1512
+ ori_question?: string | null;
1513
+ }
1514
+
1515
+ declare type DeepSeekSearchOutput = DeepSeekSearchResponse | GatewayToolError;
1516
+
1517
+ declare interface DeepSeekSearchResponse {
1518
+ results: DeepSeekSearchResult[];
1519
+ }
1520
+
1521
+ declare interface DeepSeekSearchResult {
1522
+ authority?: number | null;
1523
+ content?: string | null;
1524
+ date?: string | null;
1525
+ rerank_score?: number | null;
1526
+ site_icon?: string | null;
1527
+ site_name?: string | null;
1528
+ snippet?: string | null;
1529
+ summary?: string | null;
1530
+ title?: string | null;
1531
+ url?: string | null;
1532
+ }
1533
+
1534
+ declare const deepseekSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<DeepSeekSearchInput, DeepSeekSearchOutput, DeepSeekSearchConfig>;
1535
+
1447
1536
  /**
1448
1537
  * Default maximum download size: 2 GiB.
1449
1538
  *
@@ -1485,7 +1574,7 @@ export declare class DefaultGeneratedFile implements GeneratedFile {
1485
1574
  private uint8ArrayData;
1486
1575
  readonly mediaType: string;
1487
1576
  constructor({ data, mediaType, }: {
1488
- data: string | Uint8Array;
1577
+ data: string | Uint8Array | ArrayBuffer;
1489
1578
  mediaType: string;
1490
1579
  });
1491
1580
  get base64(): string;
@@ -3225,7 +3314,7 @@ declare interface GatewayGenerationInfoParams {
3225
3314
  id: string;
3226
3315
  }
3227
3316
 
3228
- declare type GatewayImageModelId = 'bfl/flux-2-flex' | 'bfl/flux-2-klein-4b' | 'bfl/flux-2-klein-9b' | 'bfl/flux-2-max' | 'bfl/flux-2-pro' | 'bfl/flux-3-image' | 'bfl/flux-3-image-klein' | 'bfl/flux-kontext-max' | 'bfl/flux-kontext-pro' | 'bfl/flux-pro-1.0-fill' | 'bfl/flux-pro-1.1' | 'bfl/flux-pro-1.1-ultra' | 'bytedance/seedream-4.0' | 'bytedance/seedream-4.5' | 'bytedance/seedream-5.0-lite' | 'bytedance/seedream-5.0-pro' | 'meta/muse-image-1.0' | 'microsoft/mai-image-2.6' | 'microsoft/mai-image-2.6-flash' | 'openai/gpt-image-1' | 'openai/gpt-image-1-mini' | 'openai/gpt-image-1.5' | 'openai/gpt-image-2' | 'openai/gpt-image-2.5-flare' | 'openai/gpt-image-2.5-sunburst' | 'prodia/flux-fast-schnell' | 'recraft/recraft-v2' | 'recraft/recraft-v3' | 'recraft/recraft-v4' | 'recraft/recraft-v4-pro' | 'recraft/recraft-v4.1' | 'recraft/recraft-v4.1-flash' | 'recraft/recraft-v4.1-pro' | 'recraft/recraft-v4.1-utility' | 'recraft/recraft-v4.1-utility-pro' | 'spacexai/grok-imagine-image' | 'spacexai/grok-imagine-image-2.0' | 'topaz/wonder-3.5' | (string & {});
3317
+ declare type GatewayImageModelId = 'bfl/flux-2-flex' | 'bfl/flux-2-klein-4b' | 'bfl/flux-2-klein-9b' | 'bfl/flux-2-max' | 'bfl/flux-2-pro' | 'bfl/flux-3-image' | 'bfl/flux-3-image-klein' | 'bfl/flux-kontext-max' | 'bfl/flux-kontext-pro' | 'bfl/flux-pro-1.0-fill' | 'bfl/flux-pro-1.1' | 'bfl/flux-pro-1.1-ultra' | 'bytedance/seedream-4.0' | 'bytedance/seedream-4.5' | 'bytedance/seedream-5.0-lite' | 'bytedance/seedream-5.0-pro' | 'meta/muse-image-1.0' | 'microsoft/mai-image-2.6' | 'microsoft/mai-image-2.6-flash' | 'openai/gpt-image-1-mini' | 'openai/gpt-image-1.5' | 'openai/gpt-image-2' | 'openai/gpt-image-2.5-flare' | 'openai/gpt-image-2.5-sunburst' | 'prodia/flux-fast-schnell' | 'recraft/recraft-v2' | 'recraft/recraft-v3' | 'recraft/recraft-v4' | 'recraft/recraft-v4-pro' | 'recraft/recraft-v4.1' | 'recraft/recraft-v4.1-flash' | 'recraft/recraft-v4.1-pro' | 'recraft/recraft-v4.1-utility' | 'recraft/recraft-v4.1-utility-pro' | 'spacexai/grok-imagine-image' | 'spacexai/grok-imagine-image-2.0' | 'topaz/wonder-3.5' | (string & {});
3229
3318
 
3230
3319
  declare interface GatewayLanguageModelEntry {
3231
3320
  /**
@@ -3276,7 +3365,7 @@ declare interface GatewayLanguageModelEntry {
3276
3365
 
3277
3366
  declare type GatewayLanguageModelSpecification = Pick<LanguageModelV3, 'specificationVersion' | 'provider' | 'modelId'>;
3278
3367
 
3279
- export declare type GatewayModelId = 'alibaba/qwen-3-14b' | 'alibaba/qwen-3-235b' | 'alibaba/qwen-3-30b' | 'alibaba/qwen-3-32b' | 'alibaba/qwen3-coder' | 'alibaba/qwen3-coder-30b-a3b' | 'alibaba/qwen3-coder-next' | 'alibaba/qwen3-max-thinking' | 'alibaba/qwen3-next-80b-a3b-instruct' | 'alibaba/qwen3-next-80b-a3b-thinking' | 'alibaba/qwen3-vl-instruct' | 'alibaba/qwen3.5-flash' | 'alibaba/qwen3.5-plus' | 'alibaba/qwen3.6-27b' | 'alibaba/qwen3.6-plus' | 'alibaba/qwen3.7-flash' | 'alibaba/qwen3.7-max' | 'alibaba/qwen3.7-plus' | 'alibaba/qwen3.8-2.4t-a95b' | 'alibaba/qwen3.8-27b' | 'alibaba/qwen3.8-flash' | 'alibaba/qwen3.8-max' | 'alibaba/qwen3.8-max-0902' | 'alibaba/qwen3.8-max-prime' | 'alibaba/qwen3.8-omni-flash' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-fable-5' | 'anthropic/claude-fable-5-batch' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-fable-5.1-batch' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-haiku-4.5-batch' | 'anthropic/claude-haiku-5.5' | 'anthropic/claude-haiku-5.5-batch' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.5-batch' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.6-batch' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.7-batch' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-opus-4.8-batch' | 'anthropic/claude-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-batch' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5.5-batch' | 'anthropic/claude-opus-5.5-fast' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.5-batch' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-4.6-batch' | 'anthropic/claude-sonnet-5' | 'anthropic/claude-sonnet-5-batch' | 'anthropic/claude-sonnet-5.5' | 'anthropic/claude-sonnet-5.5-batch' | 'arcee-ai/trinity-large-thinking' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'bytedance/seed-2.1-turbo' | 'callstack/apex' | 'cohere/command-a' | 'deepseek/deepseek-r1' | 'deepseek/deepseek-v3.1' | 'deepseek/deepseek-v3.2' | 'deepseek/deepseek-v3.2-thinking' | 'deepseek/deepseek-v4-flash' | 'deepseek/deepseek-v4-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | 'deepseek/deepseek-v4.1-flash' | 'deepseek/deepseek-v4.1-flash-1017' | 'deepseek/deepseek-v4.1-flash-1017-fast' | 'deepseek/deepseek-v4.1-flash-fast' | 'elorian/glimpse' | 'fireworks/ember-1' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-batch' | 'google/gemini-2.5-flash-image' | 'google/gemini-2.5-flash-lite' | 'google/gemini-2.5-flash-lite-batch' | 'google/gemini-2.5-pro' | 'google/gemini-2.5-pro-batch' | 'google/gemini-3-flash' | 'google/gemini-3-flash-batch' | 'google/gemini-3-pro-image' | 'google/gemini-3.1-flash-image' | 'google/gemini-3.1-flash-image-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.1-flash-lite-batch' | 'google/gemini-3.1-flash-lite-image' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.1-pro-preview-batch' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-batch' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.5-flash-lite-batch' | 'google/gemini-3.6-flash' | 'google/gemini-3.6-flash-batch' | 'google/gemini-3.7-flash' | 'google/gemini-3.7-flash-batch' | 'google/gemini-3.8-flash' | 'google/gemini-4-argon' | 'google/gemini-nano-banana-2.1' | 'google/gemini-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-2.5' | 'inception/mercury-3' | 'inception/mercury-coder-small' | 'inclusionai/ling-3.0-flash' | 'inclusionai/ling-3.0-flash-fin' | 'inclusionai/ling-3.0-flash-sante' | 'inclusionai/ling-3.0-flash-vl' | 'inclusionai/ling-3.1-flash' | 'inference-net/schematron-v2-small' | 'inference-net/schematron-v2-turbo' | 'interfaze/interfaze-beta' | 'liquid/lfm2.5-24b-a2b' | 'meituan/longcat-2.5-preview' | 'meta/llama-3.1-70b' | 'meta/llama-3.1-8b' | 'meta/llama-3.3-70b' | 'meta/llama-4-maverick' | 'meta/llama-4-scout' | 'meta/muse-glimmer-30b' | 'meta/muse-spark-1.1' | 'meta/muse-spark-1.2' | 'meta/muse-spark-1.2-contributor' | 'meta/muse-spark-1.3' | 'meta/muse-spark-1.3-contributor' | 'meta/muse-spark-open' | 'meta/muse-wonder-1.0' | 'minimax/minimax-m2' | 'minimax/minimax-m2.1' | 'minimax/minimax-m2.1-lightning' | 'minimax/minimax-m2.5' | 'minimax/minimax-m2.5-highspeed' | 'minimax/minimax-m2.7' | 'minimax/minimax-m2.7-highspeed' | 'minimax/minimax-m3' | 'minimax/minimax-m3.1-flash' | 'mistral/codestral' | 'mistral/ministral-14b' | 'mistral/ministral-3b' | 'mistral/ministral-8b' | 'mistral/mistral-large-3' | 'mistral/mistral-large-4' | 'mistral/mistral-medium-3.5' | 'mistral/mistral-nemo' | 'mistral/mistral-small' | 'mixedbread/toast-1' | 'moonshotai/kimi-k2' | 'moonshotai/kimi-k2.5' | 'moonshotai/kimi-k2.6' | 'moonshotai/kimi-k2.7-code' | 'moonshotai/kimi-k2.7-code-highspeed' | 'moonshotai/kimi-k3' | 'moonshotai/kimi-k3-fast' | 'moonshotai/kimi-k3.1-pro' | 'moonshotai/kimi-k3.1-pro-highspeed' | 'morph/morph-v3-fast' | 'morph/morph-v3-large' | 'nvidia/nemotron-3-nano-30b-a3b' | 'nvidia/nemotron-3-super-120b-a12b' | 'nvidia/nemotron-3-ultra-550b-a55b' | 'nvidia/nemotron-3.5-lightning' | 'nvidia/nemotron-3.5-lightning-free' | 'nvidia/nemotron-3.5-super-vl' | 'nvidia/nemotron-nano-12b-v2-vl' | 'nvidia/nemotron-nano-9b-v2' | 'openai/gpt-3.5-turbo' | 'openai/gpt-4-turbo' | 'openai/gpt-4.1' | 'openai/gpt-4.1-batch' | 'openai/gpt-4.1-fast' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-mini-batch' | 'openai/gpt-4.1-mini-fast' | 'openai/gpt-4.1-nano' | 'openai/gpt-4.1-nano-batch' | 'openai/gpt-4.1-nano-fast' | 'openai/gpt-4o' | 'openai/gpt-4o-batch' | 'openai/gpt-4o-fast' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-batch' | 'openai/gpt-4o-mini-fast' | 'openai/gpt-5' | 'openai/gpt-5-batch' | 'openai/gpt-5-codex' | 'openai/gpt-5-fast' | 'openai/gpt-5-mini' | 'openai/gpt-5-mini-batch' | 'openai/gpt-5-mini-fast' | 'openai/gpt-5-nano' | 'openai/gpt-5-nano-batch' | 'openai/gpt-5-pro' | 'openai/gpt-5-pro-batch' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-5.1-codex-mini' | 'openai/gpt-5.1-thinking' | 'openai/gpt-5.1-thinking-fast' | 'openai/gpt-5.2' | 'openai/gpt-5.2-batch' | 'openai/gpt-5.2-codex' | 'openai/gpt-5.2-fast' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.3-codex' | 'openai/gpt-5.3-codex-fast' | 'openai/gpt-5.4' | 'openai/gpt-5.4-batch' | 'openai/gpt-5.4-fast' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-mini-batch' | 'openai/gpt-5.4-mini-fast' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.4-nano-batch' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.5' | 'openai/gpt-5.5-batch' | 'openai/gpt-5.5-fast' | 'openai/gpt-5.5-pro' | 'openai/gpt-5.5-pro-batch' | 'openai/gpt-5.6-luna' | 'openai/gpt-5.6-luna-batch' | 'openai/gpt-5.6-luna-fast' | 'openai/gpt-5.6-sol' | 'openai/gpt-5.6-sol-batch' | 'openai/gpt-5.6-sol-fast' | 'openai/gpt-5.6-terra' | 'openai/gpt-5.6-terra-batch' | 'openai/gpt-5.6-terra-fast' | 'openai/gpt-6-astra' | 'openai/gpt-6-astra-batch' | 'openai/gpt-6-astra-fast' | 'openai/gpt-6-luna' | 'openai/gpt-6-luna-batch' | 'openai/gpt-6-luna-fast' | 'openai/gpt-6-sol' | 'openai/gpt-6-sol-batch' | 'openai/gpt-6-sol-fast' | 'openai/gpt-6.1-sol' | 'openai/gpt-6.1-sol-batch' | 'openai/gpt-6.1-sol-fast' | 'openai/gpt-oss-120b' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-safeguard-120b' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o3' | 'openai/o3-fast' | 'openai/o3-mini' | 'openai/o3-pro' | 'openai/o4-mini' | 'openai/o4-mini-fast' | 'perplexity/sonar' | 'poolside/laguna-s-2.1' | 'poolside/laguna-s-2.1-free' | 'quiverai/arrow-2' | 'quiverai/arrow-2-telos' | 'reflection/beam' | 'reflection/beam-free' | 'sakana/fugu-max' | 'sakana/fugu-ultra' | 'sakana/fugu-ultra-v2' | 'sakana/namazu' | 'scaledown/scaledown-extract-1' | 'scaledown/scaledown-summarize-1' | 'spacexai/grok-4.1-fast-non-reasoning' | 'spacexai/grok-4.1-fast-reasoning' | 'spacexai/grok-4.20-multi-agent' | 'spacexai/grok-4.20-multi-agent-batch' | 'spacexai/grok-4.20-multi-agent-beta' | 'spacexai/grok-4.20-non-reasoning' | 'spacexai/grok-4.20-non-reasoning-batch' | 'spacexai/grok-4.20-non-reasoning-beta' | 'spacexai/grok-4.20-reasoning' | 'spacexai/grok-4.20-reasoning-batch' | 'spacexai/grok-4.20-reasoning-beta' | 'spacexai/grok-4.3' | 'spacexai/grok-4.3-batch' | 'spacexai/grok-4.5' | 'spacexai/grok-4.6' | 'spacexai/grok-4.7' | 'spacexai/grok-build-0.1' | 'stealth/glyph-cluster' | 'stepfun/step-3.7-flash' | 'stepfun/step-5-preview' | 'tencent/hy-mt2-lite' | 'tencent/hy-mt2-plus' | 'tencent/hy-mt2-pro' | 'tencent/hy3' | 'tencent/hy4-preview' | 'thinkingmachines/inkling' | 'thinkingmachines/inkling-small' | 'xiaomi/mimo-v2.5' | 'xiaomi/mimo-v2.5-pro' | 'xiaomi/mimo-v2.6-flash' | 'xiaomi/mimo-v2.6-pro' | 'xiaomi/mimo-v2.6-pro-ultraspeed' | 'zai/glm-4.5' | 'zai/glm-4.5-air' | 'zai/glm-4.5v' | 'zai/glm-4.6' | 'zai/glm-4.7' | 'zai/glm-4.7-flash' | 'zai/glm-4.7-flashx' | 'zai/glm-5' | 'zai/glm-5-turbo' | 'zai/glm-5.1' | 'zai/glm-5.2' | 'zai/glm-5.2-fast' | 'zai/glm-5.3' | 'zai/glm-5.3-fast' | 'zai/glm-5.3-flash' | 'zai/glm-5.3-flashx' | 'zai/glm-5v-turbo' | (string & {});
3368
+ export declare type GatewayModelId = 'alibaba/qwen-3-14b' | 'alibaba/qwen-3-235b' | 'alibaba/qwen-3-30b' | 'alibaba/qwen-3-32b' | 'alibaba/qwen3-coder' | 'alibaba/qwen3-coder-30b-a3b' | 'alibaba/qwen3-coder-next' | 'alibaba/qwen3-max-thinking' | 'alibaba/qwen3-next-80b-a3b-instruct' | 'alibaba/qwen3-next-80b-a3b-thinking' | 'alibaba/qwen3-vl-instruct' | 'alibaba/qwen3.5-flash' | 'alibaba/qwen3.5-plus' | 'alibaba/qwen3.6-27b' | 'alibaba/qwen3.6-plus' | 'alibaba/qwen3.7-flash' | 'alibaba/qwen3.7-max' | 'alibaba/qwen3.7-plus' | 'alibaba/qwen3.8-2.4t-a95b' | 'alibaba/qwen3.8-27b' | 'alibaba/qwen3.8-flash' | 'alibaba/qwen3.8-max' | 'alibaba/qwen3.8-max-0902' | 'alibaba/qwen3.8-max-prime' | 'alibaba/qwen3.8-omni-flash' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-fable-5' | 'anthropic/claude-fable-5-batch' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-fable-5.1-batch' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-haiku-4.5-batch' | 'anthropic/claude-haiku-5.5' | 'anthropic/claude-haiku-5.5-batch' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.5-batch' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.6-batch' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.7-batch' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-opus-4.8-batch' | 'anthropic/claude-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-batch' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5.5-batch' | 'anthropic/claude-opus-5.5-fast' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.5-batch' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-4.6-batch' | 'anthropic/claude-sonnet-5' | 'anthropic/claude-sonnet-5-batch' | 'anthropic/claude-sonnet-5.5' | 'anthropic/claude-sonnet-5.5-batch' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'bytedance/seed-2.1-turbo' | 'callstack/apex' | 'cohere/command-a' | 'deepseek/deepseek-r1' | 'deepseek/deepseek-v3.1' | 'deepseek/deepseek-v3.2' | 'deepseek/deepseek-v3.2-thinking' | 'deepseek/deepseek-v4-flash' | 'deepseek/deepseek-v4-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | 'deepseek/deepseek-v4.1-flash' | 'deepseek/deepseek-v4.1-flash-1017' | 'deepseek/deepseek-v4.1-flash-1017-fast' | 'deepseek/deepseek-v4.1-flash-fast' | 'elorian/glimpse' | 'fireworks/ember-1' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-batch' | 'google/gemini-2.5-flash-image' | 'google/gemini-2.5-flash-lite' | 'google/gemini-2.5-flash-lite-batch' | 'google/gemini-2.5-pro' | 'google/gemini-2.5-pro-batch' | 'google/gemini-3-flash' | 'google/gemini-3-flash-batch' | 'google/gemini-3-pro-image' | 'google/gemini-3.1-flash-image' | 'google/gemini-3.1-flash-image-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.1-flash-lite-batch' | 'google/gemini-3.1-flash-lite-image' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.1-pro-preview-batch' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-batch' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.5-flash-lite-batch' | 'google/gemini-3.6-flash' | 'google/gemini-3.6-flash-batch' | 'google/gemini-3.7-flash' | 'google/gemini-3.7-flash-batch' | 'google/gemini-3.8-flash' | 'google/gemini-4-argon' | 'google/gemini-nano-banana-2.1' | 'google/gemini-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-2.5' | 'inception/mercury-3' | 'inception/mercury-coder-small' | 'inclusionai/ling-3.0-flash' | 'inclusionai/ling-3.0-flash-fin' | 'inclusionai/ling-3.0-flash-sante' | 'inclusionai/ling-3.0-flash-vl' | 'inclusionai/ling-3.1-flash' | 'inclusionai/ling-3.1-flash-1019' | 'inference-net/schematron-v2-small' | 'inference-net/schematron-v2-turbo' | 'interfaze/interfaze-beta' | 'liquid/lfm2.5-24b-a2b' | 'meituan/longcat-2.5' | 'meta/llama-3.1-70b' | 'meta/llama-3.1-8b' | 'meta/llama-3.3-70b' | 'meta/llama-4-maverick' | 'meta/llama-4-scout' | 'meta/muse-glimmer-30b' | 'meta/muse-spark-1.1' | 'meta/muse-spark-1.2' | 'meta/muse-spark-1.2-contributor' | 'meta/muse-spark-1.3' | 'meta/muse-spark-1.3-contributor' | 'meta/muse-spark-open' | 'meta/muse-wonder-1.0' | 'minimax/minimax-m2' | 'minimax/minimax-m2.1' | 'minimax/minimax-m2.1-lightning' | 'minimax/minimax-m2.5' | 'minimax/minimax-m2.5-highspeed' | 'minimax/minimax-m2.7' | 'minimax/minimax-m2.7-highspeed' | 'minimax/minimax-m3' | 'minimax/minimax-m3.1-flash' | 'mistral/codestral' | 'mistral/ministral-14b' | 'mistral/ministral-3b' | 'mistral/ministral-8b' | 'mistral/mistral-large-3' | 'mistral/mistral-large-4' | 'mistral/mistral-medium-3.5' | 'mistral/mistral-nemo' | 'mistral/mistral-small' | 'mixedbread/toast-1' | 'moonshotai/kimi-k2' | 'moonshotai/kimi-k2.5' | 'moonshotai/kimi-k2.6' | 'moonshotai/kimi-k2.7-code' | 'moonshotai/kimi-k2.7-code-highspeed' | 'moonshotai/kimi-k3' | 'moonshotai/kimi-k3-fast' | 'moonshotai/kimi-k3.1-pro' | 'moonshotai/kimi-k3.1-pro-highspeed' | 'morph/morph-v3-fast' | 'morph/morph-v3-large' | 'nvidia/nemotron-3-nano-30b-a3b' | 'nvidia/nemotron-3-super-120b-a12b' | 'nvidia/nemotron-3-ultra-550b-a55b' | 'nvidia/nemotron-3.5-lightning' | 'nvidia/nemotron-3.5-lightning-free' | 'nvidia/nemotron-3.5-super-vl' | 'nvidia/nemotron-nano-12b-v2-vl' | 'nvidia/nemotron-nano-9b-v2' | 'openai/gpt-4.1' | 'openai/gpt-4.1-batch' | 'openai/gpt-4.1-fast' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-mini-batch' | 'openai/gpt-4.1-mini-fast' | 'openai/gpt-4.1-nano' | 'openai/gpt-4o' | 'openai/gpt-4o-batch' | 'openai/gpt-4o-fast' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-batch' | 'openai/gpt-4o-mini-fast' | 'openai/gpt-5' | 'openai/gpt-5-batch' | 'openai/gpt-5-codex' | 'openai/gpt-5-fast' | 'openai/gpt-5-mini' | 'openai/gpt-5-mini-batch' | 'openai/gpt-5-mini-fast' | 'openai/gpt-5-nano' | 'openai/gpt-5-nano-batch' | 'openai/gpt-5-pro' | 'openai/gpt-5-pro-batch' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-5.1-codex-mini' | 'openai/gpt-5.1-thinking' | 'openai/gpt-5.1-thinking-fast' | 'openai/gpt-5.2' | 'openai/gpt-5.2-batch' | 'openai/gpt-5.2-codex' | 'openai/gpt-5.2-fast' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.3-codex' | 'openai/gpt-5.3-codex-fast' | 'openai/gpt-5.4' | 'openai/gpt-5.4-batch' | 'openai/gpt-5.4-fast' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-mini-batch' | 'openai/gpt-5.4-mini-fast' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.4-nano-batch' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.5' | 'openai/gpt-5.5-batch' | 'openai/gpt-5.5-fast' | 'openai/gpt-5.5-pro' | 'openai/gpt-5.5-pro-batch' | 'openai/gpt-5.6-luna' | 'openai/gpt-5.6-luna-batch' | 'openai/gpt-5.6-luna-fast' | 'openai/gpt-5.6-sol' | 'openai/gpt-5.6-sol-batch' | 'openai/gpt-5.6-sol-fast' | 'openai/gpt-5.6-terra' | 'openai/gpt-5.6-terra-batch' | 'openai/gpt-5.6-terra-fast' | 'openai/gpt-6-astra' | 'openai/gpt-6-astra-batch' | 'openai/gpt-6-astra-fast' | 'openai/gpt-6-luna' | 'openai/gpt-6-luna-batch' | 'openai/gpt-6-luna-fast' | 'openai/gpt-6-sol' | 'openai/gpt-6-sol-batch' | 'openai/gpt-6-sol-fast' | 'openai/gpt-6.1-sol' | 'openai/gpt-6.1-sol-batch' | 'openai/gpt-6.1-sol-fast' | 'openai/gpt-6.1-terra' | 'openai/gpt-6.1-terra-fast' | 'openai/gpt-oss-120b' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-safeguard-120b' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o3' | 'openai/o3-fast' | 'openai/o3-mini' | 'openai/o3-pro' | 'openai/o4-mini' | 'particle/particle-1' | 'perplexity/sonar' | 'poolside/laguna-s-2.1' | 'quiverai/arrow-2' | 'quiverai/arrow-2-telos' | 'reflection/beam' | 'reflection/beam-free' | 'sakana/fugu-max' | 'sakana/fugu-ultra' | 'sakana/fugu-ultra-v2' | 'sakana/namazu' | 'scaledown/scaledown-extract-1' | 'scaledown/scaledown-summarize-1' | 'spacexai/grok-4.20-multi-agent' | 'spacexai/grok-4.20-multi-agent-batch' | 'spacexai/grok-4.20-multi-agent-beta' | 'spacexai/grok-4.20-non-reasoning' | 'spacexai/grok-4.20-non-reasoning-batch' | 'spacexai/grok-4.20-non-reasoning-beta' | 'spacexai/grok-4.20-reasoning' | 'spacexai/grok-4.20-reasoning-batch' | 'spacexai/grok-4.20-reasoning-beta' | 'spacexai/grok-4.3' | 'spacexai/grok-4.3-batch' | 'spacexai/grok-4.5' | 'spacexai/grok-4.6' | 'spacexai/grok-4.7' | 'spacexai/grok-build-0.1' | 'stealth/glyph-cluster' | 'stepfun/step-3.7-flash' | 'stepfun/step-5-preview' | 'tencent/hy-mt2-lite' | 'tencent/hy-mt2-plus' | 'tencent/hy-mt2-pro' | 'tencent/hy3' | 'tencent/hy4-preview' | 'thinkingmachines/inkling' | 'thinkingmachines/inkling-small' | 'xiaomi/mimo-v2.5' | 'xiaomi/mimo-v2.5-pro' | 'xiaomi/mimo-v2.6-flash' | 'xiaomi/mimo-v2.6-pro' | 'xiaomi/mimo-v2.6-pro-ultraspeed' | 'zai/glm-4.5' | 'zai/glm-4.5-air' | 'zai/glm-4.5v' | 'zai/glm-4.6' | 'zai/glm-4.7' | 'zai/glm-4.7-flash' | 'zai/glm-4.7-flashx' | 'zai/glm-5' | 'zai/glm-5-turbo' | 'zai/glm-5.1' | 'zai/glm-5.2' | 'zai/glm-5.2-fast' | 'zai/glm-5.3' | 'zai/glm-5.3-fast' | 'zai/glm-5.3-flash' | 'zai/glm-5.3-flashx' | 'zai/glm-5.3-flashx-legal' | 'zai/glm-5v-turbo' | (string & {});
3280
3369
 
3281
3370
  declare interface GatewayProvider extends ProviderV3 {
3282
3371
  (modelId: GatewayModelId): LanguageModelV3;
@@ -3390,7 +3479,7 @@ declare interface GatewayProviderSettings {
3390
3479
 
3391
3480
  declare type GatewayRerankingModelId = 'cohere/rerank-v3.5' | 'cohere/rerank-v4-fast' | 'cohere/rerank-v4-pro' | 'cohere/rerank-v5-fast' | 'cohere/rerank-v5-pro' | 'voyage/rerank-2.5' | 'voyage/rerank-2.5-lite' | 'voyage/rerank-3' | 'voyage/rerank-3-lite' | (string & {});
3392
3481
 
3393
- declare type GatewaySpeechModelId = 'fish-audio/drama-3' | 'fish-audio/s1' | 'fish-audio/s2-pro' | 'fish-audio/s2.1-pro' | 'google/gemini-3.8-flash-lite-tts' | 'google/gemini-3.8-flash-tts' | 'microsoft/mai-voice-2' | 'microsoft/mai-voice-2-flash' | 'microsoft/mai-voice-2.1' | 'microsoft/mai-voice-2.1-flash' | 'mistral/voxtral-mini-tts-3' | 'openai/tts-1' | 'openai/tts-1-hd' | 'spacexai/grok-tts' | (string & {});
3482
+ declare type GatewaySpeechModelId = 'elevenlabs/eleven-flash-v2' | 'elevenlabs/eleven-flash-v2.5' | 'elevenlabs/eleven-multilingual-v2' | 'elevenlabs/eleven-v3' | 'elevenlabs/eleven-v3-conversational' | 'elevenlabs/eleven-v4' | 'elevenlabs/eleven-v4-turbo' | 'elevenlabs/music-v2' | 'elevenlabs/music-v2.5' | 'elevenlabs/sound-effects-v2' | 'fish-audio/drama-3' | 'fish-audio/s1' | 'fish-audio/s2-pro' | 'fish-audio/s2.1-pro' | 'google/gemini-3.8-flash-lite-tts' | 'google/gemini-3.8-flash-tts' | 'microsoft/mai-voice-2' | 'microsoft/mai-voice-2-flash' | 'microsoft/mai-voice-2.1' | 'microsoft/mai-voice-2.1-flash' | 'mistral/voxtral-mini-tts-3' | 'openai/tts-1' | 'openai/tts-1-hd' | 'spacexai/grok-tts' | (string & {});
3394
3483
 
3395
3484
  declare interface GatewaySpendReportParams {
3396
3485
  /** Start date in YYYY-MM-DD format (inclusive) */
@@ -3450,6 +3539,14 @@ declare interface GatewaySpendReportRow {
3450
3539
  requestCount?: number;
3451
3540
  }
3452
3541
 
3542
+ declare interface GatewayToolError {
3543
+ error: 'api_error' | 'configuration_error' | 'execution_error' | 'gateway_rate_limit' | 'invalid_input' | 'rate_limit' | 'timeout' | 'unknown' | 'unknown_tool';
3544
+ message: string;
3545
+ statusCode?: number;
3546
+ retryAfter?: string;
3547
+ statusText?: string;
3548
+ }
3549
+
3453
3550
  /**
3454
3551
  * Gateway-specific provider-defined tools.
3455
3552
  */
@@ -3468,6 +3565,16 @@ declare const gatewayTools: {
3468
3565
  * a browser session.
3469
3566
  */
3470
3567
  browserbaseSearch: (config?: BrowserbaseSearchConfig) => ReturnType<typeof browserbaseSearchToolFactory>;
3568
+ /**
3569
+ * Fetch a page as Markdown through DeepSeek's standalone Fetch API.
3570
+ * Executed by AI Gateway for any model, separate from native model web search.
3571
+ */
3572
+ deepseekFetch: (config?: DeepSeekFetchConfig) => ReturnType<typeof deepseekFetchToolFactory>;
3573
+ /**
3574
+ * Search the web through DeepSeek's standalone Search API.
3575
+ * Executed by AI Gateway for any model, separate from native model web search.
3576
+ */
3577
+ deepseekSearch: (config?: DeepSeekSearchConfig) => ReturnType<typeof deepseekSearchToolFactory>;
3471
3578
  /**
3472
3579
  * Search the web using Exa for current information and token-efficient
3473
3580
  * excerpts optimized for agent workflows.
@@ -3504,7 +3611,7 @@ declare const gatewayTools: {
3504
3611
  takoSearch: (config?: TakoSearchConfig) => ReturnType<typeof takoSearchToolFactory>;
3505
3612
  };
3506
3613
 
3507
- declare type GatewayTranscriptionModelId = 'fish-audio/transcribe-1' | 'google/gemini-3.5-transcribe' | 'google/gemini-3.5-transcribe-live' | 'microsoft/mai-transcribe-2' | 'microsoft/mai-transcribe-2-streaming' | 'mistral/voxtral-mini-transcribe-3' | 'mistral/voxtral-small-transcribe-3' | 'openai/gpt-4o-mini-transcribe' | 'openai/gpt-4o-transcribe' | 'openai/gpt-realtime-whisper' | 'openai/whisper-1' | 'spacexai/grok-stt' | (string & {});
3614
+ declare type GatewayTranscriptionModelId = 'elevenlabs/scribe-v2' | 'elevenlabs/scribe-v2-realtime' | 'fish-audio/transcribe-1' | 'google/gemini-3.5-transcribe' | 'google/gemini-3.5-transcribe-live' | 'microsoft/mai-transcribe-2' | 'microsoft/mai-transcribe-2-streaming' | 'mistral/voxtral-mini-transcribe-3' | 'mistral/voxtral-small-transcribe-3' | 'openai/gpt-4o-mini-transcribe' | 'openai/gpt-4o-transcribe' | 'openai/gpt-live-transcribe' | 'openai/gpt-realtime-whisper' | 'openai/gpt-transcribe' | 'openai/whisper-1' | 'spacexai/grok-stt' | (string & {});
3508
3615
 
3509
3616
  declare type GatewayVideoModelId = 'alibaba/wan-v2.5-t2v-preview' | 'alibaba/wan-v2.6-i2v' | 'alibaba/wan-v2.6-i2v-flash' | 'alibaba/wan-v2.6-r2v' | 'alibaba/wan-v2.6-r2v-flash' | 'alibaba/wan-v2.6-t2v' | 'alibaba/wan-v2.7-r2v' | 'alibaba/wan-v2.7-t2v' | 'alibaba/wan-v3.0-video' | 'alibaba/wan-v3.0-video-prime' | 'bfl/flux-3-video' | 'bytedance/seedance-2.0' | 'bytedance/seedance-2.0-fast' | 'bytedance/seedance-2.0-mini' | 'bytedance/seedance-2.5' | 'bytedance/seedance-v1.0-pro' | 'bytedance/seedance-v1.0-pro-fast' | 'bytedance/seedance-v1.5-pro' | 'google/veo-3.0-fast-generate-001' | 'google/veo-3.0-generate-001' | 'google/veo-3.1-fast-generate-001' | 'google/veo-3.1-generate-001' | 'google/veo-3.1-lite-generate-001' | 'heygen/heygen-video-1' | 'klingai/kling-v2.5-turbo-i2v' | 'klingai/kling-v2.5-turbo-t2v' | 'klingai/kling-v2.6-i2v' | 'klingai/kling-v2.6-motion-control' | 'klingai/kling-v2.6-t2v' | 'klingai/kling-v3.0-i2v' | 'klingai/kling-v3.0-motion-control' | 'klingai/kling-v3.0-t2v' | 'minimax/minimax-h3' | 'minimax/minimax-h3-max' | 'spacexai/grok-imagine-video' | 'spacexai/grok-imagine-video-1.5' | 'spacexai/grok-imagine-video-1.5-lite' | 'topaz/proteus' | 'topaz/starlight-precise-2.6' | (string & {});
3510
3617
 
@@ -5122,6 +5229,8 @@ export declare class InvalidToolInputError extends AISDKError {
5122
5229
 
5123
5230
  declare function isAbortError(error: unknown): error is Error;
5124
5231
 
5232
+ declare function isArrayBuffer(value: unknown): value is ArrayBuffer;
5233
+
5125
5234
  /**
5126
5235
  * Returns `true` when running in a browser.
5127
5236
  *
@@ -5216,6 +5325,8 @@ export declare const isToolOrDynamicToolUIPart: typeof isToolUIPart;
5216
5325
  */
5217
5326
  export declare function isToolUIPart<TOOLS extends UITools>(part: UIMessagePart<UIDataTypes, TOOLS>): part is ToolUIPart<TOOLS> | DynamicToolUIPart;
5218
5327
 
5328
+ declare function isUint8Array(value: unknown): value is Uint8Array;
5329
+
5219
5330
  /**
5220
5331
  * Checks if the given URL is supported natively by the model.
5221
5332
  *
@@ -7313,7 +7424,11 @@ declare interface Link {
7313
7424
  context: SpanContext;
7314
7425
  /** A set of {@link SpanAttributes} on the link. */
7315
7426
  attributes?: SpanAttributes;
7316
- /** Count of attributes of the link that were dropped due to collection limits */
7427
+ /**
7428
+ * Count of attributes of the link that were dropped due to collection limits
7429
+ *
7430
+ * @since 1.4.1
7431
+ */
7317
7432
  droppedAttributesCount?: number;
7318
7433
  }
7319
7434
 
@@ -7952,14 +8067,7 @@ declare interface ParallelSearchConfig {
7952
8067
  location?: string;
7953
8068
  }
7954
8069
 
7955
- declare interface ParallelSearchError {
7956
- /** Error type */
7957
- error: 'api_error' | 'configuration_error' | 'execution_error' | 'gateway_rate_limit' | 'invalid_input' | 'rate_limit' | 'timeout' | 'unknown' | 'unknown_tool';
7958
- /** HTTP status code if applicable */
7959
- statusCode?: number;
7960
- /** Human-readable error message */
7961
- message: string;
7962
- }
8070
+ declare type ParallelSearchError = GatewayToolError;
7963
8071
 
7964
8072
  declare interface ParallelSearchExcerpts {
7965
8073
  /**
@@ -9711,6 +9819,8 @@ declare interface Span {
9711
9819
  * It is preferred span links be added at span creation.
9712
9820
  *
9713
9821
  * @param link the link to add.
9822
+ *
9823
+ * @since 1.9.0
9714
9824
  */
9715
9825
  addLink(link: Link): this;
9716
9826
  /**
@@ -9720,6 +9830,8 @@ declare interface Span {
9720
9830
  * It is preferred span links be added at span creation.
9721
9831
  *
9722
9832
  * @param links the links to add.
9833
+ *
9834
+ * @since 1.9.0
9723
9835
  */
9724
9836
  addLinks(links: Link[]): this;
9725
9837
  /**
@@ -11435,6 +11547,13 @@ export declare type StreamTextTransform<TOOLS extends ToolSet> = (options: {
11435
11547
  stopStream: () => void;
11436
11548
  }) => TransformStream<TextStreamPart<TOOLS>, TextStreamPart<TOOLS>>;
11437
11549
 
11550
+ /**
11551
+ * Serializes a value as JSON, representing BigInt values as decimal strings and
11552
+ * ancestor cycles as "[Circular]". Reused objects, toJSON methods, and other JSON
11553
+ * serialization behavior are preserved. Getters and toJSON methods may throw.
11554
+ */
11555
+ declare function stringifyWithBigIntAndCycles(value: unknown): string;
11556
+
11438
11557
  /**
11439
11558
  * Strips file extension segments from a filename.
11440
11559
  *
@@ -11685,11 +11804,7 @@ declare interface TakoSearchConfig {
11685
11804
 
11686
11805
  declare type TakoSearchEffort = 'deep' | 'fast' | 'instant';
11687
11806
 
11688
- declare interface TakoSearchError {
11689
- error: 'api_error' | 'configuration_error' | 'execution_error' | 'invalid_input' | 'rate_limit' | 'timeout' | 'unknown_tool';
11690
- statusCode?: number;
11691
- message: string;
11692
- }
11807
+ declare type TakoSearchError = GatewayToolError;
11693
11808
 
11694
11809
  declare interface TakoSearchInput {
11695
11810
  query: string;
@@ -12941,6 +13056,11 @@ declare interface Tracer {
12941
13056
  * Additionally the new span gets set in context and this context is activated
12942
13057
  * for the duration of the function call.
12943
13058
  *
13059
+ * **Important**: The callback function is responsible for calling `span.end()`
13060
+ * to finish the span. Unlike some other OpenTelemetry implementations, the span
13061
+ * is NOT automatically ended when the callback returns. If `span.end()` is not
13062
+ * called, the span will never be exported and will be silently lost.
13063
+ *
12944
13064
  * @param name The name of the span
12945
13065
  * @param [options] SpanOptions used for span creation
12946
13066
  * @param [context] Context to use to extract parent
@@ -1,6 +1,6 @@
1
1
  import type { AnySchema, AnySchemaObject, UriResolver } from "../types";
2
2
  import type Ajv from "../ajv";
3
- import type { URIComponent } from "../../../fast-uri/types/index.js";
3
+ import type { URIComponent } from "../../../fast-uri@3.1.9/types/index.js";
4
4
  export type LocalRefs = {
5
5
  [Ref in string]?: AnySchemaObject;
6
6
  };
@@ -1,4 +1,4 @@
1
- import { URIComponent } from "../../../fast-uri/types/index.js";
1
+ import { URIComponent } from "../../../fast-uri@3.1.9/types/index.js";
2
2
  import type { CodeGen, Code, Name, ScopeValueSets, ValueScopeName } from "../compile/codegen";
3
3
  import type { SchemaEnv, SchemaCxt, SchemaObjCxt } from "../compile";
4
4
  import type { JSONType } from "../compile/rules";
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_json_schema_traverse$1 = require("./json-schema-traverse-evfp8uQX.cjs");
3
- const require_zod_to_json = require("./zod-to-json.cjs");
4
2
  const require_schema = require("./schema-D2ab1-Dc.cjs");
3
+ const require_zod_to_json = require("./zod-to-json.cjs");
4
+ const require_json_schema_traverse$1 = require("./json-schema-traverse-evfp8uQX.cjs");
5
5
  let zod_v3 = require("zod/v3");
6
6
  let zod = require("zod");
7
7
  let zod_from_json_schema = require("zod-from-json-schema");
@@ -6081,6 +6081,63 @@ function fixAISDKNullableUnionTypes(schema) {
6081
6081
  }
6082
6082
  return result;
6083
6083
  }
6084
+ function isNonEmptyString(value) {
6085
+ return typeof value === "string" && value !== "";
6086
+ }
6087
+ /**
6088
+ * The JSON Schema types of a set of literal values (all numbers count as one
6089
+ * `integer` or `number` type), or `undefined` when there are none or one is an
6090
+ * object or array.
6091
+ */
6092
+ function inferLiteralTypes(values) {
6093
+ const numberType = values.every((value) => typeof value !== "number" || Number.isInteger(value)) ? "integer" : "number";
6094
+ const types = /* @__PURE__ */ new Set();
6095
+ for (const value of values) if (typeof value === "string" || typeof value === "boolean") types.add(typeof value);
6096
+ else if (typeof value === "number") types.add(numberType);
6097
+ else return;
6098
+ return types.size > 0 ? [...types] : void 0;
6099
+ }
6100
+ function appendDescription(description, note) {
6101
+ return typeof description === "string" && description !== "" ? `${description} ${note}` : note;
6102
+ }
6103
+ /** Nodes whose description got an allowed-values note from `toGeminiEnum`. */
6104
+ const nodesWithAllowedValuesNote = /* @__PURE__ */ new WeakSet();
6105
+ /**
6106
+ * Gemini's `Schema.enum` only accepts non-empty strings, so any other enum value
6107
+ * (numbers, booleans, `""`, `null`) makes the whole request fail with HTTP 400 (#29167).
6108
+ *
6109
+ * - A string enum on a string (or untyped) node is kept and gets `type: 'string'`;
6110
+ * a `null` among its values becomes `nullable: true`.
6111
+ * - Any other enum is dropped. The node keeps (or gets) a `type`, and the allowed
6112
+ * values move into `description` so the model still sees the constraint.
6113
+ *
6114
+ * Tool-call arguments are still validated against the original schema, so this
6115
+ * only changes what is sent to Gemini, not which inputs are accepted.
6116
+ */
6117
+ function toGeminiEnum(s) {
6118
+ const values = s["enum"];
6119
+ if (!Array.isArray(values) || values.length === 0) return;
6120
+ const isStringNode = s["type"] === "string" || s["type"] === void 0 && s["anyOf"] === void 0;
6121
+ const hasNull = values.includes(null);
6122
+ const nonNull = values.filter((value) => value !== null);
6123
+ if (isStringNode && nonNull.length > 0 && nonNull.every(isNonEmptyString)) {
6124
+ s["enum"] = nonNull;
6125
+ s["type"] = "string";
6126
+ if (hasNull) s["nullable"] = true;
6127
+ return;
6128
+ }
6129
+ delete s["enum"];
6130
+ if (hasNull) s["nullable"] = true;
6131
+ if (s["type"] === void 0 && s["anyOf"] === void 0) {
6132
+ const types = inferLiteralTypes(nonNull);
6133
+ if (types?.length === 1) s["type"] = types[0];
6134
+ else if (types) s["anyOf"] = types.map((type) => ({ type }));
6135
+ }
6136
+ const formatted = values.map((value) => JSON.stringify(value));
6137
+ const note = formatted.length === 1 ? `Must be ${formatted[0]}.` : `Must be one of: ${formatted.join(", ")}.`;
6138
+ s["description"] = appendDescription(s["description"], note);
6139
+ nodesWithAllowedValuesNote.add(s);
6140
+ }
6084
6141
  /**
6085
6142
  * Inline `$ref` pointers one level and drop `definitions`/`$defs`.
6086
6143
  * Gemini can't follow JSON Schema `$ref`s — they cause silent mis-fills.
@@ -6227,6 +6284,7 @@ var GoogleSchemaCompatLayer = class extends SchemaCompatLayer {
6227
6284
  s["enum"] = [s["const"]];
6228
6285
  delete s["const"];
6229
6286
  }
6287
+ toGeminiEnum(s);
6230
6288
  if (Array.isArray(s["items"])) {
6231
6289
  s["items"] = { anyOf: s["items"] };
6232
6290
  delete s["minItems"];
@@ -6238,8 +6296,15 @@ var GoogleSchemaCompatLayer = class extends SchemaCompatLayer {
6238
6296
  const hasNull = variants.some((v) => v && typeof v === "object" && v["type"] === "null");
6239
6297
  if (hasNull && nonNull.length === 1) {
6240
6298
  const base = nonNull[0];
6299
+ const parentDescription = s["description"];
6300
+ const carriesNote = nodesWithAllowedValuesNote.has(s) || nodesWithAllowedValuesNote.has(base);
6241
6301
  delete s["anyOf"];
6242
6302
  Object.assign(s, base);
6303
+ if (carriesNote) {
6304
+ const baseDescription = base["description"];
6305
+ if (isNonEmptyString(parentDescription) && isNonEmptyString(baseDescription) && !baseDescription.startsWith(parentDescription)) s["description"] = appendDescription(parentDescription, baseDescription);
6306
+ nodesWithAllowedValuesNote.add(s);
6307
+ }
6243
6308
  s["nullable"] = true;
6244
6309
  } else if (hasNull && nonNull.length > 1) {
6245
6310
  s["anyOf"] = nonNull;