ai 6.0.41 → 6.0.43

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 (31) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/index.d.mts +23 -13
  3. package/dist/index.d.ts +23 -13
  4. package/dist/index.js +450 -355
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +381 -287
  7. package/dist/index.mjs.map +1 -1
  8. package/dist/internal/index.js +138 -45
  9. package/dist/internal/index.js.map +1 -1
  10. package/dist/internal/index.mjs +127 -34
  11. package/dist/internal/index.mjs.map +1 -1
  12. package/docs/02-getting-started/02-nextjs-app-router.mdx +3 -3
  13. package/docs/02-getting-started/03-nextjs-pages-router.mdx +2 -2
  14. package/docs/02-getting-started/04-svelte.mdx +2 -2
  15. package/docs/02-getting-started/05-nuxt.mdx +2 -2
  16. package/docs/02-getting-started/06-nodejs.mdx +2 -2
  17. package/docs/02-getting-started/07-expo.mdx +1 -1
  18. package/docs/02-getting-started/08-tanstack-start.mdx +2 -2
  19. package/docs/05-ai-sdk-rsc/03-generative-ui-state.mdx +1 -1
  20. package/docs/05-ai-sdk-rsc/05-streaming-values.mdx +1 -1
  21. package/docs/06-advanced/02-stopping-streams.mdx +2 -2
  22. package/docs/07-reference/02-ai-sdk-ui/02-use-completion.mdx +1 -1
  23. package/docs/08-migration-guides/26-migration-guide-5-0.mdx +3 -3
  24. package/docs/09-troubleshooting/15-abort-breaks-resumable-streams.mdx +1 -1
  25. package/docs/09-troubleshooting/21-missing-tool-results-error.mdx +82 -0
  26. package/package.json +2 -2
  27. package/src/error/index.ts +1 -1
  28. package/src/error/missing-tool-result-error.ts +28 -0
  29. package/src/prompt/__snapshots__/convert-to-language-model-prompt.validation.test.ts.snap +76 -0
  30. package/src/prompt/convert-to-language-model-prompt.ts +85 -1
  31. package/src/prompt/convert-to-language-model-prompt.validation.test.ts +138 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.43
4
+
5
+ ### Patch Changes
6
+
7
+ - 2dc9bfa: fix(ai): handle provider-executed tools and tool-approval-response in validation
8
+
9
+ - Skip validation for tool calls with `providerExecuted: true` (deferred results)
10
+ - Map approvalId to toolCallId for proper tool-approval-response handling
11
+ - Filter out empty tool messages after content filtering
12
+ - Fixes MissingToolResultError for async and approval-based tool flows
13
+
14
+ ## 6.0.42
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [66d78d5]
19
+ - @ai-sdk/gateway@3.0.17
20
+
3
21
  ## 6.0.41
4
22
 
