@mastra/ai-sdk 1.10.4 → 1.10.5-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.
@@ -234,6 +234,7 @@ declare namespace _ai_sdk_provider_utils {
234
234
  DataContent,
235
235
  DelayedPromise,
236
236
  DownloadError,
237
+ EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL as EXPERIMENTAL_EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL,
237
238
  FetchFunction,
238
239
  FilePart,
239
240
  FlexibleSchema,
@@ -379,6 +380,38 @@ export declare class AISDKError extends Error {
379
380
  protected static hasMarker(error: unknown, marker: string): boolean;
380
381
  }
381
382
 
383
+ /**
384
+ * Custom error class for AI SDK related errors.
385
+ * @extends Error
386
+ */
387
+ declare class AISDKError_2 extends Error {
388
+ private readonly [symbol$d_2];
389
+ /**
390
+ * The underlying cause of the error, if any.
391
+ */
392
+ readonly cause?: unknown;
393
+ /**
394
+ * Creates an AI SDK Error.
395
+ *
396
+ * @param {Object} params - The parameters for creating the error.
397
+ * @param {string} params.name - The name of the error.
398
+ * @param {string} params.message - The error message.
399
+ * @param {unknown} [params.cause] - The underlying cause of the error.
400
+ */
401
+ constructor({ name, message, cause, }: {
402
+ name: string;
403
+ message: string;
404
+ cause?: unknown;
405
+ });
406
+ /**
407
+ * Checks if the given error is an AI SDK Error.
408
+ * @param {unknown} error - The error to check.
409
+ * @returns {boolean} True if the error is an AI SDK Error, false otherwise.
410
+ */
411
+ static isInstance(error: unknown): error is AISDKError_2;
412
+ protected static hasMarker(error: unknown, marker: string): boolean;
413
+ }
414
+
382
415
  export declare class APICallError extends AISDKError {
383
416
  private readonly [symbol$c];
384
417
  readonly url: string;
@@ -403,6 +436,30 @@ export declare class APICallError extends AISDKError {
403
436
  static isInstance(error: unknown): error is APICallError;
404
437
  }
405
438
 
439
+ declare class APICallError_2 extends AISDKError_2 {
440
+ private readonly [symbol$c_2];
441
+ readonly url: string;
442
+ readonly requestBodyValues: unknown;
443
+ readonly statusCode?: number;
444
+ readonly responseHeaders?: Record<string, string>;
445
+ readonly responseBody?: string;
446
+ readonly isRetryable: boolean;
447
+ readonly data?: unknown;
448
+ constructor({ message, url, requestBodyValues, statusCode, responseHeaders, responseBody, cause, isRetryable, // server error
449
+ data, }: {
450
+ message: string;
451
+ url: string;
452
+ requestBodyValues: unknown;
453
+ statusCode?: number;
454
+ responseHeaders?: Record<string, string>;
455
+ responseBody?: string;
456
+ cause?: unknown;
457
+ isRetryable?: boolean;
458
+ data?: unknown;
459
+ });
460
+ static isInstance(error: unknown): error is APICallError_2;
461
+ }
462
+
406
463
  export declare function asSchema<OBJECT>(schema: FlexibleSchema<OBJECT> | undefined): Schema<OBJECT>;
407
464
 
408
465
  /**
@@ -926,7 +983,7 @@ export declare function convertFileListToFileUIParts(files: FileList | undefined
926
983
  * If the file is base64 data, it returns a data URI with the base64 data.
927
984
  * If the file is a Uint8Array, it converts it to base64 and returns a data URI.
928
985
  */
929
- declare function convertImageModelFileToDataUri(file: ImageModelV3File): string;
986
+ declare function convertImageModelFileToDataUri(file: ImageModelV3File_2): string;
930
987
 
931
988
  declare function convertToBase64(value: string | Uint8Array): string;
932
989
 
@@ -1094,7 +1151,7 @@ declare const createJsonErrorResponseHandler: <T>({ errorSchema, errorToMessage,
1094
1151
  errorSchema: FlexibleSchema<T>;
1095
1152
  errorToMessage: (error: T) => string;
1096
1153
  isRetryable?: (response: Response, error?: T) => boolean;
1097
- }) => ResponseHandler<APICallError>;
1154
+ }) => ResponseHandler<APICallError_2>;
1098
1155
 
1099
1156
  declare const createJsonResponseHandler: <T>(responseSchema: FlexibleSchema<T>) => ResponseHandler<T>;
1100
1157
 
@@ -1139,7 +1196,7 @@ declare function createProviderToolFactoryWithOutputSchema<INPUT, OUTPUT, ARGS e
1139
1196
  supportsDeferredResults?: boolean;
1140
1197
  }): ProviderToolFactoryWithOutputSchema<INPUT, OUTPUT, ARGS>;
1141
1198
 
1142
- declare const createStatusCodeErrorResponseHandler: () => ResponseHandler<APICallError>;
1199
+ declare const createStatusCodeErrorResponseHandler: () => ResponseHandler<APICallError_2>;
1143
1200
 
1144
1201
  /**
1145
1202
  * Creates a Response object from a text stream.
@@ -1165,7 +1222,7 @@ declare function createToolNameMapping({ tools, providerToolNames, resolveProvid
1165
1222
  /**
1166
1223
  * Tools that were passed to the language model.
1167
1224
  */
1168
- tools: Array<LanguageModelV3FunctionTool | LanguageModelV3ProviderTool> | undefined;
1225
+ tools: Array<LanguageModelV3FunctionTool_2 | LanguageModelV3ProviderTool_2> | undefined;
1169
1226
  /**
1170
1227
  * Maps the provider tool ids to the provider tool names.
1171
1228
  */
@@ -1174,7 +1231,7 @@ declare function createToolNameMapping({ tools, providerToolNames, resolveProvid
1174
1231
  * Optional resolver for provider tool names that cannot be represented as
1175
1232
  * static id -> name mappings (e.g. dynamic provider names).
1176
1233
  */
1177
- resolveProviderToolName?: (tool: LanguageModelV3ProviderTool) => string | undefined;
1234
+ resolveProviderToolName?: (tool: LanguageModelV3ProviderTool_2) => string | undefined;
1178
1235
  }): ToolNameMapping;
1179
1236
 
