ai 5.0.0-canary.16 → 5.0.0-canary.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ToolCall, ToolResult, FetchFunction, Schema, IDGenerator } from '@ai-sdk/provider-utils';
2
2
  export { IDGenerator, Schema, ToolCall, ToolResult, asSchema, createIdGenerator, generateId, jsonSchema } from '@ai-sdk/provider-utils';
3
3
  import * as _ai_sdk_provider from '@ai-sdk/provider';
4
- import { EmbeddingModelV2, EmbeddingModelV2Embedding, ImageModelV2, ImageModelV2CallWarning, JSONValue as JSONValue$1, LanguageModelV2, LanguageModelV2FinishReason, LanguageModelV2CallWarning, LanguageModelV2Source, SharedV2ProviderMetadata, SharedV2ProviderOptions, SpeechModelV1, SpeechModelV1CallWarning, TranscriptionModelV1, TranscriptionModelV1CallWarning, JSONObject, LanguageModelV2CallOptions, AISDKError, LanguageModelV2ToolCall, JSONSchema7, JSONParseError, TypeValidationError, LanguageModelV2Middleware, ProviderV2, NoSuchModelError } from '@ai-sdk/provider';
4
+ import { EmbeddingModelV2, EmbeddingModelV2Embedding, ImageModelV2, ImageModelV2CallWarning, ImageModelV2ProviderMetadata, JSONValue as JSONValue$1, LanguageModelV2, LanguageModelV2FinishReason, LanguageModelV2CallWarning, LanguageModelV2Source, SharedV2ProviderMetadata, SharedV2ProviderOptions, SpeechModelV1, SpeechModelV1CallWarning, TranscriptionModelV1, TranscriptionModelV1CallWarning, JSONObject, LanguageModelV2CallOptions, AISDKError, LanguageModelV2ToolCall, JSONSchema7, JSONParseError, TypeValidationError, LanguageModelV2Middleware, ProviderV2, NoSuchModelError } from '@ai-sdk/provider';
5
5
  export { AISDKError, APICallError, EmptyResponseBodyError, InvalidPromptError, InvalidResponseDataError, JSONParseError, JSONSchema7, LoadAPIKeyError, NoContentGeneratedError, NoSuchModelError, TypeValidationError, UnsupportedFunctionalityError } from '@ai-sdk/provider';
6
6
  import { ServerResponse } from 'node:http';
7
7
  import { AttributeValue, Tracer } from '@opentelemetry/api';
@@ -26,6 +26,10 @@ Warning from the model provider for this call. The call will proceed, but e.g.
26
26
  some settings might not be supported, which can lead to suboptimal results.
27
27
  */
28
28
  type ImageGenerationWarning = ImageModelV2CallWarning;
29
+ /**
30
+ Metadata from the model provider for this call
31
+ */
32
+ type ImageModelProviderMetadata = ImageModelV2ProviderMetadata;
29
33
 