5
23
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -942,9 +942,9 @@ type StopCondition<TOOLS extends ToolSet> = (options: {
942
942
  declare function stepCountIs(stepCount: number): StopCondition<any>;
943
943
  declare function hasToolCall(toolName: string): StopCondition<any>;
944
944
 
945
- declare const symbol$f: unique symbol;
945
+ declare const symbol$g: unique symbol;
946
946
  declare class InvalidToolInputError extends AISDKError {
947
- private readonly [symbol$f];
947
+ private readonly [symbol$g];
948
948
  readonly toolName: string;
949
949
  readonly toolInput: string;
950
950
  constructor({ toolInput, toolName, cause, message, }: {
@@ -956,9 +956,9 @@ declare class InvalidToolInputError extends AISDKError {
956
956
  static isInstance(error: unknown): error is InvalidToolInputError;
957
957
  }
958
958
 
959
- declare const symbol$e: unique symbol;
959
+ declare const symbol$f: unique symbol;
960
960
  declare class NoSuchToolError extends AISDKError {
961
- private readonly [symbol$e];
961
+ private readonly [symbol$f];
962
962
  readonly toolName: string;
963
963
  readonly availableTools: string[] | undefined;
964
964
  constructor({ toolName, availableTools, message, }: {
@@ -3987,9 +3987,9 @@ declare function embedMany({ model: modelArg, values, maxParallelCalls, maxRetri
3987
3987
  maxParallelCalls?: number;
3988
3988
  }): Promise<EmbedManyResult>;
3989
3989
 
3990
- declare const symbol$d: unique symbol;
3990
+ declare const symbol$e: unique symbol;
3991
3991
  declare class InvalidArgumentError extends AISDKError {
3992
- private readonly [symbol$d];
3992
+ private readonly [symbol$e];
3993
3993
  readonly parameter: string;
3994
3994
  readonly value: unknown;
3995
3995
  constructor({ parameter, value, message, }: {
@@ -4078,9 +4078,9 @@ type SingleRequestTextStreamPart<TOOLS extends ToolSet> = {
4078
4078
  rawValue: unknown;
4079
4079
  };
4080
4080
 
4081
- declare const symbol$c: unique symbol;
4081
+ declare const symbol$d: unique symbol;
4082
4082
  declare class InvalidStreamPartError extends AISDKError {
4083
- private readonly [symbol$c];
4083
+ private readonly [symbol$d];
4084
4084
  readonly chunk: SingleRequestTextStreamPart<any>;
4085
4085
  constructor({ chunk, message, }: {
4086
4086
  chunk: SingleRequestTextStreamPart<any>;
@@ -4089,9 +4089,9 @@ declare class InvalidStreamPartError extends AISDKError {
4089
4089
  static isInstance(error: unknown): error is InvalidStreamPartError;
4090
4090
  }
4091
4091
 
4092
- declare const symbol$b: unique symbol;
4092
+ declare const symbol$c: unique symbol;
4093
4093
  declare class InvalidToolApprovalError extends AISDKError {
4094
- private readonly [symbol$b];
4094
+ private readonly [symbol$c];
4095
4095
  readonly approvalId: string;
4096
4096
  constructor({ approvalId }: {
4097
4097
  approvalId: string;
@@ -4099,9 +4099,9 @@ declare class InvalidToolApprovalError extends AISDKError {
4099
4099
  static isInstance(error: unknown): error is InvalidToolApprovalError;
4100
4100
  }
4101
4101
 
4102
- declare const symbol$a: unique symbol;
4102
+ declare const symbol$b: unique symbol;
4103
4103
  declare class ToolCallNotFoundForApprovalError extends AISDKError {
4104
- private readonly [symbol$a];
4104
+ private readonly [symbol$b];
4105
4105
  readonly toolCallId: string;
4106
4106
  readonly approvalId: string;
4107
4107
  constructor({ toolCallId, approvalId, }: {
@@ -4111,6 +4111,16 @@ declare class ToolCallNotFoundForApprovalError extends AISDKError {
4111
4111
  static isInstance(error: unknown): error is ToolCallNotFoundForApprovalError;
4112
4112
  }
4113
4113
 
4114
+ declare const symbol$a: unique symbol;
4115
+ declare class MissingToolResultsError extends AISDKError {
4116
+ private readonly [symbol$a];
4117
+ readonly toolCallIds: string[];
4118
+ constructor({ toolCallIds }: {
4119
+ toolCallIds: string[];
4120
+ });
4121
+ static isInstance(error: unknown): error is MissingToolResultsError;
4122
+ }
4123
+
4114
4124
  declare const symbol$9: unique symbol;
4115
4125
  /**
4116
4126
  Thrown when no image could be generated. This can have multiple causes:
@@ -5622,4 +5632,4 @@ declare global {
5622
5632
  var AI_SDK_LOG_WARNINGS: LogWarningsFunction | undefined | false;
5623
5633
  }
5624
5634
 
5625
- export { AbstractChat, Agent, AgentCallParameters, AgentStreamParameters, AsyncIterableStream, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, ContentPart, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DirectChatTransport, DirectChatTransportOptions, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelMiddleware, EmbeddingModelUsage, ErrorHandler, ToolLoopAgent as Experimental_Agent, ToolLoopAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FileUIPart, FinishReason, GenerateImageResult, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageModelMiddleware, ImageModelProviderMetadata, ImageModelResponseMetadata, ImageModelUsage, InferAgentUIMessage, InferCompleteOutput as InferGenerateOutput, InferPartialOutput as InferStreamOutput, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolApprovalError, InvalidToolInputError, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, LogWarningsFunction, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RerankResult, RerankingModel, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, TimeoutConfiguration, ToolApprovalRequestOutput, ToolCallNotFoundForApprovalError, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolLoopAgent, ToolLoopAgentOnFinishCallback, ToolLoopAgentOnStepFinishCallback, ToolLoopAgentSettings, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamError, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, Warning, addToolInputExamplesMiddleware, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToModelMessages, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultEmbeddingSettingsMiddleware, defaultSettingsMiddleware, embed, embedMany, experimental_createProviderRegistry, experimental_customProvider, experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractJsonMiddleware, extractReasoningMiddleware, generateImage, generateObject, generateText, getStaticToolName, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDataUIPart, isDeepEqualData, isFileUIPart, isReasoningUIPart, isStaticToolUIPart, isTextUIPart, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, rerank, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, userModelMessageSchema, validateUIMessages, wrapEmbeddingModel, wrapImageModel, wrapLanguageModel, wrapProvider };
5635
+ export { AbstractChat, Agent, AgentCallParameters, AgentStreamParameters, AsyncIterableStream, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, ContentPart, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DirectChatTransport, DirectChatTransportOptions, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelMiddleware, EmbeddingModelUsage, ErrorHandler, ToolLoopAgent as Experimental_Agent, ToolLoopAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FileUIPart, FinishReason, GenerateImageResult, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageModelMiddleware, ImageModelProviderMetadata, ImageModelResponseMetadata, ImageModelUsage, InferAgentUIMessage, InferCompleteOutput as InferGenerateOutput, InferPartialOutput as InferStreamOutput, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolApprovalError, InvalidToolInputError, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, LogWarningsFunction, MessageConversionError, MissingToolResultsError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RerankResult, RerankingModel, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, TimeoutConfiguration, ToolApprovalRequestOutput, ToolCallNotFoundForApprovalError, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolLoopAgent, ToolLoopAgentOnFinishCallback, ToolLoopAgentOnStepFinishCallback, ToolLoopAgentSettings, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamError, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, Warning, addToolInputExamplesMiddleware, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToModelMessages, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultEmbeddingSettingsMiddleware, defaultSettingsMiddleware, embed, embedMany, experimental_createProviderRegistry, experimental_customProvider, experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractJsonMiddleware, extractReasoningMiddleware, generateImage, generateObject, generateText, getStaticToolName, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDataUIPart, isDeepEqualData, isFileUIPart, isReasoningUIPart, isStaticToolUIPart, isTextUIPart, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, rerank, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, userModelMessageSchema, validateUIMessages, wrapEmbeddingModel, wrapImageModel, wrapLanguageModel, wrapProvider };
package/dist/index.d.ts CHANGED
@@ -942,9 +942,9 @@ type StopCondition<TOOLS extends ToolSet> = (options: {
942
942
  declare function stepCountIs(stepCount: number): StopCondition<any>;
943
943
  declare function hasToolCall(toolName: string): StopCondition<any>;
944
944
 
945
- declare const symbol$f: unique symbol;
945
+ declare const symbol$g: unique symbol;
946
946
  declare class InvalidToolInputError extends AISDKError {
947
- private readonly [symbol$f];
947
+ private readonly [symbol$g];
948
948
  readonly toolName: string;
949
949
  readonly toolInput: string;
950
950
  constructor({ toolInput, toolName, cause, message, }: {
@@ -956,9 +956,9 @@ declare class InvalidToolInputError extends AISDKError {
956
956
  static isInstance(error: unknown): error is InvalidToolInputError;
957
957
  }
958
958
 
959
- declare const symbol$e: unique symbol;
959
+ declare const symbol$f: unique symbol;
960
960
  declare class NoSuchToolError extends AISDKError {
961
- private readonly [symbol$e];
961
+ private readonly [symbol$f];
962
962
  readonly toolName: string;
963
963
  readonly availableTools: string[] | undefined;
964
964
  constructor({ toolName, availableTools, message, }: {
@@ -3987,9 +3987,9 @@ declare function embedMany({ model: modelArg, values, maxParallelCalls, maxRetri
3987
3987
  maxParallelCalls?: number;
3988
3988
  }): Promise<EmbedManyResult>;
3989
3989
 
3990
- declare const symbol$d: unique symbol;
3990
+ declare const symbol$e: unique symbol;
3991
3991
  declare class InvalidArgumentError extends AISDKError {
3992
- private readonly [symbol$d];
3992
+ private readonly [symbol$e];
3993
3993
  readonly parameter: string;
3994
3994
  readonly value: unknown;
3995
3995
  constructor({ parameter, value, message, }: {
@@ -4078,9 +4078,9 @@ type SingleRequestTextStreamPart<TOOLS extends ToolSet> = {
4078
4078
  rawValue: unknown;
4079
4079
  };
4080
4080
 
4081
- declare const symbol$c: unique symbol;
4081
+ declare const symbol$d: unique symbol;
4082
4082
  declare class InvalidStreamPartError extends AISDKError {
4083
- private readonly [symbol$c];
4083
+ private readonly [symbol$d];
4084
4084
  readonly chunk: SingleRequestTextStreamPart<any>;
4085
4085
  constructor({ chunk, message, }: {
4086
4086
  chunk: SingleRequestTextStreamPart<any>;
@@ -4089,9 +4089,9 @@ declare class InvalidStreamPartError extends AISDKError {
4089
4089
  static isInstance(error: unknown): error is InvalidStreamPartError;
4090
4090
  }
4091
4091
 
4092
- declare const symbol$b: unique symbol;
4092
+ declare const symbol$c: unique symbol;
4093
4093
  declare class InvalidToolApprovalError extends AISDKError {
4094
- private readonly [symbol$b];
4094
+ private readonly [symbol$c];
4095
4095
  readonly approvalId: string;
4096
4096
  constructor({ approvalId }: {
4097
4097
  approvalId: string;
@@ -4099,9 +4099,9 @@ declare class InvalidToolApprovalError extends AISDKError {
4099
4099
  static isInstance(error: unknown): error is InvalidToolApprovalError;
4100
4100
  }
4101
4101
 
4102
- declare const symbol$a: unique symbol;
4102
+ declare const symbol$b: unique symbol;
4103
4103
  declare class ToolCallNotFoundForApprovalError extends AISDKError {
4104
- private readonly [symbol$a];
4104
+ private readonly [symbol$b];
4105
4105
  readonly toolCallId: string;
4106
4106
  readonly approvalId: string;
4107
4107
  constructor({ toolCallId, approvalId, }: {
@@ -4111,6 +4111,16 @@ declare class ToolCallNotFoundForApprovalError extends AISDKError {
4111
4111
  static isInstance(error: unknown): error is ToolCallNotFoundForApprovalError;
4112
4112
  }
4113
4113
 
4114
+ declare const symbol$a: unique symbol;
4115
+ declare class MissingToolResultsError extends AISDKError {
4116
+ private readonly [symbol$a];
4117
+ readonly toolCallIds: string[];
4118
+ constructor({ toolCallIds }: {
4119
+ toolCallIds: string[];
4120
+ });
4121
+ static isInstance(error: unknown): error is MissingToolResultsError;
4122
+ }
4123
+
4114
4124
  declare const symbol$9: unique symbol;
4115
4125
  /**
4116
4126
  Thrown when no image could be generated. This can have multiple causes:
@@ -5622,4 +5632,4 @@ declare global {
5622
5632
  var AI_SDK_LOG_WARNINGS: LogWarningsFunction | undefined | false;
5623
5633
  }
5624
5634
 
5625
- export { AbstractChat, Agent, AgentCallParameters, AgentStreamParameters, AsyncIterableStream, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, ContentPart, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DirectChatTransport, DirectChatTransportOptions, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelMiddleware, EmbeddingModelUsage, ErrorHandler, ToolLoopAgent as Experimental_Agent, ToolLoopAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FileUIPart, FinishReason, GenerateImageResult, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageModelMiddleware, ImageModelProviderMetadata, ImageModelResponseMetadata, ImageModelUsage, InferAgentUIMessage, InferCompleteOutput as InferGenerateOutput, InferPartialOutput as InferStreamOutput, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolApprovalError, InvalidToolInputError, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, LogWarningsFunction, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RerankResult, RerankingModel, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, TimeoutConfiguration, ToolApprovalRequestOutput, ToolCallNotFoundForApprovalError, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolLoopAgent, ToolLoopAgentOnFinishCallback, ToolLoopAgentOnStepFinishCallback, ToolLoopAgentSettings, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamError, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, Warning, addToolInputExamplesMiddleware, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToModelMessages, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultEmbeddingSettingsMiddleware, defaultSettingsMiddleware, embed, embedMany, experimental_createProviderRegistry, experimental_customProvider, experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractJsonMiddleware, extractReasoningMiddleware, generateImage, generateObject, generateText, getStaticToolName, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDataUIPart, isDeepEqualData, isFileUIPart, isReasoningUIPart, isStaticToolUIPart, isTextUIPart, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, rerank, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, userModelMessageSchema, validateUIMessages, wrapEmbeddingModel, wrapImageModel, wrapLanguageModel, wrapProvider };
5635
+ export { AbstractChat, Agent, AgentCallParameters, AgentStreamParameters, AsyncIterableStream, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, ContentPart, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DirectChatTransport, DirectChatTransportOptions, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelMiddleware, EmbeddingModelUsage, ErrorHandler, ToolLoopAgent as Experimental_Agent, ToolLoopAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FileUIPart, FinishReason, GenerateImageResult, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageModelMiddleware, ImageModelProviderMetadata, ImageModelResponseMetadata, ImageModelUsage, InferAgentUIMessage, InferCompleteOutput as InferGenerateOutput, InferPartialOutput as InferStreamOutput, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolApprovalError, InvalidToolInputError, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, LogWarningsFunction, MessageConversionError, MissingToolResultsError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RerankResult, RerankingModel, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, TimeoutConfiguration, ToolApprovalRequestOutput, ToolCallNotFoundForApprovalError, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolLoopAgent, ToolLoopAgentOnFinishCallback, ToolLoopAgentOnStepFinishCallback, ToolLoopAgentSettings, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamError, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, Warning, addToolInputExamplesMiddleware, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToModelMessages, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultEmbeddingSettingsMiddleware, defaultSettingsMiddleware, embed, embedMany, experimental_createProviderRegistry, experimental_customProvider, experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractJsonMiddleware, extractReasoningMiddleware, generateImage, generateObject, generateText, getStaticToolName, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDataUIPart, isDeepEqualData, isFileUIPart, isReasoningUIPart, isStaticToolUIPart, isTextUIPart, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, rerank, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, userModelMessageSchema, validateUIMessages, wrapEmbeddingModel, wrapImageModel, wrapLanguageModel, wrapProvider };