1180
1237
  export declare type CreateUIMessage<UI_MESSAGE extends UIMessage> = Omit<UI_MESSAGE, 'id' | 'role'> & {
@@ -1450,7 +1507,7 @@ declare function downloadBlob(url: string, options?: {
1450
1507
  abortSignal?: AbortSignal;
1451
1508
  }): Promise<Blob>;
1452
1509
 
1453
- export declare class DownloadError extends AISDKError {
1510
+ export declare class DownloadError extends AISDKError_2 {
1454
1511
  private readonly [symbol_2];
1455
1512
  readonly url: string;
1456
1513
  readonly statusCode?: number;
@@ -1472,7 +1529,7 @@ export declare function dynamicTool(tool: {
1472
1529
  description?: string;
1473
1530
  title?: string;
1474
1531
  providerOptions?: ProviderOptions;
1475
- metadata?: JSONObject;
1532
+ metadata?: JSONObject_2;
1476
1533
  inputSchema: FlexibleSchema<unknown>;
1477
1534
  execute: ToolExecuteFunction<unknown, unknown>;
1478
1535
  /**
@@ -1699,6 +1756,14 @@ export declare function embed({ model: modelArg, value, providerOptions, maxRetr
1699
1756
  */
1700
1757
  export declare type Embedding = EmbeddingModelV3Embedding;
1701
1758
 
1759
+ /**
1760
+ * Symbol for exposing the UTF-8 input byte budget of an embedding model.
1761
+ *
1762
+ * This capability is experimental and intentionally lives outside the versioned
1763
+ * embedding model specification.
1764
+ */
1765
+ declare const EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL: unique symbol;
1766
+
1702
1767
  /**
1703
1768
  * Embedding model that is used by the AI SDK.
1704
1769
  */
@@ -2814,6 +2879,11 @@ declare type FetchFunction = typeof globalThis.fetch;
2814
2879
  * The returned response is the final (non-redirect) response. The caller is
2815
2880
  * responsible for checking `response.ok` and reading the body.
2816
2881
  *
2882
+ * On Node.js, the default fetch resolves every hostname through a validating
2883
+ * lookup hook and passes those exact addresses to the connector, preventing
2884
+ * hostname-to-private-IP and DNS-rebinding bypasses. Other runtimes should
2885
+ * constrain egress at the network layer when handling untrusted URLs.
2886
+ *
2817
2887
  * @throws DownloadError if a hop is unsafe, the redirect limit is exceeded, or
2818
2888
  * a redirect cannot be validated on a non-browser runtime.
2819
2889
  */
@@ -4492,6 +4562,42 @@ declare type ImageModelV3File = {
4492
4562
  providerOptions?: SharedV3ProviderMetadata;
4493
4563
  };
4494
4564
 
4565
+ /**
4566
+ * An image file that can be used for image editing or variation generation.
4567
+ */
4568
+ declare type ImageModelV3File_2 = {
4569
+ type: 'file';
4570
+ /**
4571
+ * The IANA media type of the file, e.g. `image/png`. Any string is supported.
4572
+ *
4573
+ * @see https://www.iana.org/assignments/media-types/media-types.xhtml
4574
+ */
4575
+ mediaType: string;
4576
+ /**
4577
+ * Generated file data as base64 encoded strings or binary data.
4578
+ *
4579
+ * The file data should be returned without any unnecessary conversion.
4580
+ * If the API returns base64 encoded strings, the file data should be returned
4581
+ * as base64 encoded strings. If the API returns binary data, the file data should
4582
+ * be returned as binary data.
4583
+ */
4584
+ data: string | Uint8Array;
4585
+ /**
4586
+ * Optional provider-specific metadata for the file part.
4587
+ */
4588
+ providerOptions?: SharedV3ProviderMetadata_2;
4589
+ } | {
4590
+ type: 'url';
4591
+ /**
4592
+ * The URL of the image file.
4593
+ */
4594
+ url: string;
4595
+ /**
4596
+ * Optional provider-specific metadata for the file part.
4597
+ */
4598
+ providerOptions?: SharedV3ProviderMetadata_2;
4599
+ };
4600
+
4495
4601
  /**
4496
4602
  * Middleware for ImageModelV3.
4497
4603
  * This type defines the structure for middleware that can be used to modify
@@ -4675,11 +4781,11 @@ export declare type InferUITools<TOOLS extends ToolSet> = {
4675
4781
  };
4676
4782
 
4677
4783
  declare function injectJsonInstructionIntoMessages({ messages, schema, schemaPrefix, schemaSuffix, }: {
4678
- messages: LanguageModelV3Prompt;
4784
+ messages: LanguageModelV3Prompt_2;
4679
4785
  schema?: JSONSchema7;
4680
4786
  schemaPrefix?: string;
4681
4787
  schemaSuffix?: string;
4682
- }): LanguageModelV3Prompt;
4788
+ }): LanguageModelV3Prompt_2;
4683
4789
 
4684
4790
  export declare class InvalidArgumentError extends AISDKError {
4685
4791
  private readonly [symbol$i];
@@ -4904,10 +5010,16 @@ declare type Job = () => Promise<void>;
4904
5010
 
4905
5011
  declare type JSONArray = JSONValue_2[];
4906
5012
 
5013
+ declare type JSONArray_2 = JSONValue_3[];
5014
+
4907
5015
  declare type JSONObject = {
4908
5016
  [key: string]: JSONValue_2 | undefined;
4909
5017
  };
4910
5018
 
5019
+ declare type JSONObject_2 = {
5020
+ [key: string]: JSONValue_3 | undefined;
5021
+ };
5022
+
4911
5023
  export declare class JSONParseError extends AISDKError {
4912
5024
  private readonly [symbol$7];
4913
5025
  readonly text: string;
@@ -4918,6 +5030,16 @@ export declare class JSONParseError extends AISDKError {
4918
5030
  static isInstance(error: unknown): error is JSONParseError;
4919
5031
  }
4920
5032
 
5033
+ declare class JSONParseError_2 extends AISDKError_2 {
5034
+ private readonly [symbol$7_2];
5035
+ readonly text: string;
5036
+ constructor({ text, cause }: {
5037
+ text: string;
5038
+ cause: unknown;
5039
+ });
5040
+ static isInstance(error: unknown): error is JSONParseError_2;
5041
+ }
5042
+
4921
5043
  /**
4922
5044
  * Create a schema using a JSON Schema.
4923
5045
  *
@@ -4947,6 +5069,12 @@ export declare type JSONValue = JSONValue_2;
4947
5069
  */
4948
5070
  declare type JSONValue_2 = null | string | number | boolean | JSONObject | JSONArray;
4949
5071
 
5072
+ /**
5073
+ * A JSON value can be a string, number, boolean, object, array, or null.
5074
+ * JSON values can be serialized and deserialized by the JSON.stringify and JSON.parse methods.
5075
+ */
5076
+ declare type JSONValue_3 = null | string | number | boolean | JSONObject_2 | JSONArray_2;
5077
+
4950
5078
  declare const KNOWN_MODEL_TYPES: readonly ["embedding", "image", "language", "reranking", "speech", "transcription", "video"];
4951
5079
 
4952
5080
  declare type KnownModelType = (typeof KNOWN_MODEL_TYPES)[number];
@@ -5969,6 +6097,11 @@ declare type LanguageModelV3Content = LanguageModelV3Text | LanguageModelV3Reaso
5969
6097
  */
5970
6098
  declare type LanguageModelV3DataContent = Uint8Array | string | URL;
5971
6099
 
6100
+ /**
6101
+ * Data content. Can be a Uint8Array, base64 encoded data as a string or a URL.
6102
+ */
6103
+ declare type LanguageModelV3DataContent_2 = Uint8Array | string | URL;
6104
+
5972
6105
  /**
5973
6106
  * A file that has been generated by the model.
5974
6107
  * Generated files as base64 encoded strings or binary data.
@@ -6026,6 +6159,42 @@ declare interface LanguageModelV3FilePart {
6026
6159
  providerOptions?: SharedV3ProviderOptions;
6027
6160
  }
6028
6161
 
6162
+ /**
6163
+ * File content part of a prompt. It contains a file.
6164
+ */
6165
+ declare interface LanguageModelV3FilePart_2 {
6166
+ type: 'file';
6167
+ /**
6168
+ * Optional filename of the file.
6169
+ */
6170
+ filename?: string;
6171
+ /**
6172
+ * File data. Can be a Uint8Array, base64 encoded data as a string or a URL.
6173
+ */
6174
+ data: LanguageModelV3DataContent_2;
6175
+ /**
6176
+ * The original URL string before it was parsed into a URL.
6177
+ *
6178
+ * This is available when parsing changes the string and a provider needs to
6179
+ * preserve an opaque non-HTTP URI exactly.
6180
+ */
6181
+ originalUrl?: string;
6182
+ /**
6183
+ * IANA media type of the file.
6184
+ *
6185
+ * Can support wildcards, e.g. `image/*` (in which case the provider needs to take appropriate action).
6186
+ *
6187
+ * @see https://www.iana.org/assignments/media-types/media-types.xhtml
6188
+ */
6189
+ mediaType: string;
6190
+ /**
6191
+ * Additional provider-specific options. They are passed through
6192
+ * to the provider from the AI SDK and enable provider-specific
6193
+ * functionality that can be fully encapsulated in the provider.
6194
+ */
6195
+ providerOptions?: SharedV3ProviderOptions_2;
6196
+ }
6197
+
6029
6198
  /**
6030
6199
  * Reason why a language model finished generating a response.
6031
6200
  *
@@ -6099,6 +6268,52 @@ declare type LanguageModelV3FunctionTool = {
6099
6268
  providerOptions?: SharedV3ProviderOptions;
6100
6269
  };
6101
6270
 
6271
+ /**
6272
+ * A tool has a name, a description, and a set of parameters.
6273
+ *
6274
+ * Note: this is **not** the user-facing tool definition. The AI SDK methods will
6275
+ * map the user-facing tool definitions to this format.
6276
+ */
6277
+ declare type LanguageModelV3FunctionTool_2 = {
6278
+ /**
6279
+ * The type of the tool (always 'function').
6280
+ */
6281
+ type: 'function';
6282
+ /**
6283
+ * The name of the tool. Unique within this model call.
6284
+ */
6285
+ name: string;
6286
+ /**
6287
+ * A description of the tool. The language model uses this to understand the
6288
+ * tool's purpose and to provide better completion suggestions.
6289
+ */
6290
+ description?: string;
6291
+ /**
6292
+ * The parameters that the tool expects. The language model uses this to
6293
+ * understand the tool's input requirements and to provide matching suggestions.
6294
+ */
6295
+ inputSchema: JSONSchema7;
6296
+ /**
6297
+ * An optional list of input examples that show the language
6298
+ * model what the input should look like.
6299
+ */
6300
+ inputExamples?: Array<{
6301
+ input: JSONObject_2;
6302
+ }>;
6303
+ /**
6304
+ * Strict mode setting for the tool.
6305
+ *
6306
+ * Providers that support strict mode will use this setting to determine
6307
+ * how the input should be generated. Strict mode will always produce
6308
+ * valid inputs, but it might limit what input schemas are supported.
6309
+ */
6310
+ strict?: boolean;
6311
+ /**
6312
+ * The provider-specific options for the tool.
6313
+ */
6314
+ providerOptions?: SharedV3ProviderOptions_2;
6315
+ };
6316
+
6102
6317
  /**
6103
6318
  * The result of a language model doGenerate call.
6104
6319
  */
@@ -6170,6 +6385,27 @@ declare type LanguageModelV3Message = ({
6170
6385
  providerOptions?: SharedV3ProviderOptions;
6171
6386
  };
6172
6387
 
6388
+ declare type LanguageModelV3Message_2 = ({
6389
+ role: 'system';
6390
+ content: string;
6391
+ } | {
6392
+ role: 'user';
6393
+ content: Array<LanguageModelV3TextPart_2 | LanguageModelV3FilePart_2>;
6394
+ } | {
6395
+ role: 'assistant';
6396
+ content: Array<LanguageModelV3TextPart_2 | LanguageModelV3FilePart_2 | LanguageModelV3ReasoningPart_2 | LanguageModelV3ToolCallPart_2 | LanguageModelV3ToolResultPart_2>;
6397
+ } | {
6398
+ role: 'tool';
6399
+ content: Array<LanguageModelV3ToolResultPart_2 | LanguageModelV3ToolApprovalResponsePart_2>;
6400
+ }) & {
6401
+ /**
6402
+ * Additional provider-specific options. They are passed through
6403
+ * to the provider from the AI SDK and enable provider-specific
6404
+ * functionality that can be fully encapsulated in the provider.
6405
+ */
6406
+ providerOptions?: SharedV3ProviderOptions_2;
6407
+ };
6408
+
6173
6409
  /**
6174
6410
  * Experimental middleware for LanguageModelV3.
6175
6411
  * This type defines the structure for middleware that can be used to modify
@@ -6259,6 +6495,17 @@ declare type LanguageModelV3Middleware = {
6259
6495
  */
6260
6496
  declare type LanguageModelV3Prompt = Array<LanguageModelV3Message>;
6261
6497
 
6498
+ /**
6499
+ * A prompt is a list of messages.
6500
+ *
6501
+ * Note: Not all models and prompt formats support multi-modal inputs and
6502
+ * tool calls. The validation happens at runtime.
6503
+ *
6504
+ * Note: This is not a user-facing prompt. The AI SDK methods will map the
6505
+ * user-facing prompt types such as chat or instruction prompts to this format.
6506
+ */
6507
+ declare type LanguageModelV3Prompt_2 = Array<LanguageModelV3Message_2>;
6508
+
6262
6509
  /**
6263
6510
  * The configuration of a provider tool.
6264
6511
  *
@@ -6285,6 +6532,32 @@ declare type LanguageModelV3ProviderTool = {
6285
6532
  args: Record<string, unknown>;
6286
6533
  };
6287
6534
 
6535
+ /**
6536
+ * The configuration of a provider tool.
6537
+ *
6538
+ * Provider tools are tools that are specific to a certain provider.
6539
+ * The input and output schemas are defined be the provider, and
6540
+ * some of the tools are also executed on the provider systems.
6541
+ */
6542
+ declare type LanguageModelV3ProviderTool_2 = {
6543
+ /**
6544
+ * The type of the tool (always 'provider').
6545
+ */
6546
+ type: 'provider';
6547
+ /**
6548
+ * The ID of the tool. Should follow the format `<provider-id>.<unique-tool-name>`.
6549
+ */
6550
+ id: `${string}.${string}`;
6551
+ /**
6552
+ * The name of the tool. Unique within this model call.
6553
+ */
6554
+ name: string;
6555
+ /**
6556
+ * The arguments for configuring the tool. Must match the expected arguments defined by the provider for this tool.
6557
+ */
6558
+ args: Record<string, unknown>;
6559
+ };
6560
+
6288
6561
  /**
6289
6562
  * Reasoning that the model has generated.
6290
6563
  */
@@ -6314,6 +6587,23 @@ declare interface LanguageModelV3ReasoningPart {
6314
6587
  providerOptions?: SharedV3ProviderOptions;
6315
6588
  }
6316
6589
 
6590
+ /**
6591
+ * Reasoning content part of a prompt. It contains a string of reasoning text.
6592
+ */
6593
+ declare interface LanguageModelV3ReasoningPart_2 {
6594
+ type: 'reasoning';
6595
+ /**
6596
+ * The reasoning text.
6597
+ */
6598
+ text: string;
6599
+ /**
6600
+ * Additional provider-specific options. They are passed through
6601
+ * to the provider from the AI SDK and enable provider-specific
6602
+ * functionality that can be fully encapsulated in the provider.
6603
+ */
6604
+ providerOptions?: SharedV3ProviderOptions_2;
6605
+ }
6606
+
6317
6607
  declare interface LanguageModelV3ResponseMetadata {
6318
6608
  /**
6319
6609
  * ID for the generated response, if the provider sends one.
@@ -6501,13 +6791,30 @@ declare interface LanguageModelV3TextPart {
6501
6791
  }
6502
6792
 
6503
6793
  /**
6504
- * Tool approval request emitted by a provider for a provider-executed tool call.
6505
- *
6506
- * This is used for flows where the provider executes the tool (e.g. MCP tools)
6507
- * but requires an explicit user approval before continuing.
6794
+ * Text content part of a prompt. It contains a string of text.
6508
6795
  */
6509
- declare type LanguageModelV3ToolApprovalRequest = {
6510
- type: 'tool-approval-request';
6796
+ declare interface LanguageModelV3TextPart_2 {
6797
+ type: 'text';
6798
+ /**
6799
+ * The text content.
6800
+ */
6801
+ text: string;
6802
+ /**
6803
+ * Additional provider-specific options. They are passed through
6804
+ * to the provider from the AI SDK and enable provider-specific
6805
+ * functionality that can be fully encapsulated in the provider.
6806
+ */
6807
+ providerOptions?: SharedV3ProviderOptions_2;
6808
+ }
6809
+
6810
+ /**
6811
+ * Tool approval request emitted by a provider for a provider-executed tool call.
6812
+ *
6813
+ * This is used for flows where the provider executes the tool (e.g. MCP tools)
6814
+ * but requires an explicit user approval before continuing.
6815
+ */
6816
+ declare type LanguageModelV3ToolApprovalRequest = {
6817
+ type: 'tool-approval-request';
6511
6818
  /**
6512
6819
  * ID of the approval request. This ID is referenced by the subsequent
6513
6820
  * tool-approval-response (tool message) to approve or deny execution.
@@ -6549,6 +6856,32 @@ declare interface LanguageModelV3ToolApprovalResponsePart {
6549
6856
  providerOptions?: SharedV3ProviderOptions;
6550
6857
  }
6551
6858
 
6859
+ /**
6860
+ * Tool approval response content part of a prompt. It contains the user's
6861
+ * decision to approve or deny a provider-executed tool call.
6862
+ */
6863
+ declare interface LanguageModelV3ToolApprovalResponsePart_2 {
6864
+ type: 'tool-approval-response';
6865
+ /**
6866
+ * ID of the approval request that this response refers to.
6867
+ */
6868
+ approvalId: string;
6869
+ /**
6870
+ * Whether the approval was granted (true) or denied (false).
6871
+ */
6872
+ approved: boolean;
6873
+ /**
6874
+ * Optional reason for approval or denial.
6875
+ */
6876
+ reason?: string;
6877
+ /**
6878
+ * Additional provider-specific options. They are passed through
6879
+ * to the provider from the AI SDK and enable provider-specific
6880
+ * functionality that can be fully encapsulated in the provider.
6881
+ */
6882
+ providerOptions?: SharedV3ProviderOptions_2;
6883
+ }
6884
+
6552
6885
  /**
6553
6886
  * Tool calls that the model has generated.
6554
6887
  */
@@ -6613,6 +6946,36 @@ declare interface LanguageModelV3ToolCallPart {
6613
6946
  providerOptions?: SharedV3ProviderOptions;
6614
6947
  }
6615
6948
 
6949
+ /**
6950
+ * Tool call content part of a prompt. It contains a tool call (usually generated by the AI model).
6951
+ */
6952
+ declare interface LanguageModelV3ToolCallPart_2 {
6953
+ type: 'tool-call';
6954
+ /**
6955
+ * ID of the tool call. This ID is used to match the tool call with the tool result.
6956
+ */
6957
+ toolCallId: string;
6958
+ /**
6959
+ * Name of the tool that is being called.
6960
+ */
6961
+ toolName: string;
6962
+ /**
6963
+ * Arguments of the tool call. This is a JSON-serializable object that matches the tool's input schema.
6964
+ */
6965
+ input: unknown;
6966
+ /**
6967
+ * Whether the tool call will be executed by the provider.
6968
+ * If this flag is not set or is false, the tool call will be executed by the client.
6969
+ */
6970
+ providerExecuted?: boolean;
6971
+ /**
6972
+ * Additional provider-specific options. They are passed through
6973
+ * to the provider from the AI SDK and enable provider-specific
6974
+ * functionality that can be fully encapsulated in the provider.
6975
+ */
6976
+ providerOptions?: SharedV3ProviderOptions_2;
6977
+ }
6978
+
6616
6979
  declare type LanguageModelV3ToolChoice = {
6617
6980
  type: 'auto';
6618
6981
  } | {
@@ -6831,6 +7194,171 @@ declare type LanguageModelV3ToolResultOutput = {
6831
7194
  }>;
6832
7195
  };
6833
7196
 
7197
+ /**
7198
+ * Result of a tool call.
7199
+ */
7200
+ declare type LanguageModelV3ToolResultOutput_2 = {
7201
+ /**
7202
+ * Text tool output that should be directly sent to the API.
7203
+ */
7204
+ type: 'text';
7205
+ value: string;
7206
+ /**
7207
+ * Provider-specific options.
7208
+ */
7209
+ providerOptions?: SharedV3ProviderOptions_2;
7210
+ } | {
7211
+ type: 'json';
7212
+ value: JSONValue_3;
7213
+ /**
7214
+ * Provider-specific options.
7215
+ */
7216
+ providerOptions?: SharedV3ProviderOptions_2;
7217
+ } | {
7218
+ /**
7219
+ * Type when the user has denied the execution of the tool call.
7220
+ */
7221
+ type: 'execution-denied';
7222
+ /**
7223
+ * Optional reason for the execution denial.
7224
+ */
7225
+ reason?: string;
7226
+ /**
7227
+ * Provider-specific options.
7228
+ */
7229
+ providerOptions?: SharedV3ProviderOptions_2;
7230
+ } | {
7231
+ type: 'error-text';
7232
+ value: string;
7233
+ /**
7234
+ * Provider-specific options.
7235
+ */
7236
+ providerOptions?: SharedV3ProviderOptions_2;
7237
+ } | {
7238
+ type: 'error-json';
7239
+ value: JSONValue_3;
7240
+ /**
7241
+ * Provider-specific options.
7242
+ */
7243
+ providerOptions?: SharedV3ProviderOptions_2;
7244
+ } | {
7245
+ type: 'content';
7246
+ value: Array<{
7247
+ type: 'text';
7248
+ /**
7249
+ * Text content.
7250
+ */
7251
+ text: string;
7252
+ /**
7253
+ * Provider-specific options.
7254
+ */
7255
+ providerOptions?: SharedV3ProviderOptions_2;
7256
+ } | {
7257
+ type: 'file-data';
7258
+ /**
7259
+ * Base-64 encoded media data.
7260
+ */
7261
+ data: string;
7262
+ /**
7263
+ * IANA media type.
7264
+ * @see https://www.iana.org/assignments/media-types/media-types.xhtml
7265
+ */
7266
+ mediaType: string;
7267
+ /**
7268
+ * Optional filename of the file.
7269
+ */
7270
+ filename?: string;
7271
+ /**
7272
+ * Provider-specific options.
7273
+ */
7274
+ providerOptions?: SharedV3ProviderOptions_2;
7275
+ } | {
7276
+ type: 'file-url';
7277
+ /**
7278
+ * URL of the file.
7279
+ */
7280
+ url: string;
7281
+ /**
7282
+ * Provider-specific options.
7283
+ */
7284
+ providerOptions?: SharedV3ProviderOptions_2;
7285
+ } | {
7286
+ type: 'file-id';
7287
+ /**
7288
+ * ID of the file.
7289
+ *
7290
+ * If you use multiple providers, you need to
7291
+ * specify the provider specific ids using
7292
+ * the Record option. The key is the provider
7293
+ * name, e.g. 'openai' or 'anthropic'.
7294
+ */
7295
+ fileId: string | Record<string, string>;
7296
+ /**
7297
+ * Provider-specific options.
7298
+ */
7299
+ providerOptions?: SharedV3ProviderOptions_2;
7300
+ } | {
7301
+ /**
7302
+ * Images that are referenced using base64 encoded data.
7303
+ */
7304
+ type: 'image-data';
7305
+ /**
7306
+ * Base-64 encoded image data.
7307
+ */
7308
+ data: string;
7309
+ /**
7310
+ * IANA media type.
7311
+ * @see https://www.iana.org/assignments/media-types/media-types.xhtml
7312
+ */
7313
+ mediaType: string;
7314
+ /**
7315
+ * Provider-specific options.
7316
+ */
7317
+ providerOptions?: SharedV3ProviderOptions_2;
7318
+ } | {
7319
+ /**
7320
+ * Images that are referenced using a URL.
7321
+ */
7322
+ type: 'image-url';
7323
+ /**
7324
+ * URL of the image.
7325
+ */
7326
+ url: string;
7327
+ /**
7328
+ * Provider-specific options.
7329
+ */
7330
+ providerOptions?: SharedV3ProviderOptions_2;
7331
+ } | {
7332
+ /**
7333
+ * Images that are referenced using a provider file id.
7334
+ */
7335
+ type: 'image-file-id';
7336
+ /**
7337
+ * Image that is referenced using a provider file id.
7338
+ *
7339
+ * If you use multiple providers, you need to
7340
+ * specify the provider specific ids using
7341
+ * the Record option. The key is the provider
7342
+ * name, e.g. 'openai' or 'anthropic'.
7343
+ */
7344
+ fileId: string | Record<string, string>;
7345
+ /**
7346
+ * Provider-specific options.
7347
+ */
7348
+ providerOptions?: SharedV3ProviderOptions_2;
7349
+ } | {
7350
+ /**
7351
+ * Custom content part. This can be used to implement
7352
+ * provider-specific content parts.
7353
+ */
7354
+ type: 'custom';
7355
+ /**
7356
+ * Provider-specific options.
7357
+ */
7358
+ providerOptions?: SharedV3ProviderOptions_2;
7359
+ }>;
7360
+ };
7361
+
6834
7362
  /**
6835
7363
  * Tool result content part of a prompt. It contains the result of the tool call with the matching ID.
6836
7364
  */
@@ -6856,6 +7384,31 @@ declare interface LanguageModelV3ToolResultPart {
6856
7384
  providerOptions?: SharedV3ProviderOptions;
6857
7385
  }
6858
7386
 
7387
+ /**
7388
+ * Tool result content part of a prompt. It contains the result of the tool call with the matching ID.
7389
+ */
7390
+ declare interface LanguageModelV3ToolResultPart_2 {
7391
+ type: 'tool-result';
7392
+ /**
7393
+ * ID of the tool call that this result is associated with.
7394
+ */
7395
+ toolCallId: string;
7396
+ /**
7397
+ * Name of the tool that generated this result.
7398
+ */
7399
+ toolName: string;
7400
+ /**
7401
+ * Result of the tool call.
7402
+ */
7403
+ output: LanguageModelV3ToolResultOutput_2;
7404
+ /**
7405
+ * Additional provider-specific options. They are passed through
7406
+ * to the provider from the AI SDK and enable provider-specific
7407
+ * functionality that can be fully encapsulated in the provider.
7408
+ */
7409
+ providerOptions?: SharedV3ProviderOptions_2;
7410
+ }
7411
+
6859
7412
  /**
6860
7413
  * Usage information for a language model call.
6861
7414
  */
@@ -7072,7 +7625,7 @@ export declare class MessageConversionError extends AISDKError {
7072
7625
  }
7073
7626
 
7074
7627
  export declare class MissingToolResultsError extends AISDKError {
7075
- private readonly [symbol$d_2];
7628
+ private readonly [symbol$d_3];
7076
7629
  readonly toolCallIds: string[];
7077
7630
  constructor({ toolCallIds }: {
7078
7631
  toolCallIds: string[];
@@ -7108,7 +7661,7 @@ export declare class NoContentGeneratedError extends AISDKError {
7108
7661
  * - The model generated a response that could not be parsed.
7109
7662
  */
7110
7663
  export declare class NoImageGeneratedError extends AISDKError {
7111
- private readonly [symbol$c_2];
7664
+ private readonly [symbol$c_3];
7112
7665
  /**
7113
7666
  * The response metadata for each call.
7114
7667
  */
@@ -7246,7 +7799,7 @@ export declare class NoTranscriptGeneratedError extends AISDKError {
7246
7799
  }
7247
7800
 
7248
7801
  export declare class NoVideoGeneratedError extends AISDKError {
7249
- private readonly [symbol$7_2];
7802
+ private readonly [symbol$7_3];
7250
7803
  readonly responses: Array<VideoModelResponseMetadata>;
7251
7804
  constructor({ message, cause, responses, }: {
7252
7805
  message?: string;
@@ -7716,7 +8269,7 @@ declare const parallelSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFact
7716
8269
  declare function parseJSON(options: {
7717
8270
  text: string;
7718
8271
  schema?: undefined;
7719
- }): Promise<JSONValue_2>;
8272
+ }): Promise<JSONValue_3>;
7720
8273
 
7721
8274
  /**
7722
8275
  * Parses a JSON string into a strongly-typed object using the provided schema.
@@ -7756,7 +8309,7 @@ declare type ParseResult<T> = {
7756
8309
  rawValue: unknown;
7757
8310
  } | {
7758
8311
  success: false;
7759
- error: JSONParseError | TypeValidationError;
8312
+ error: JSONParseError_2 | TypeValidationError_2;
7760
8313
  rawValue: unknown;
7761
8314
  };
7762
8315
 
@@ -7972,7 +8525,7 @@ declare const postFormDataToApi: <T>({ url, headers, formData, failedResponseHan
7972
8525
  url: string;
7973
8526
  headers?: Record<string, string | undefined>;
7974
8527
  formData: FormData;
7975
- failedResponseHandler: ResponseHandler<APICallError>;
8528
+ failedResponseHandler: ResponseHandler<APICallError_2>;
7976
8529
  successfulResponseHandler: ResponseHandler<T>;
7977
8530
  abortSignal?: AbortSignal;
7978
8531
  fetch?: FetchFunction;
@@ -7986,7 +8539,7 @@ declare const postJsonToApi: <T>({ url, headers, body, failedResponseHandler, su
7986
8539
  url: string;
7987
8540
  headers?: Record<string, string | undefined>;
7988
8541
  body: unknown;
7989
- failedResponseHandler: ResponseHandler<APICallError>;
8542
+ failedResponseHandler: ResponseHandler<APICallError_2>;
7990
8543
  successfulResponseHandler: ResponseHandler<T>;
7991
8544
  abortSignal?: AbortSignal;
7992
8545
  fetch?: FetchFunction;
@@ -8246,7 +8799,7 @@ export declare type ProviderMetadata = SharedV3ProviderMetadata;
8246
8799
  * They are passed through to the provider from the AI SDK and enable
8247
8800
  * provider-specific functionality that can be fully encapsulated in the provider.
8248
8801
  */
8249
- declare type ProviderOptions = SharedV3ProviderOptions;
8802
+ declare type ProviderOptions = SharedV3ProviderOptions_2;
8250
8803
 
8251
8804
  export declare interface ProviderRegistryProvider<PROVIDERS extends Record<string, ProviderV3> = Record<string, ProviderV3>, SEPARATOR extends string = ':'> {
8252
8805
  languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['languageModel']>>[0]>}` : never): LanguageModelV3;
@@ -8814,7 +9367,7 @@ declare type RetryDelayProvider = ({ error, exponentialBackoffDelay, }: {
8814
9367
  }) => number;
8815
9368
 
8816
9369
  export declare class RetryError extends AISDKError {
8817
- private readonly [symbol$1_2];
9370
+ private readonly [symbol$1_3];
8818
9371
  readonly reason: RetryErrorReason_2;
8819
9372
  readonly lastError: unknown;
8820
9373
  readonly errors: Array<unknown>;
@@ -8860,7 +9413,7 @@ declare const retryWithExponentialBackoff: ({ maxRetries, initialDelayInMs, back
8860
9413
  declare function safeParseJSON(options: {
8861
9414
  text: string;
8862
9415
  schema?: undefined;
8863
- }): Promise<ParseResult<JSONValue_2>>;
9416
+ }): Promise<ParseResult<JSONValue_3>>;
8864
9417
 
8865
9418
  /**
8866
9419
  * Safely parses a JSON string into a strongly-typed object, using a provided schema to validate the object.
@@ -8888,14 +9441,14 @@ declare function safeParseJSON<T>(options: {
8888
9441
  declare function safeValidateTypes<OBJECT>({ value, schema, context, }: {
8889
9442
  value: unknown;
8890
9443
  schema: FlexibleSchema<OBJECT>;
8891
- context?: TypeValidationContext;
9444
+ context?: TypeValidationContext_2;
8892
9445
  }): Promise<{
8893
9446
  success: true;
8894
9447
  value: OBJECT;
8895
9448
  rawValue: unknown;
8896
9449
  } | {
8897
9450
  success: false;
8898
- error: TypeValidationError;
9451
+ error: TypeValidationError_2;
8899
9452
  rawValue: unknown;
8900
9453
  }>;
8901
9454
 
@@ -9030,6 +9583,29 @@ declare type SharedV3Headers = Record<string, string>;
9030
9583
  */
9031
9584
  declare type SharedV3ProviderMetadata = Record<string, JSONObject>;
9032
9585
 
9586
+ /**
9587
+ * Additional provider-specific metadata.
9588
+ * Metadata are additional outputs from the provider.
9589
+ * They are passed through to the provider from the AI SDK
9590
+ * and enable provider-specific functionality
9591
+ * that can be fully encapsulated in the provider.
9592
+ *
9593
+ * This enables us to quickly ship provider-specific functionality
9594
+ * without affecting the core AI SDK.
9595
+ *
9596
+ * The outer record is keyed by the provider name, and the inner
9597
+ * record is keyed by the provider-specific metadata key.
9598
+ *
9599
+ * ```ts
9600
+ * {
9601
+ * "anthropic": {
9602
+ * "cacheControl": { "type": "ephemeral" }
9603
+ * }
9604
+ * }
9605
+ * ```
9606
+ */
9607
+ declare type SharedV3ProviderMetadata_2 = Record<string, JSONObject_2>;
9608
+
9033
9609
  /**
9034
9610
  * Additional provider-specific options.
9035
9611
  * Options are additional input to the provider.
@@ -9053,6 +9629,29 @@ declare type SharedV3ProviderMetadata = Record<string, JSONObject>;
9053
9629
  */
9054
9630
  declare type SharedV3ProviderOptions = Record<string, JSONObject>;
9055
9631
 
9632
+ /**
9633
+ * Additional provider-specific options.
9634
+ * Options are additional input to the provider.
9635
+ * They are passed through to the provider from the AI SDK
9636
+ * and enable provider-specific functionality
9637
+ * that can be fully encapsulated in the provider.
9638
+ *
9639
+ * This enables us to quickly ship provider-specific functionality
9640
+ * without affecting the core AI SDK.
9641
+ *
9642
+ * The outer record is keyed by the provider name, and the inner
9643
+ * record is keyed by the provider-specific metadata key.
9644
+ *
9645
+ * ```ts
9646
+ * {
9647
+ * "anthropic": {
9648
+ * "cacheControl": { "type": "ephemeral" }
9649
+ * }
9650
+ * }
9651
+ * ```
9652
+ */
9653
+ declare type SharedV3ProviderOptions_2 = Record<string, JSONObject_2>;
9654
+
9056
9655
  /**
9057
9656
  * Warning from the model.
9058
9657
  *
@@ -10951,6 +11550,8 @@ declare const symbol$1: unique symbol;
10951
11550
 
10952
11551
  declare const symbol$1_2: unique symbol;
10953
11552
 
11553
+ declare const symbol$1_3: unique symbol;
11554
+
10954
11555
  declare const symbol$2: unique symbol;
10955
11556
 
10956
11557
  declare const symbol$2_2: unique symbol;
@@ -10975,6 +11576,8 @@ declare const symbol$7: unique symbol;
10975
11576
 
10976
11577
  declare const symbol$7_2: unique symbol;
10977
11578
 
11579
+ declare const symbol$7_3: unique symbol;
11580
+
10978
11581
  declare const symbol$8: unique symbol;
10979
11582
 
10980
11583
  declare const symbol$8_2: unique symbol;
@@ -10993,10 +11596,14 @@ declare const symbol$c: unique symbol;
10993
11596
 
10994
11597
  declare const symbol$c_2: unique symbol;
10995
11598
 
11599
+ declare const symbol$c_3: unique symbol;
11600
+
10996
11601
  declare const symbol$d: unique symbol;
10997
11602
 
10998
11603
  declare const symbol$d_2: unique symbol;
10999
11604
 
11605
+ declare const symbol$d_3: unique symbol;
11606
+
11000
11607
  declare const symbol$e: unique symbol;
11001
11608
 
11002
11609
  declare const symbol$f: unique symbol;
@@ -11249,7 +11856,7 @@ export declare type TimeoutConfiguration = number | {
11249
11856
  *
11250
11857
  * The tool can also contain an optional execute function for the actual execution function of the tool.
11251
11858
  */
11252
- export declare type Tool<INPUT extends JSONValue_2 | unknown | never = any, OUTPUT extends JSONValue_2 | unknown | never = any> = {
11859
+ export declare type Tool<INPUT extends JSONValue_3 | unknown | never = any, OUTPUT extends JSONValue_3 | unknown | never = any> = {
11253
11860
  /**
11254
11861
  * An optional description of what the tool does.
11255
11862
  * Will be used by the language model to decide whether to use the tool.
@@ -11275,7 +11882,7 @@ export declare type Tool<INPUT extends JSONValue_2 | unknown | never = any, OUTP
11275
11882
  * and UI message parts. This is useful for sources of dynamic tools (e.g.
11276
11883
  * an MCP server) to identify themselves.
11277
11884
  */
11278
- metadata?: JSONObject;
11885
+ metadata?: JSONObject_2;
11279
11886
  /**
11280
11887
  * The schema of the input that the tool expects.
11281
11888
  * The language model will use this to generate the input.
@@ -11896,7 +12503,7 @@ declare type ToolResultOutput = {
11896
12503
  providerOptions?: ProviderOptions;
11897
12504
  } | {
11898
12505
  type: 'json';
11899
- value: JSONValue_2;
12506
+ value: JSONValue_3;
11900
12507
  /**
11901
12508
  * Provider-specific options.
11902
12509
  */
@@ -11923,7 +12530,7 @@ declare type ToolResultOutput = {
11923
12530
  providerOptions?: ProviderOptions;
11924
12531
  } | {
11925
12532
  type: 'error-json';
11926
- value: JSONValue_2;
12533
+ value: JSONValue_3;
11927
12534
  /**
11928
12535
  * Provider-specific options.
11929
12536
  */
@@ -12551,6 +13158,21 @@ declare interface TypeValidationContext {
12551
13158
  entityId?: string;
12552
13159
  }
12553
13160
 
13161
+ declare interface TypeValidationContext_2 {
13162
+ /**
13163
+ * Field path in dot notation (e.g., "message.metadata", "message.parts[3].data")
13164
+ */
13165
+ field?: string;
13166
+ /**
13167
+ * Entity name (e.g., tool name, data type name)
13168
+ */
13169
+ entityName?: string;
13170
+ /**
13171
+ * Entity identifier (e.g., message ID, tool call ID)
13172
+ */
13173
+ entityId?: string;
13174
+ }
13175
+
12554
13176
  export declare class TypeValidationError extends AISDKError {
12555
13177
  private readonly [symbol$1];
12556
13178
  readonly value: unknown;
@@ -12579,6 +13201,34 @@ export declare class TypeValidationError extends AISDKError {
12579
13201
  }): TypeValidationError;
12580
13202
  }
12581
13203
 
13204
+ declare class TypeValidationError_2 extends AISDKError_2 {
13205
+ private readonly [symbol$1_2];
13206
+ readonly value: unknown;
13207
+ readonly context?: TypeValidationContext_2;
13208
+ constructor({ value, cause, context, }: {
13209
+ value: unknown;
13210
+ cause: unknown;
13211
+ context?: TypeValidationContext_2;
13212
+ });
13213
+ static isInstance(error: unknown): error is TypeValidationError_2;
13214
+ /**
13215
+ * Wraps an error into a TypeValidationError.
13216
+ * If the cause is already a TypeValidationError with the same value and context, it returns the cause.
13217
+ * Otherwise, it creates a new TypeValidationError.
13218
+ *
13219
+ * @param {Object} params - The parameters for wrapping the error.
13220
+ * @param {unknown} params.value - The value that failed validation.
13221
+ * @param {unknown} params.cause - The original error or cause of the validation failure.
13222
+ * @param {TypeValidationContext} params.context - Optional context about what is being validated.
13223
+ * @returns {TypeValidationError} A TypeValidationError instance.
13224
+ */
13225
+ static wrap({ value, cause, context, }: {
13226
+ value: unknown;
13227
+ cause: unknown;
13228
+ context?: TypeValidationContext_2;
13229
+ }): TypeValidationError_2;
13230
+ }
13231
+
12582
13232
  export declare const UI_MESSAGE_STREAM_HEADERS: {
12583
13233
  'content-type': string;
12584
13234
  'cache-control': string;
@@ -13131,9 +13781,8 @@ export declare const userModelMessageSchema: z.ZodType<UserModelMessage>;
13131
13781
  * Validates that a URL is safe to download from, blocking private/internal addresses
13132
13782
  * to prevent SSRF attacks.
13133
13783
  *
13134
- * Note: this performs string/literal-IP checks only. It does not resolve DNS, so a
13135
- * hostname that resolves to a private address is not blocked here (see callers, which
13136
- * should additionally constrain egress at the network layer when handling untrusted URLs).
13784
+ * Note: this function performs string/literal-IP checks only. The Node.js
13785
+ * download fetch additionally validates and pins DNS results at connect time.
13137
13786
  *
13138
13787
  * @param url - The URL string to validate.
13139
13788
  * @throws DownloadError if the URL is unsafe.
@@ -13153,7 +13802,7 @@ declare function validateDownloadUrl(url: string): void;
13153
13802
  declare function validateTypes<OBJECT>({ value, schema, context, }: {
13154
13803
  value: unknown;
13155
13804
  schema: FlexibleSchema<OBJECT>;
13156
- context?: TypeValidationContext;
13805
+ context?: TypeValidationContext_2;
13157
13806
  }): Promise<OBJECT>;
13158
13807
 
13159
13808
  /**
@@ -13625,5 +14274,5 @@ export declare function zodSchema<OBJECT>(zodSchema: z4.core.$ZodType<OBJECT, an
13625
14274
  }): Schema<OBJECT>;
13626
14275
 
13627
14276
  export { }
13628
- export { GatewayProviderSettings as GatewayProviderSettings, GatewayProvider as GatewayProvider, LazySchema as LazySchema, ZodSchema as ZodSchema, StandardSchema as StandardSchema, ValidationResult as ValidationResult, ParseResult as ParseResult, ProviderOptions as ProviderOptions, ReasoningPart as ReasoningPart, ToolOutputProperties as ToolOutputProperties, ToolResultOutput as ToolResultOutput, ToolNeedsApprovalFunction as ToolNeedsApprovalFunction, TypeValidationContext as TypeValidationContext, EmbeddingModelV2 as EmbeddingModelV2, EmbeddingModelV3Embedding as EmbeddingModelV3Embedding, EmbeddingModelV3Middleware as EmbeddingModelV3Middleware, ImageModelV2 as ImageModelV2, ImageModelV3ProviderMetadata as ImageModelV3ProviderMetadata, ImageModelV2ProviderMetadata as ImageModelV2ProviderMetadata, ImageModelV3Middleware as ImageModelV3Middleware, GlobalProviderModelId as GlobalProviderModelId, LanguageModelV2 as LanguageModelV2, SharedV3Warning as SharedV3Warning, LanguageModelV3Middleware as LanguageModelV3Middleware, SharedV3ProviderMetadata as SharedV3ProviderMetadata, SpeechModelV2 as SpeechModelV2, TranscriptionModelV2 as TranscriptionModelV2, ImageModelV3Usage as ImageModelV3Usage, DeepPartialInternal as DeepPartialInternal, AttributeValue as AttributeValue, Tracer as Tracer, BaseToolCall as BaseToolCall, Source as Source, PrepareStepCallSettings as PrepareStepCallSettings, ResponseMessage as ResponseMessage, LanguageModelV3ToolCall as LanguageModelV3ToolCall, GenerateTextIncludeSettings as GenerateTextIncludeSettings, ValueOf as ValueOf, asUITool as asUITool, _ai_sdk_provider_utils as _ai_sdk_provider_utils, DataUIMessageChunk as DataUIMessageChunk, InferElementOutput as InferElementOutput, ConsumeStreamOptions as ConsumeStreamOptions, StreamTextIncludeSettings as StreamTextIncludeSettings, StreamTextOnAbortCallback as StreamTextOnAbortCallback, CallbackModelInfo as CallbackModelInfo, LanguageModelV3ToolChoice as LanguageModelV3ToolChoice, Listener as Listener, MaybePromiseLike as MaybePromiseLike, Output_2 as Output_2, InferAgentTools as InferAgentTools, UIMessageStreamResponseInit as UIMessageStreamResponseInit, getOriginalFetch as getOriginalFetch, InferUIMessageTools as InferUIMessageTools, InferUIMessageToolCall as InferUIMessageToolCall, UIDataTypesToSchemas as UIDataTypesToSchemas, InferUIMessageData as InferUIMessageData, InferUIMessageMetadata as InferUIMessageMetadata, Resolvable as Resolvable, FetchFunction as FetchFunction, SingleRequestTextStreamPart as SingleRequestTextStreamPart, RetryErrorReason_2 as RetryErrorReason_2, GenerateImagePrompt as GenerateImagePrompt, JSONValue_2 as JSONValue_2, Job as Job, StreamObjectOnErrorCallback as StreamObjectOnErrorCallback, VideoModelResponseMetadata as VideoModelResponseMetadata, VideoModelProviderMetadata as VideoModelProviderMetadata, VideoModel as VideoModel, VideoModelV3FrameType as VideoModelV3FrameType, EmbeddingModelV3CallOptions as EmbeddingModelV3CallOptions, LanguageModelV3CallOptions as LanguageModelV3CallOptions, JSONObject as JSONObject, LanguageModelV3 as LanguageModelV3, EmbeddingModelV3 as EmbeddingModelV3, ImageModelV3 as ImageModelV3, TranscriptionModelV3 as TranscriptionModelV3, SpeechModelV3 as SpeechModelV3, RerankingModelV3 as RerankingModelV3, VideoModelV3 as VideoModelV3, ProviderV2 as ProviderV2, ExtractModelId as ExtractModelId, ExtractLiteralUnion as ExtractLiteralUnion, ProviderV3 as ProviderV3 };
13629
- export { schemaSymbol, symbol$1, symbol$1_2, symbol$2, symbol$2_2, symbol$3, symbol$3_2, symbol$4, symbol$4_2, symbol$5, symbol$5_2, symbol$6, symbol$6_2, symbol$7, symbol$7_2, symbol$8, symbol$8_2, symbol$9, symbol$9_2, symbol$a, symbol$b, symbol$b_2, symbol$c, symbol$c_2, symbol$d, symbol$d_2, symbol$e, symbol$f, symbol$g, symbol$h, symbol$i, symbol$j, symbol$k, symbol, symbol_2, symbol_3 };
14277
+ export { GatewayProviderSettings as GatewayProviderSettings, GatewayProvider as GatewayProvider, AISDKError_2 as AISDKError_2, LazySchema as LazySchema, ZodSchema as ZodSchema, StandardSchema as StandardSchema, ValidationResult as ValidationResult, ParseResult as ParseResult, ProviderOptions as ProviderOptions, ReasoningPart as ReasoningPart, JSONValue_3 as JSONValue_3, ToolOutputProperties as ToolOutputProperties, JSONObject_2 as JSONObject_2, ToolResultOutput as ToolResultOutput, ToolNeedsApprovalFunction as ToolNeedsApprovalFunction, TypeValidationContext as TypeValidationContext, EmbeddingModelV2 as EmbeddingModelV2, EmbeddingModelV3Embedding as EmbeddingModelV3Embedding, EmbeddingModelV3Middleware as EmbeddingModelV3Middleware, ImageModelV2 as ImageModelV2, ImageModelV3ProviderMetadata as ImageModelV3ProviderMetadata, ImageModelV2ProviderMetadata as ImageModelV2ProviderMetadata, ImageModelV3Middleware as ImageModelV3Middleware, GlobalProviderModelId as GlobalProviderModelId, LanguageModelV2 as LanguageModelV2, SharedV3Warning as SharedV3Warning, LanguageModelV3Middleware as LanguageModelV3Middleware, SharedV3ProviderMetadata as SharedV3ProviderMetadata, SpeechModelV2 as SpeechModelV2, TranscriptionModelV2 as TranscriptionModelV2, ImageModelV3Usage as ImageModelV3Usage, DeepPartialInternal as DeepPartialInternal, AttributeValue as AttributeValue, Tracer as Tracer, BaseToolCall as BaseToolCall, Source as Source, PrepareStepCallSettings as PrepareStepCallSettings, ResponseMessage as ResponseMessage, LanguageModelV3ToolCall as LanguageModelV3ToolCall, GenerateTextIncludeSettings as GenerateTextIncludeSettings, ValueOf as ValueOf, asUITool as asUITool, _ai_sdk_provider_utils as _ai_sdk_provider_utils, DataUIMessageChunk as DataUIMessageChunk, InferElementOutput as InferElementOutput, ConsumeStreamOptions as ConsumeStreamOptions, StreamTextIncludeSettings as StreamTextIncludeSettings, StreamTextOnAbortCallback as StreamTextOnAbortCallback, CallbackModelInfo as CallbackModelInfo, LanguageModelV3ToolChoice as LanguageModelV3ToolChoice, Listener as Listener, MaybePromiseLike as MaybePromiseLike, Output_2 as Output_2, InferAgentTools as InferAgentTools, UIMessageStreamResponseInit as UIMessageStreamResponseInit, getOriginalFetch as getOriginalFetch, InferUIMessageTools as InferUIMessageTools, InferUIMessageToolCall as InferUIMessageToolCall, UIDataTypesToSchemas as UIDataTypesToSchemas, InferUIMessageData as InferUIMessageData, InferUIMessageMetadata as InferUIMessageMetadata, Resolvable as Resolvable, FetchFunction as FetchFunction, SingleRequestTextStreamPart as SingleRequestTextStreamPart, RetryErrorReason_2 as RetryErrorReason_2, GenerateImagePrompt as GenerateImagePrompt, JSONValue_2 as JSONValue_2, Job as Job, StreamObjectOnErrorCallback as StreamObjectOnErrorCallback, VideoModelResponseMetadata as VideoModelResponseMetadata, VideoModelProviderMetadata as VideoModelProviderMetadata, VideoModel as VideoModel, VideoModelV3FrameType as VideoModelV3FrameType, EmbeddingModelV3CallOptions as EmbeddingModelV3CallOptions, LanguageModelV3CallOptions as LanguageModelV3CallOptions, JSONObject as JSONObject, LanguageModelV3 as LanguageModelV3, EmbeddingModelV3 as EmbeddingModelV3, ImageModelV3 as ImageModelV3, TranscriptionModelV3 as TranscriptionModelV3, SpeechModelV3 as SpeechModelV3, RerankingModelV3 as RerankingModelV3, VideoModelV3 as VideoModelV3, ProviderV2 as ProviderV2, ExtractModelId as ExtractModelId, ExtractLiteralUnion as ExtractLiteralUnion, ProviderV3 as ProviderV3 };
14278
+ export { EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL, schemaSymbol, symbol$1, symbol$1_2, symbol$1_3, symbol$2, symbol$2_2, symbol$3, symbol$3_2, symbol$4, symbol$4_2, symbol$5, symbol$5_2, symbol$6, symbol$6_2, symbol$7, symbol$7_2, symbol$7_3, symbol$8, symbol$8_2, symbol$9, symbol$9_2, symbol$a, symbol$b, symbol$b_2, symbol$c, symbol$c_2, symbol$c_3, symbol$d, symbol$d_2, symbol$d_3, symbol$e, symbol$f, symbol$g, symbol$h, symbol$i, symbol$j, symbol$k, symbol, symbol_2, symbol_3 };