30
34
  type ImageModelResponseMetadata = {
31
35
  /**
@@ -252,24 +256,6 @@ type ToolInvocation = ({
252
256
  state: 'result';
253
257
  step?: number;
254
258
  } & ToolResult<string, any, any>);
255
- /**
256
- * An attachment that can be sent along with a message.
257
- */
258
- interface Attachment {
259
- /**
260
- * The name of the attachment, usually the file name.
261
- */
262
- name?: string;
263
- /**
264
- * A string indicating the [media type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type).
265
- * By default, it's extracted from the pathname's extension.
266
- */
267
- contentType?: string;
268
- /**
269
- * The URL of the attachment. It can either be a URL to a hosted file or a [Data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs).
270
- */
271
- url: string;
272
- }
273
259
  /**
274
260
  * AI SDK UI Messages. They are used in the client and to communicate between the frontend and the API routes.
275
261
  */
@@ -287,10 +273,6 @@ interface UIMessage {
287
273
  */
288
274
  content: string;
289
275
  /**
290
- Additional attachments to be sent along with the message.
291
- */
292
- experimental_attachments?: Attachment[];
293
- /**
294
276
  The role of the message.
295
277
  */
296
278
  role: 'system' | 'user' | 'assistant';
@@ -301,8 +283,12 @@ interface UIMessage {
301
283
  /**
302
284
  The parts of the message. Use this for rendering the message in the UI.
303
285
 
304
- Assistant messages can have text, reasoning and tool invocation parts.
305
- User messages can have text parts.
286
+ System messages should be avoided (set the system prompt on the server instead).
287
+ They can have text parts.
288
+
289
+ User messages can have text parts and file parts.
290
+
291
+ Assistant messages can have text, reasoning, tool invocation, and file parts.
306
292
  */
307
293
  parts: Array<UIMessagePart>;
308
294
  }
@@ -363,9 +349,14 @@ type FileUIPart = {
363
349
  */
364
350
  mediaType: string;
365
351
  /**
366
- * The base64 encoded data.
352
+ * Optional filename of the file.
367
353
  */
368
- data: string;
354
+ filename?: string;
355
+ /**
356
+ * The URL of the file.
357
+ * It can either be a URL to a hosted file or a [Data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs).
358
+ */
359
+ url: string;
369
360
  };
370
361
  /**
371
362
  * A step boundary part of a message.
@@ -417,10 +408,6 @@ type ChatRequestOptions = {
417
408
  Additional data to be sent to the API endpoint.
418
409
  */
419
410
  data?: JSONValue$1;
420
- /**
421
- * Additional files to be sent to the server.
422
- */
423
- experimental_attachments?: FileList | Array<Attachment>;
424
411
  /**
425
412
  * Allow submitting an empty message. Defaults to `false`.
426
413
  */
@@ -619,7 +606,7 @@ type EmbeddingModelUsage = {
619
606
  };
620
607
 
621
608
  declare const getOriginalFetch$1: () => typeof fetch;
622
- declare function callChatApi({ api, body, streamProtocol, credentials, headers, abortController, restoreMessagesOnFailure, onResponse, onUpdate, onFinish, onToolCall, generateId, fetch, lastMessage, }: {
609
+ declare function callChatApi({ api, body, streamProtocol, credentials, headers, abortController, restoreMessagesOnFailure, onResponse, onUpdate, onFinish, onToolCall, generateId, fetch, lastMessage, getCurrentDate, requestType, }: {
623
610
  api: string;
624
611
  body: Record<string, any>;
625
612
  streamProtocol: 'data' | 'text' | undefined;
@@ -638,6 +625,8 @@ declare function callChatApi({ api, body, streamProtocol, credentials, headers,
638
625
  generateId: IdGenerator;
639
626
  fetch: ReturnType<typeof getOriginalFetch$1> | undefined;
640
627
  lastMessage: UIMessage | undefined;
628
+ getCurrentDate: () => Date;
629
+ requestType?: 'generate' | 'resume';
641
630
  }): Promise<void>;
642
631
 
643
632
  declare const getOriginalFetch: () => typeof fetch;
@@ -659,6 +648,8 @@ declare function callCompletionApi({ api, prompt, credentials, headers, body, st
659
648
  fetch: ReturnType<typeof getOriginalFetch> | undefined;
660
649
  }): Promise<string | null | undefined>;
661
650
 
651
+ declare function convertFileListToFileUIParts(files: FileList | undefined): Promise<Array<FileUIPart>>;
652
+
662
653
  type DataStreamString = `${(typeof DataStreamStringPrefixes)[keyof typeof DataStreamStringPrefixes]}:${string}\n`;
663
654
  interface DataStreamPart<CODE extends string, NAME extends string, TYPE> {
664
655
  code: CODE;
@@ -693,8 +684,8 @@ declare const dataStreamParts: readonly [DataStreamPart<"0", "text", string>, Da
693
684
  text: string;
694
685
  providerMetadata?: Record<string, any> | undefined;
695
686
  }>, DataStreamPart<"h", "source", LanguageModelV2Source>, DataStreamPart<"l", "reasoning_part_finish", {}>, DataStreamPart<"k", "file", {
696
- data: string;
697
- mimeType: string;
687
+ url: string;
688
+ mediaType: string;
698
689
  }>];
699
690
  type DataStreamParts = (typeof dataStreamParts)[number];
700
691
  /**
@@ -736,7 +727,7 @@ Parses a stream part from a string.
736
727
  */
737
728
  declare const parseDataStreamPart: (line: string) => DataStreamPartType;
738
729
  /**
739
- Prepends a string with a prefix from the `StreamChunkPrefixes`, JSON-ifies it,
730
+ Prepends a string with a prefix from the `StreamChunkPrefixes`, converts it to JSON,
740
731
  and appends a new line.
741
732
 
742
733
  It ensures type-safety for the part type and value.
@@ -781,8 +772,6 @@ declare function parsePartialJson(jsonText: string | undefined): Promise<{
781
772
  state: 'undefined-input' | 'successful-parse' | 'repaired-parse' | 'failed-parse';
782
773
  }>;
783
774
 
784
- declare function prepareAttachmentsForRequest(attachmentsFromOptions: FileList | Array<Attachment> | undefined): Promise<Attachment[]>;
785
-
786
775
  declare function processDataStream({ stream, onTextPart, onReasoningPart, onReasoningPartFinish, onSourcePart, onFilePart, onDataPart, onErrorPart, onToolCallStreamingStartPart, onToolCallDeltaPart, onToolCallPart, onToolResultPart, onMessageAnnotationsPart, onFinishMessagePart, onFinishStepPart, onStartStepPart, }: {
787
776
  stream: ReadableStream<Uint8Array>;
788
777
  onTextPart?: (streamPart: (DataStreamPartType & {
@@ -837,21 +826,6 @@ declare function processTextStream({ stream, onTextPart, }: {
837
826
  onTextPart: (chunk: string) => Promise<void> | void;
838
827
  }): Promise<void>;
839
828
 
840
- /**
841
- * Updates the result of a specific tool invocation in the last message of the given messages array.
842
- *
843
- * @param {object} params - The parameters object.
844
- * @param {UIMessage[]} params.messages - An array of messages, from which the last one is updated.
845
- * @param {string} params.toolCallId - The unique identifier for the tool invocation to update.
846
- * @param {unknown} params.toolResult - The result object to attach to the tool invocation.
847
- * @returns {void} This function does not return anything.
848
- */
849
- declare function updateToolCallResult({ messages, toolCallId, toolResult: result, }: {
850
- messages: UIMessage[];
851
- toolCallId: string;
852
- toolResult: unknown;
853
- }): void;
854
-
855
829
  declare function shouldResubmitMessages({ originalMaxToolInvocationStep, originalMessageCount, maxSteps, messages, }: {
856
830
  originalMaxToolInvocationStep: number | undefined;
857
831
  originalMessageCount: number;
@@ -867,6 +841,21 @@ declare function isAssistantMessageWithCompletedToolCalls(message: UIMessage): m
867
841
  role: 'assistant';
868
842
  };
869
843
 
844
+ /**
845
+ * Updates the result of a specific tool invocation in the last message of the given messages array.
846
+ *
847
+ * @param {object} params - The parameters object.
848
+ * @param {UIMessage[]} params.messages - An array of messages, from which the last one is updated.
849
+ * @param {string} params.toolCallId - The unique identifier for the tool invocation to update.
850
+ * @param {unknown} params.toolResult - The result object to attach to the tool invocation.
851
+ * @returns {void} This function does not return anything.
852
+ */
853
+ declare function updateToolCallResult({ messages, toolCallId, toolResult: result, }: {
854
+ messages: UIMessage[];
855
+ toolCallId: string;
856
+ toolResult: unknown;
857
+ }): void;
858
+
870
859
  interface DataStreamWriter {
871
860
  /**
872
861
  * Appends a data part to the stream.
@@ -1239,10 +1228,6 @@ interface ImagePart {
1239
1228
  */
1240
1229
  mediaType?: string;
1241
1230
  /**
1242
- @deprecated Use `mediaType` instead.
1243
- */
1244
- mimeType?: string;
1245
- /**
1246
1231
  Additional provider-specific metadata. They are passed through
1247
1232
  to the provider from the AI SDK and enable provider-specific
1248
1233
  functionality that can be fully encapsulated in the provider.
@@ -1272,10 +1257,6 @@ interface FilePart {
1272
1257
  */
1273
1258
  mediaType: string;
1274
1259
  /**
1275
- @deprecated Use `mediaType` instead.
1276
- */
1277
- mimeType?: string;
1278
- /**
1279
1260
  Additional provider-specific metadata. They are passed through
1280
1261
  to the provider from the AI SDK and enable provider-specific
1281
1262
  functionality that can be fully encapsulated in the provider.
@@ -1362,7 +1343,7 @@ interface ToolResultPart {
1362
1343
  to increase the resilience against prompt injection attacks,
1363
1344
  and because not all providers support several system messages.
1364
1345
  */
1365
- type CoreSystemMessage = {
1346
+ type SystemModelMessage = {
1366
1347
  role: 'system';
1367
1348
  content: string;
1368
1349
  /**
@@ -1372,11 +1353,19 @@ type CoreSystemMessage = {
1372
1353
  */
1373
1354
  providerOptions?: ProviderOptions;
1374
1355
  };
1375
- declare const coreSystemMessageSchema: z.ZodType<CoreSystemMessage>;
1356
+ /**
1357
+ @deprecated Use `SystemModelMessage` instead.
1358
+ */
1359
+ type CoreSystemMessage = SystemModelMessage;
1360
+ declare const systemModelMessageSchema: z.ZodType<SystemModelMessage>;
1361
+ /**
1362
+ @deprecated Use `systemModelMessageSchema` instead.
1363
+ */
1364
+ declare const coreSystemMessageSchema: z.ZodType<SystemModelMessage, z.ZodTypeDef, SystemModelMessage>;
1376
1365
  /**
1377
1366
  A user message. It can contain text or a combination of text and images.
1378
1367
  */
1379
- type CoreUserMessage = {
1368
+ type UserModelMessage = {
1380
1369
  role: 'user';
1381
1370
  content: UserContent;
1382
1371
  /**
@@ -1386,7 +1375,15 @@ type CoreUserMessage = {
1386
1375
  */
1387
1376
  providerOptions?: ProviderOptions;
1388
1377
  };
1389
- declare const coreUserMessageSchema: z.ZodType<CoreUserMessage>;
1378
+ /**
1379
+ @deprecated Use `UserModelMessage` instead.
1380
+ */
1381
+ type CoreUserMessage = UserModelMessage;
1382
+ declare const userModelMessageSchema: z.ZodType<UserModelMessage>;
1383
+ /**
1384
+ @deprecated Use `userModelMessageSchema` instead.
1385
+ */
1386
+ declare const coreUserMessageSchema: z.ZodType<UserModelMessage, z.ZodTypeDef, UserModelMessage>;
1390
1387
  /**
1391
1388
  Content of a user message. It can be a string or an array of text and image parts.
1392
1389
  */
@@ -1394,7 +1391,7 @@ type UserContent = string | Array<TextPart | ImagePart | FilePart>;
1394
1391
  /**
1395
1392
  An assistant message. It can contain text, tool calls, or a combination of text and tool calls.
1396
1393
  */
1397
- type CoreAssistantMessage = {
1394
+ type AssistantModelMessage = {
1398
1395
  role: 'assistant';
1399
1396
  content: AssistantContent;
1400
1397
  /**
@@ -1404,7 +1401,15 @@ type CoreAssistantMessage = {
1404
1401
  */
1405
1402
  providerOptions?: ProviderOptions;
1406
1403
  };
1407
- declare const coreAssistantMessageSchema: z.ZodType<CoreAssistantMessage>;
1404
+ /**
1405
+ @deprecated Use `AssistantModelMessage` instead.
1406
+ */
1407
+ type CoreAssistantMessage = AssistantModelMessage;
1408
+ declare const assistantModelMessageSchema: z.ZodType<AssistantModelMessage>;
1409
+ /**
1410
+ @deprecated Use `assistantModelMessageSchema` instead.
1411
+ */
1412
+ declare const coreAssistantMessageSchema: z.ZodType<AssistantModelMessage, z.ZodTypeDef, AssistantModelMessage>;
1408
1413
  /**
1409
1414
  Content of an assistant message.
1410
1415
  It can be a string or an array of text, image, reasoning, redacted reasoning, and tool call parts.
@@ -1413,7 +1418,7 @@ type AssistantContent = string | Array<TextPart | FilePart | ReasoningPart | Too
1413
1418
  /**
1414
1419
  A tool message. It contains the result of one or more tool calls.
1415
1420
  */
1416
- type CoreToolMessage = {
1421
+ type ToolModelMessage = {
1417
1422
  role: 'tool';
1418
1423
  content: ToolContent;
1419
1424
  /**
@@ -1423,7 +1428,15 @@ type CoreToolMessage = {
1423
1428
  */
1424
1429
  providerOptions?: ProviderOptions;
1425
1430
  };
1426
- declare const coreToolMessageSchema: z.ZodType<CoreToolMessage>;
1431
+ /**
1432
+ @deprecated Use `ToolModelMessage` instead.
1433
+ */
1434
+ type CoreToolMessage = ToolModelMessage;
1435
+ declare const toolModelMessageSchema: z.ZodType<ToolModelMessage>;
1436
+ /**
1437
+ @deprecated Use `toolModelMessageSchema` instead.
1438
+ */
1439
+ declare const coreToolMessageSchema: z.ZodType<ToolModelMessage, z.ZodTypeDef, ToolModelMessage>;
1427
1440
  /**
1428
1441
  Content of a tool message. It is an array of tool result parts.
1429
1442
  */
@@ -1432,7 +1445,15 @@ type ToolContent = Array<ToolResultPart>;
1432
1445
  A message that can be used in the `messages` field of a prompt.
1433
1446
  It can be a user message, an assistant message, or a tool message.
1434
1447
  */
1435
- type CoreMessage = CoreSystemMessage | CoreUserMessage | CoreAssistantMessage | CoreToolMessage;
1448
+ type ModelMessage = SystemModelMessage | UserModelMessage | AssistantModelMessage | ToolModelMessage;
1449
+ /**
1450
+ @deprecated Use `ModelMessage` instead.
1451
+ */
1452
+ type CoreMessage = ModelMessage;
1453
+ declare const modelMessageSchema: z.ZodType<ModelMessage>;
1454
+ /**
1455
+ @deprecated Use `modelMessageSchema` instead.
1456
+ */
1436
1457
  declare const coreMessageSchema: z.ZodType<CoreMessage>;
1437
1458
 
1438
1459
  /**
@@ -1451,7 +1472,7 @@ type Prompt = {
1451
1472
  /**
1452
1473
  A list of messages. You can either use `prompt` or `messages` but not both.
1453
1474
  */
1454
- messages?: Array<CoreMessage> | Array<Omit<UIMessage, 'id'>>;
1475
+ messages?: Array<ModelMessage> | Array<Omit<UIMessage, 'id'>>;
1455
1476
  };
1456
1477
 
1457
1478
  /**
@@ -1752,7 +1773,7 @@ interface ToolExecutionOptions {
1752
1773
  * Messages that were sent to the language model to initiate the response that contained the tool call.
1753
1774
  * The messages **do not** include the system prompt nor the assistant response that contained the tool call.
1754
1775
  */
1755
- messages: CoreMessage[];
1776
+ messages: ModelMessage[];
1756
1777
  /**
1757
1778
  * An optional abort signal that indicates that the overall operation should be aborted.
1758
1779
  */
@@ -2935,9 +2956,13 @@ declare function appendResponseMessages({ messages, responseMessages, _internal:
2935
2956
  Converts an array of messages from useChat into an array of CoreMessages that can be used
2936
2957
  with the AI core functions (e.g. `streamText`).
2937
2958
  */
2938
- declare function convertToCoreMessages<TOOLS extends ToolSet = never>(messages: Array<Omit<UIMessage, 'id'>>, options?: {
2959
+ declare function convertToModelMessages<TOOLS extends ToolSet = never>(messages: Array<Omit<UIMessage, 'id'>>, options?: {
2939
2960
  tools?: TOOLS;
2940
- }): CoreMessage[];
2961
+ }): ModelMessage[];
2962
+ /**
2963
+ @deprecated Use `convertToModelMessages` instead.
2964
+ */
2965
+ declare const convertToCoreMessages: typeof convertToModelMessages;
2941
2966
 
2942
2967
  /**
2943
2968
  * A function that attempts to repair a tool call that failed to parse.
@@ -2954,7 +2979,7 @@ declare function convertToCoreMessages<TOOLS extends ToolSet = never>(messages:
2954
2979
  */
2955
2980
  type ToolCallRepairFunction<TOOLS extends ToolSet> = (options: {
2956
2981
  system: string | undefined;
2957
- messages: CoreMessage[];
2982
+ messages: ModelMessage[];
2958
2983
  toolCall: LanguageModelV2ToolCall;
2959
2984
  tools: TOOLS;
2960
2985
  parameterSchema: (options: {
@@ -3656,6 +3681,11 @@ interface GenerateImageResult {
3656
3681
  Response metadata from the provider. There may be multiple responses if we made multiple calls to the model.
3657
3682
  */
3658
3683
  readonly responses: Array<ImageModelResponseMetadata>;
3684
+ /**
3685
+ * Provider-specific metadata. They are passed through from the provider to the AI SDK and enable provider-specific
3686
+ * results that can be fully encapsulated in the provider.
3687
+ */
3688
+ readonly providerMetadata: ImageModelProviderMetadata;
3659
3689
  }
3660
3690
 
3661
3691
  /**
@@ -4688,4 +4718,4 @@ declare class RetryError extends AISDKError {
4688
4718
  static isInstance(error: unknown): error is RetryError;
4689
4719
  }
4690
4720
 
4691
- export { AssistantContent, Attachment, CallSettings, CallWarning, ChatRequest, ChatRequestOptions, ChunkDetector, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataContent, DataStreamOptions, DataStreamPart, DataStreamString, DataStreamWriter, DeepPartial, DownloadError, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FilePart, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, IdGenerator, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelResponseMetadata, ImagePart, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolArgumentsError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, LanguageModel, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputSpecifiedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, Prompt, Provider, ProviderMetadata, ProviderOptions, ProviderRegistryProvider, ReasoningUIPart, RepairTextFunction, RequestOptions, RetryError, SourceUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StepResult, StepStartUIPart, StreamData, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextPart, TextStreamPart, TextUIPart, Tool, ToolCallPart, ToolCallRepairError, ToolCallRepairFunction, ToolCallUnion, ToolChoice, ToolContent, ToolExecutionError, ToolExecutionOptions, ToolInvocation, ToolInvocationUIPart, ToolResultPart, ToolResultUnion, ToolSet, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, UIMessage, UIMessagePart, UseChatOptions, UseCompletionOptions, UserContent, appendClientMessage, appendResponseMessages, callChatApi, callCompletionApi, convertToCoreMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createDataStream, createDataStreamResponse, createProviderRegistry, customProvider, defaultSettingsMiddleware, embed, embedMany, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractMaxToolInvocationStep, extractReasoningMiddleware, formatDataStreamPart, generateObject, generateText, getTextFromDataUrl, getToolInvocations, isAssistantMessageWithCompletedToolCalls, isDeepEqualData, parseDataStreamPart, parsePartialJson, pipeDataStreamToResponse, prepareAttachmentsForRequest, processDataStream, processTextStream, shouldResubmitMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, streamObject, streamText, tool, updateToolCallResult, wrapLanguageModel };
4721
+ export { AssistantContent, AssistantModelMessage, CallSettings, CallWarning, ChatRequest, ChatRequestOptions, ChunkDetector, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataContent, DataStreamOptions, DataStreamPart, DataStreamString, DataStreamWriter, DeepPartial, DownloadError, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FilePart, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, IdGenerator, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, ImagePart, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolArgumentsError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, LanguageModel, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, ModelMessage, NoImageGeneratedError, NoObjectGeneratedError, NoOutputSpecifiedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, Prompt, Provider, ProviderMetadata, ProviderOptions, ProviderRegistryProvider, ReasoningUIPart, RepairTextFunction, RequestOptions, RetryError, SourceUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StepResult, StepStartUIPart, StreamData, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, SystemModelMessage, TelemetrySettings, TextPart, TextStreamPart, TextUIPart, Tool, ToolCallPart, ToolCallRepairError, ToolCallRepairFunction, ToolCallUnion, ToolChoice, ToolContent, ToolExecutionError, ToolExecutionOptions, ToolInvocation, ToolInvocationUIPart, ToolModelMessage, ToolResultPart, ToolResultUnion, ToolSet, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, UIMessage, UIMessagePart, UseChatOptions, UseCompletionOptions, UserContent, UserModelMessage, appendClientMessage, appendResponseMessages, assistantModelMessageSchema, callChatApi, callCompletionApi, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createDataStream, createDataStreamResponse, createProviderRegistry, customProvider, defaultSettingsMiddleware, embed, embedMany, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractMaxToolInvocationStep, extractReasoningMiddleware, formatDataStreamPart, generateObject, generateText, getTextFromDataUrl, getToolInvocations, isAssistantMessageWithCompletedToolCalls, isDeepEqualData, modelMessageSchema, parseDataStreamPart, parsePartialJson, pipeDataStreamToResponse, processDataStream, processTextStream, shouldResubmitMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, streamObject, streamText, systemModelMessageSchema, tool, toolModelMessageSchema, updateToolCallResult, userModelMessageSchema, wrapLanguageModel };