ai 6.0.0-beta.68 → 6.0.0-beta.69
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/CHANGELOG.md +6 -0
 - package/dist/index.d.mts +26 -12
 - package/dist/index.d.ts +26 -12
 - package/dist/index.js +144 -40
 - package/dist/index.js.map +1 -1
 - package/dist/index.mjs +126 -20
 - package/dist/index.mjs.map +1 -1
 - package/dist/internal/index.js +1 -1
 - package/dist/internal/index.mjs +1 -1
 - package/package.json +1 -1
 
    
        package/CHANGELOG.md
    CHANGED
    
    
    
        package/dist/index.d.mts
    CHANGED
    
    | 
         @@ -657,11 +657,6 @@ type PartialObject<ObjectType extends object> = { 
     | 
|
| 
       657 
657 
     | 
    
         
             
            interface Output<OUTPUT = any, PARTIAL = any> {
         
     | 
| 
       658 
658 
     | 
    
         
             
                readonly type: 'object' | 'text';
         
     | 
| 
       659 
659 
     | 
    
         
             
                responseFormat: PromiseLike<LanguageModelV3CallOptions['responseFormat']>;
         
     | 
| 
       660 
     | 
    
         
            -
                parsePartial(options: {
         
     | 
| 
       661 
     | 
    
         
            -
                    text: string;
         
     | 
| 
       662 
     | 
    
         
            -
                }): Promise<{
         
     | 
| 
       663 
     | 
    
         
            -
                    partial: PARTIAL;
         
     | 
| 
       664 
     | 
    
         
            -
                } | undefined>;
         
     | 
| 
       665 
660 
     | 
    
         
             
                parseOutput(options: {
         
     | 
| 
       666 
661 
     | 
    
         
             
                    text: string;
         
     | 
| 
       667 
662 
     | 
    
         
             
                }, context: {
         
     | 
| 
         @@ -669,29 +664,48 @@ interface Output<OUTPUT = any, PARTIAL = any> { 
     | 
|
| 
       669 
664 
     | 
    
         
             
                    usage: LanguageModelUsage;
         
     | 
| 
       670 
665 
     | 
    
         
             
                    finishReason: FinishReason;
         
     | 
| 
       671 
666 
     | 
    
         
             
                }): Promise<OUTPUT>;
         
     | 
| 
      
 667 
     | 
    
         
            +
                parsePartial(options: {
         
     | 
| 
      
 668 
     | 
    
         
            +
                    text: string;
         
     | 
| 
      
 669 
     | 
    
         
            +
                }): Promise<{
         
     | 
| 
      
 670 
     | 
    
         
            +
                    partial: PARTIAL;
         
     | 
| 
      
 671 
     | 
    
         
            +
                } | undefined>;
         
     | 
| 
       672 
672 
     | 
    
         
             
            }
         
     | 
| 
      
 673 
     | 
    
         
            +
            /**
         
     | 
| 
      
 674 
     | 
    
         
            +
             * Output specification for text generation.
         
     | 
| 
      
 675 
     | 
    
         
            +
             *
         
     | 
| 
      
 676 
     | 
    
         
            +
             * @returns An output specification for generating text.
         
     | 
| 
      
 677 
     | 
    
         
            +
             */
         
     | 
| 
       673 
678 
     | 
    
         
             
            declare const text: () => Output<string, string>;
         
     | 
| 
      
 679 
     | 
    
         
            +
            /**
         
     | 
| 
      
 680 
     | 
    
         
            +
             * Output specification for typed object generation using schemas.
         
     | 
| 
      
 681 
     | 
    
         
            +
             *
         
     | 
| 
      
 682 
     | 
    
         
            +
             * @param schema - The schema of the object to generate.
         
     | 
| 
      
 683 
     | 
    
         
            +
             *
         
     | 
| 
      
 684 
     | 
    
         
            +
             * @returns An output specification for generating objects with the specified schema.
         
     | 
| 
      
 685 
     | 
    
         
            +
             */
         
     | 
| 
       674 
686 
     | 
    
         
             
            declare const object: <OUTPUT>({ schema: inputSchema, }: {
         
     | 
| 
       675 
687 
     | 
    
         
             
                schema: FlexibleSchema<OUTPUT>;
         
     | 
| 
       676 
688 
     | 
    
         
             
            }) => Output<OUTPUT, DeepPartial<OUTPUT>>;
         
     | 
| 
       677 
     | 
    
         
            -
             
     | 
| 
       678 
     | 
    
         
            -
             
     | 
| 
      
 689 
     | 
    
         
            +
            declare const array: <ELEMENT>({ element: inputElementSchema, }: {
         
     | 
| 
      
 690 
     | 
    
         
            +
                element: FlexibleSchema<ELEMENT>;
         
     | 
| 
      
 691 
     | 
    
         
            +
            }) => Output<Array<ELEMENT>, Array<ELEMENT>>;
         
     | 
| 
       679 
692 
     | 
    
         | 
| 
       680 
     | 
    
         
            -
            type output_InferGenerateOutput<OUTPUT extends Output> = InferGenerateOutput<OUTPUT>;
         
     | 
| 
       681 
     | 
    
         
            -
            type output_InferStreamOutput<OUTPUT extends Output> = InferStreamOutput<OUTPUT>;
         
     | 
| 
       682 
693 
     | 
    
         
             
            type output_Output<OUTPUT = any, PARTIAL = any> = Output<OUTPUT, PARTIAL>;
         
     | 
| 
      
 694 
     | 
    
         
            +
            declare const output_array: typeof array;
         
     | 
| 
       683 
695 
     | 
    
         
             
            declare const output_object: typeof object;
         
     | 
| 
       684 
696 
     | 
    
         
             
            declare const output_text: typeof text;
         
     | 
| 
       685 
697 
     | 
    
         
             
            declare namespace output {
         
     | 
| 
       686 
698 
     | 
    
         
             
              export {
         
     | 
| 
       687 
     | 
    
         
            -
                output_InferGenerateOutput as InferGenerateOutput,
         
     | 
| 
       688 
     | 
    
         
            -
                output_InferStreamOutput as InferStreamOutput,
         
     | 
| 
       689 
699 
     | 
    
         
             
                output_Output as Output,
         
     | 
| 
      
 700 
     | 
    
         
            +
                output_array as array,
         
     | 
| 
       690 
701 
     | 
    
         
             
                output_object as object,
         
     | 
| 
       691 
702 
     | 
    
         
             
                output_text as text,
         
     | 
| 
       692 
703 
     | 
    
         
             
              };
         
     | 
| 
       693 
704 
     | 
    
         
             
            }
         
     | 
| 
       694 
705 
     | 
    
         | 
| 
      
 706 
     | 
    
         
            +
            type InferGenerateOutput<OUTPUT extends Output> = OUTPUT extends Output<infer T, any> ? T : never;
         
     | 
| 
      
 707 
     | 
    
         
            +
            type InferStreamOutput<OUTPUT extends Output> = OUTPUT extends Output<any, infer P> ? P : never;
         
     | 
| 
      
 708 
     | 
    
         
            +
             
     | 
| 
       695 
709 
     | 
    
         
             
            type CallSettings = {
         
     | 
| 
       696 
710 
     | 
    
         
             
                /**
         
     | 
| 
       697 
711 
     | 
    
         
             
              Maximum number of tokens to generate.
         
     | 
| 
         @@ -5004,4 +5018,4 @@ declare global { 
     | 
|
| 
       5004 
5018 
     | 
    
         
             
                var AI_SDK_LOG_WARNINGS: LogWarningsFunction | undefined | false;
         
     | 
| 
       5005 
5019 
     | 
    
         
             
            }
         
     | 
| 
       5006 
5020 
     | 
    
         | 
| 
       5007 
     | 
    
         
            -
            export { AbstractChat, Agent, AsyncIterableStream, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DownloadError, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, ErrorHandler, ToolLoopAgent as Experimental_Agent, ToolLoopAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, Warning as Experimental_Warning, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferAgentUIMessage, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoOutputSpecifiedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolApprovalRequestOutput, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolLoopAgent, ToolLoopAgentOnFinishCallback, ToolLoopAgentOnStepFinishCallback, ToolLoopAgentSettings, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultSettingsMiddleware, embed, embedMany, MCPClient as experimental_MCPClient, MCPClientConfig as experimental_MCPClientConfig, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractReasoningMiddleware, generateObject, generateText, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDataUIPart, isDeepEqualData, isFileUIPart, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, userModelMessageSchema, validateUIMessages, wrapLanguageModel, wrapProvider };
         
     | 
| 
      
 5021 
     | 
    
         
            +
            export { AbstractChat, Agent, AsyncIterableStream, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DownloadError, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, ErrorHandler, ToolLoopAgent as Experimental_Agent, ToolLoopAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, Warning as Experimental_Warning, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferAgentUIMessage, InferGenerateOutput, InferStreamOutput, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoOutputSpecifiedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolApprovalRequestOutput, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolLoopAgent, ToolLoopAgentOnFinishCallback, ToolLoopAgentOnStepFinishCallback, ToolLoopAgentSettings, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultSettingsMiddleware, embed, embedMany, MCPClient as experimental_MCPClient, MCPClientConfig as experimental_MCPClientConfig, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractReasoningMiddleware, generateObject, generateText, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDataUIPart, isDeepEqualData, isFileUIPart, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, userModelMessageSchema, validateUIMessages, wrapLanguageModel, wrapProvider };
         
     | 
    
        package/dist/index.d.ts
    CHANGED
    
    | 
         @@ -657,11 +657,6 @@ type PartialObject<ObjectType extends object> = { 
     | 
|
| 
       657 
657 
     | 
    
         
             
            interface Output<OUTPUT = any, PARTIAL = any> {
         
     | 
| 
       658 
658 
     | 
    
         
             
                readonly type: 'object' | 'text';
         
     | 
| 
       659 
659 
     | 
    
         
             
                responseFormat: PromiseLike<LanguageModelV3CallOptions['responseFormat']>;
         
     | 
| 
       660 
     | 
    
         
            -
                parsePartial(options: {
         
     | 
| 
       661 
     | 
    
         
            -
                    text: string;
         
     | 
| 
       662 
     | 
    
         
            -
                }): Promise<{
         
     | 
| 
       663 
     | 
    
         
            -
                    partial: PARTIAL;
         
     | 
| 
       664 
     | 
    
         
            -
                } | undefined>;
         
     | 
| 
       665 
660 
     | 
    
         
             
                parseOutput(options: {
         
     | 
| 
       666 
661 
     | 
    
         
             
                    text: string;
         
     | 
| 
       667 
662 
     | 
    
         
             
                }, context: {
         
     | 
| 
         @@ -669,29 +664,48 @@ interface Output<OUTPUT = any, PARTIAL = any> { 
     | 
|
| 
       669 
664 
     | 
    
         
             
                    usage: LanguageModelUsage;
         
     | 
| 
       670 
665 
     | 
    
         
             
                    finishReason: FinishReason;
         
     | 
| 
       671 
666 
     | 
    
         
             
                }): Promise<OUTPUT>;
         
     | 
| 
      
 667 
     | 
    
         
            +
                parsePartial(options: {
         
     | 
| 
      
 668 
     | 
    
         
            +
                    text: string;
         
     | 
| 
      
 669 
     | 
    
         
            +
                }): Promise<{
         
     | 
| 
      
 670 
     | 
    
         
            +
                    partial: PARTIAL;
         
     | 
| 
      
 671 
     | 
    
         
            +
                } | undefined>;
         
     | 
| 
       672 
672 
     | 
    
         
             
            }
         
     | 
| 
      
 673 
     | 
    
         
            +
            /**
         
     | 
| 
      
 674 
     | 
    
         
            +
             * Output specification for text generation.
         
     | 
| 
      
 675 
     | 
    
         
            +
             *
         
     | 
| 
      
 676 
     | 
    
         
            +
             * @returns An output specification for generating text.
         
     | 
| 
      
 677 
     | 
    
         
            +
             */
         
     | 
| 
       673 
678 
     | 
    
         
             
            declare const text: () => Output<string, string>;
         
     | 
| 
      
 679 
     | 
    
         
            +
            /**
         
     | 
| 
      
 680 
     | 
    
         
            +
             * Output specification for typed object generation using schemas.
         
     | 
| 
      
 681 
     | 
    
         
            +
             *
         
     | 
| 
      
 682 
     | 
    
         
            +
             * @param schema - The schema of the object to generate.
         
     | 
| 
      
 683 
     | 
    
         
            +
             *
         
     | 
| 
      
 684 
     | 
    
         
            +
             * @returns An output specification for generating objects with the specified schema.
         
     | 
| 
      
 685 
     | 
    
         
            +
             */
         
     | 
| 
       674 
686 
     | 
    
         
             
            declare const object: <OUTPUT>({ schema: inputSchema, }: {
         
     | 
| 
       675 
687 
     | 
    
         
             
                schema: FlexibleSchema<OUTPUT>;
         
     | 
| 
       676 
688 
     | 
    
         
             
            }) => Output<OUTPUT, DeepPartial<OUTPUT>>;
         
     | 
| 
       677 
     | 
    
         
            -
             
     | 
| 
       678 
     | 
    
         
            -
             
     | 
| 
      
 689 
     | 
    
         
            +
            declare const array: <ELEMENT>({ element: inputElementSchema, }: {
         
     | 
| 
      
 690 
     | 
    
         
            +
                element: FlexibleSchema<ELEMENT>;
         
     | 
| 
      
 691 
     | 
    
         
            +
            }) => Output<Array<ELEMENT>, Array<ELEMENT>>;
         
     | 
| 
       679 
692 
     | 
    
         | 
| 
       680 
     | 
    
         
            -
            type output_InferGenerateOutput<OUTPUT extends Output> = InferGenerateOutput<OUTPUT>;
         
     | 
| 
       681 
     | 
    
         
            -
            type output_InferStreamOutput<OUTPUT extends Output> = InferStreamOutput<OUTPUT>;
         
     | 
| 
       682 
693 
     | 
    
         
             
            type output_Output<OUTPUT = any, PARTIAL = any> = Output<OUTPUT, PARTIAL>;
         
     | 
| 
      
 694 
     | 
    
         
            +
            declare const output_array: typeof array;
         
     | 
| 
       683 
695 
     | 
    
         
             
            declare const output_object: typeof object;
         
     | 
| 
       684 
696 
     | 
    
         
             
            declare const output_text: typeof text;
         
     | 
| 
       685 
697 
     | 
    
         
             
            declare namespace output {
         
     | 
| 
       686 
698 
     | 
    
         
             
              export {
         
     | 
| 
       687 
     | 
    
         
            -
                output_InferGenerateOutput as InferGenerateOutput,
         
     | 
| 
       688 
     | 
    
         
            -
                output_InferStreamOutput as InferStreamOutput,
         
     | 
| 
       689 
699 
     | 
    
         
             
                output_Output as Output,
         
     | 
| 
      
 700 
     | 
    
         
            +
                output_array as array,
         
     | 
| 
       690 
701 
     | 
    
         
             
                output_object as object,
         
     | 
| 
       691 
702 
     | 
    
         
             
                output_text as text,
         
     | 
| 
       692 
703 
     | 
    
         
             
              };
         
     | 
| 
       693 
704 
     | 
    
         
             
            }
         
     | 
| 
       694 
705 
     | 
    
         | 
| 
      
 706 
     | 
    
         
            +
            type InferGenerateOutput<OUTPUT extends Output> = OUTPUT extends Output<infer T, any> ? T : never;
         
     | 
| 
      
 707 
     | 
    
         
            +
            type InferStreamOutput<OUTPUT extends Output> = OUTPUT extends Output<any, infer P> ? P : never;
         
     | 
| 
      
 708 
     | 
    
         
            +
             
     | 
| 
       695 
709 
     | 
    
         
             
            type CallSettings = {
         
     | 
| 
       696 
710 
     | 
    
         
             
                /**
         
     | 
| 
       697 
711 
     | 
    
         
             
              Maximum number of tokens to generate.
         
     | 
| 
         @@ -5004,4 +5018,4 @@ declare global { 
     | 
|
| 
       5004 
5018 
     | 
    
         
             
                var AI_SDK_LOG_WARNINGS: LogWarningsFunction | undefined | false;
         
     | 
| 
       5005 
5019 
     | 
    
         
             
            }
         
     | 
| 
       5006 
5020 
     | 
    
         | 
| 
       5007 
     | 
    
         
            -
            export { AbstractChat, Agent, AsyncIterableStream, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DownloadError, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, ErrorHandler, ToolLoopAgent as Experimental_Agent, ToolLoopAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, Warning as Experimental_Warning, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferAgentUIMessage, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoOutputSpecifiedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolApprovalRequestOutput, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolLoopAgent, ToolLoopAgentOnFinishCallback, ToolLoopAgentOnStepFinishCallback, ToolLoopAgentSettings, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultSettingsMiddleware, embed, embedMany, MCPClient as experimental_MCPClient, MCPClientConfig as experimental_MCPClientConfig, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractReasoningMiddleware, generateObject, generateText, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDataUIPart, isDeepEqualData, isFileUIPart, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, userModelMessageSchema, validateUIMessages, wrapLanguageModel, wrapProvider };
         
     | 
| 
      
 5021 
     | 
    
         
            +
            export { AbstractChat, Agent, AsyncIterableStream, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DownloadError, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, ErrorHandler, ToolLoopAgent as Experimental_Agent, ToolLoopAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, Warning as Experimental_Warning, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferAgentUIMessage, InferGenerateOutput, InferStreamOutput, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoOutputSpecifiedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolApprovalRequestOutput, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolLoopAgent, ToolLoopAgentOnFinishCallback, ToolLoopAgentOnStepFinishCallback, ToolLoopAgentSettings, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultSettingsMiddleware, embed, embedMany, MCPClient as experimental_MCPClient, MCPClientConfig as experimental_MCPClientConfig, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractReasoningMiddleware, generateObject, generateText, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDataUIPart, isDeepEqualData, isFileUIPart, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, userModelMessageSchema, validateUIMessages, wrapLanguageModel, wrapProvider };
         
     | 
    
        package/dist/index.js
    CHANGED
    
    | 
         @@ -876,7 +876,7 @@ function detectMediaType({ 
     | 
|
| 
       876 
876 
     | 
    
         
             
            var import_provider_utils2 = require("@ai-sdk/provider-utils");
         
     | 
| 
       877 
877 
     | 
    
         | 
| 
       878 
878 
     | 
    
         
             
            // src/version.ts
         
     | 
| 
       879 
     | 
    
         
            -
            var VERSION = true ? "6.0.0-beta. 
     | 
| 
      
 879 
     | 
    
         
            +
            var VERSION = true ? "6.0.0-beta.69" : "0.0.0-test";
         
     | 
| 
       880 
880 
     | 
    
         | 
| 
       881 
881 
     | 
    
         
             
            // src/util/download/download.ts
         
     | 
| 
       882 
882 
     | 
    
         
             
            var download = async ({ url }) => {
         
     | 
| 
         @@ -7291,13 +7291,13 @@ var DefaultEmbedResult = class { 
     | 
|
| 
       7291 
7291 
     | 
    
         
             
            var import_provider_utils21 = require("@ai-sdk/provider-utils");
         
     | 
| 
       7292 
7292 
     | 
    
         | 
| 
       7293 
7293 
     | 
    
         
             
            // src/util/split-array.ts
         
     | 
| 
       7294 
     | 
    
         
            -
            function splitArray( 
     | 
| 
      
 7294 
     | 
    
         
            +
            function splitArray(array2, chunkSize) {
         
     | 
| 
       7295 
7295 
     | 
    
         
             
              if (chunkSize <= 0) {
         
     | 
| 
       7296 
7296 
     | 
    
         
             
                throw new Error("chunkSize must be greater than 0");
         
     | 
| 
       7297 
7297 
     | 
    
         
             
              }
         
     | 
| 
       7298 
7298 
     | 
    
         
             
              const result = [];
         
     | 
| 
       7299 
     | 
    
         
            -
              for (let i = 0; i <  
     | 
| 
       7300 
     | 
    
         
            -
                result.push( 
     | 
| 
      
 7299 
     | 
    
         
            +
              for (let i = 0; i < array2.length; i += chunkSize) {
         
     | 
| 
      
 7300 
     | 
    
         
            +
                result.push(array2.slice(i, i + chunkSize));
         
     | 
| 
       7301 
7301 
     | 
    
         
             
              }
         
     | 
| 
       7302 
7302 
     | 
    
         
             
              return result;
         
     | 
| 
       7303 
7303 
     | 
    
         
             
            }
         
     | 
| 
         @@ -7808,9 +7808,9 @@ var arrayOutputStrategy = (schema) => { 
     | 
|
| 
       7808 
7808 
     | 
    
         
             
                        transform(chunk, controller) {
         
     | 
| 
       7809 
7809 
     | 
    
         
             
                          switch (chunk.type) {
         
     | 
| 
       7810 
7810 
     | 
    
         
             
                            case "object": {
         
     | 
| 
       7811 
     | 
    
         
            -
                              const  
     | 
| 
       7812 
     | 
    
         
            -
                              for (; publishedElements <  
     | 
| 
       7813 
     | 
    
         
            -
                                controller.enqueue( 
     | 
| 
      
 7811 
     | 
    
         
            +
                              const array2 = chunk.object;
         
     | 
| 
      
 7812 
     | 
    
         
            +
                              for (; publishedElements < array2.length; publishedElements++) {
         
     | 
| 
      
 7813 
     | 
    
         
            +
                                controller.enqueue(array2[publishedElements]);
         
     | 
| 
       7814 
7814 
     | 
    
         
             
                              }
         
     | 
| 
       7815 
7815 
     | 
    
         
             
                              break;
         
     | 
| 
       7816 
7816 
     | 
    
         
             
                            }
         
     | 
| 
         @@ -9119,18 +9119,20 @@ var DefaultSpeechResult = class { 
     | 
|
| 
       9119 
9119 
     | 
    
         
             
            // src/generate-text/output.ts
         
     | 
| 
       9120 
9120 
     | 
    
         
             
            var output_exports = {};
         
     | 
| 
       9121 
9121 
     | 
    
         
             
            __export(output_exports, {
         
     | 
| 
      
 9122 
     | 
    
         
            +
              array: () => array,
         
     | 
| 
       9122 
9123 
     | 
    
         
             
              object: () => object,
         
     | 
| 
       9123 
9124 
     | 
    
         
             
              text: () => text
         
     | 
| 
       9124 
9125 
     | 
    
         
             
            });
         
     | 
| 
      
 9126 
     | 
    
         
            +
            var import_provider28 = require("@ai-sdk/provider");
         
     | 
| 
       9125 
9127 
     | 
    
         
             
            var import_provider_utils29 = require("@ai-sdk/provider-utils");
         
     | 
| 
       9126 
9128 
     | 
    
         
             
            var text = () => ({
         
     | 
| 
       9127 
9129 
     | 
    
         
             
              type: "text",
         
     | 
| 
       9128 
9130 
     | 
    
         
             
              responseFormat: Promise.resolve({ type: "text" }),
         
     | 
| 
       9129 
     | 
    
         
            -
              async parsePartial({ text: text2 }) {
         
     | 
| 
       9130 
     | 
    
         
            -
                return { partial: text2 };
         
     | 
| 
       9131 
     | 
    
         
            -
              },
         
     | 
| 
       9132 
9131 
     | 
    
         
             
              async parseOutput({ text: text2 }) {
         
     | 
| 
       9133 
9132 
     | 
    
         
             
                return text2;
         
     | 
| 
      
 9133 
     | 
    
         
            +
              },
         
     | 
| 
      
 9134 
     | 
    
         
            +
              async parsePartial({ text: text2 }) {
         
     | 
| 
      
 9135 
     | 
    
         
            +
                return { partial: text2 };
         
     | 
| 
       9134 
9136 
     | 
    
         
             
              }
         
     | 
| 
       9135 
9137 
     | 
    
         
             
            });
         
     | 
| 
       9136 
9138 
     | 
    
         
             
            var object = ({
         
     | 
| 
         @@ -9143,24 +9145,78 @@ var object = ({ 
     | 
|
| 
       9143 
9145 
     | 
    
         
             
                  type: "json",
         
     | 
| 
       9144 
9146 
     | 
    
         
             
                  schema: jsonSchema3
         
     | 
| 
       9145 
9147 
     | 
    
         
             
                })),
         
     | 
| 
      
 9148 
     | 
    
         
            +
                async parseOutput({ text: text2 }, context) {
         
     | 
| 
      
 9149 
     | 
    
         
            +
                  const parseResult = await (0, import_provider_utils29.safeParseJSON)({ text: text2 });
         
     | 
| 
      
 9150 
     | 
    
         
            +
                  if (!parseResult.success) {
         
     | 
| 
      
 9151 
     | 
    
         
            +
                    throw new NoObjectGeneratedError({
         
     | 
| 
      
 9152 
     | 
    
         
            +
                      message: "No object generated: could not parse the response.",
         
     | 
| 
      
 9153 
     | 
    
         
            +
                      cause: parseResult.error,
         
     | 
| 
      
 9154 
     | 
    
         
            +
                      text: text2,
         
     | 
| 
      
 9155 
     | 
    
         
            +
                      response: context.response,
         
     | 
| 
      
 9156 
     | 
    
         
            +
                      usage: context.usage,
         
     | 
| 
      
 9157 
     | 
    
         
            +
                      finishReason: context.finishReason
         
     | 
| 
      
 9158 
     | 
    
         
            +
                    });
         
     | 
| 
      
 9159 
     | 
    
         
            +
                  }
         
     | 
| 
      
 9160 
     | 
    
         
            +
                  const validationResult = await (0, import_provider_utils29.safeValidateTypes)({
         
     | 
| 
      
 9161 
     | 
    
         
            +
                    value: parseResult.value,
         
     | 
| 
      
 9162 
     | 
    
         
            +
                    schema
         
     | 
| 
      
 9163 
     | 
    
         
            +
                  });
         
     | 
| 
      
 9164 
     | 
    
         
            +
                  if (!validationResult.success) {
         
     | 
| 
      
 9165 
     | 
    
         
            +
                    throw new NoObjectGeneratedError({
         
     | 
| 
      
 9166 
     | 
    
         
            +
                      message: "No object generated: response did not match schema.",
         
     | 
| 
      
 9167 
     | 
    
         
            +
                      cause: validationResult.error,
         
     | 
| 
      
 9168 
     | 
    
         
            +
                      text: text2,
         
     | 
| 
      
 9169 
     | 
    
         
            +
                      response: context.response,
         
     | 
| 
      
 9170 
     | 
    
         
            +
                      usage: context.usage,
         
     | 
| 
      
 9171 
     | 
    
         
            +
                      finishReason: context.finishReason
         
     | 
| 
      
 9172 
     | 
    
         
            +
                    });
         
     | 
| 
      
 9173 
     | 
    
         
            +
                  }
         
     | 
| 
      
 9174 
     | 
    
         
            +
                  return validationResult.value;
         
     | 
| 
      
 9175 
     | 
    
         
            +
                },
         
     | 
| 
       9146 
9176 
     | 
    
         
             
                async parsePartial({ text: text2 }) {
         
     | 
| 
       9147 
9177 
     | 
    
         
             
                  const result = await parsePartialJson(text2);
         
     | 
| 
       9148 
9178 
     | 
    
         
             
                  switch (result.state) {
         
     | 
| 
       9149 
9179 
     | 
    
         
             
                    case "failed-parse":
         
     | 
| 
       9150 
     | 
    
         
            -
                    case "undefined-input":
         
     | 
| 
      
 9180 
     | 
    
         
            +
                    case "undefined-input": {
         
     | 
| 
       9151 
9181 
     | 
    
         
             
                      return void 0;
         
     | 
| 
      
 9182 
     | 
    
         
            +
                    }
         
     | 
| 
       9152 
9183 
     | 
    
         
             
                    case "repaired-parse":
         
     | 
| 
       9153 
     | 
    
         
            -
                    case "successful-parse":
         
     | 
| 
      
 9184 
     | 
    
         
            +
                    case "successful-parse": {
         
     | 
| 
       9154 
9185 
     | 
    
         
             
                      return {
         
     | 
| 
       9155 
9186 
     | 
    
         
             
                        // Note: currently no validation of partial results:
         
     | 
| 
       9156 
9187 
     | 
    
         
             
                        partial: result.value
         
     | 
| 
       9157 
9188 
     | 
    
         
             
                      };
         
     | 
| 
      
 9189 
     | 
    
         
            +
                    }
         
     | 
| 
       9158 
9190 
     | 
    
         
             
                    default: {
         
     | 
| 
       9159 
9191 
     | 
    
         
             
                      const _exhaustiveCheck = result.state;
         
     | 
| 
       9160 
9192 
     | 
    
         
             
                      throw new Error(`Unsupported parse state: ${_exhaustiveCheck}`);
         
     | 
| 
       9161 
9193 
     | 
    
         
             
                    }
         
     | 
| 
       9162 
9194 
     | 
    
         
             
                  }
         
     | 
| 
       9163 
     | 
    
         
            -
                } 
     | 
| 
      
 9195 
     | 
    
         
            +
                }
         
     | 
| 
      
 9196 
     | 
    
         
            +
              };
         
     | 
| 
      
 9197 
     | 
    
         
            +
            };
         
     | 
| 
      
 9198 
     | 
    
         
            +
            var array = ({
         
     | 
| 
      
 9199 
     | 
    
         
            +
              element: inputElementSchema
         
     | 
| 
      
 9200 
     | 
    
         
            +
            }) => {
         
     | 
| 
      
 9201 
     | 
    
         
            +
              const elementSchema = (0, import_provider_utils29.asSchema)(inputElementSchema);
         
     | 
| 
      
 9202 
     | 
    
         
            +
              return {
         
     | 
| 
      
 9203 
     | 
    
         
            +
                type: "object",
         
     | 
| 
      
 9204 
     | 
    
         
            +
                // returns a JSON schema that describes an array of elements:
         
     | 
| 
      
 9205 
     | 
    
         
            +
                responseFormat: (0, import_provider_utils29.resolve)(elementSchema.jsonSchema).then((jsonSchema3) => {
         
     | 
| 
      
 9206 
     | 
    
         
            +
                  const { $schema, ...itemSchema } = jsonSchema3;
         
     | 
| 
      
 9207 
     | 
    
         
            +
                  return {
         
     | 
| 
      
 9208 
     | 
    
         
            +
                    type: "json",
         
     | 
| 
      
 9209 
     | 
    
         
            +
                    schema: {
         
     | 
| 
      
 9210 
     | 
    
         
            +
                      $schema: "http://json-schema.org/draft-07/schema#",
         
     | 
| 
      
 9211 
     | 
    
         
            +
                      type: "object",
         
     | 
| 
      
 9212 
     | 
    
         
            +
                      properties: {
         
     | 
| 
      
 9213 
     | 
    
         
            +
                        elements: { type: "array", items: itemSchema }
         
     | 
| 
      
 9214 
     | 
    
         
            +
                      },
         
     | 
| 
      
 9215 
     | 
    
         
            +
                      required: ["elements"],
         
     | 
| 
      
 9216 
     | 
    
         
            +
                      additionalProperties: false
         
     | 
| 
      
 9217 
     | 
    
         
            +
                    }
         
     | 
| 
      
 9218 
     | 
    
         
            +
                  };
         
     | 
| 
      
 9219 
     | 
    
         
            +
                }),
         
     | 
| 
       9164 
9220 
     | 
    
         
             
                async parseOutput({ text: text2 }, context) {
         
     | 
| 
       9165 
9221 
     | 
    
         
             
                  const parseResult = await (0, import_provider_utils29.safeParseJSON)({ text: text2 });
         
     | 
| 
       9166 
9222 
     | 
    
         
             
                  if (!parseResult.success) {
         
     | 
| 
         @@ -9173,21 +9229,69 @@ var object = ({ 
     | 
|
| 
       9173 
9229 
     | 
    
         
             
                      finishReason: context.finishReason
         
     | 
| 
       9174 
9230 
     | 
    
         
             
                    });
         
     | 
| 
       9175 
9231 
     | 
    
         
             
                  }
         
     | 
| 
       9176 
     | 
    
         
            -
                  const  
     | 
| 
       9177 
     | 
    
         
            -
             
     | 
| 
       9178 
     | 
    
         
            -
                    schema
         
     | 
| 
       9179 
     | 
    
         
            -
                  });
         
     | 
| 
       9180 
     | 
    
         
            -
                  if (!validationResult.success) {
         
     | 
| 
      
 9232 
     | 
    
         
            +
                  const outerValue = parseResult.value;
         
     | 
| 
      
 9233 
     | 
    
         
            +
                  if (outerValue == null || typeof outerValue !== "object" || !("elements" in outerValue) || !Array.isArray(outerValue.elements)) {
         
     | 
| 
       9181 
9234 
     | 
    
         
             
                    throw new NoObjectGeneratedError({
         
     | 
| 
       9182 
9235 
     | 
    
         
             
                      message: "No object generated: response did not match schema.",
         
     | 
| 
       9183 
     | 
    
         
            -
                      cause:  
     | 
| 
      
 9236 
     | 
    
         
            +
                      cause: new import_provider28.TypeValidationError({
         
     | 
| 
      
 9237 
     | 
    
         
            +
                        value: outerValue,
         
     | 
| 
      
 9238 
     | 
    
         
            +
                        cause: "response must be an object with an elements array"
         
     | 
| 
      
 9239 
     | 
    
         
            +
                      }),
         
     | 
| 
       9184 
9240 
     | 
    
         
             
                      text: text2,
         
     | 
| 
       9185 
9241 
     | 
    
         
             
                      response: context.response,
         
     | 
| 
       9186 
9242 
     | 
    
         
             
                      usage: context.usage,
         
     | 
| 
       9187 
9243 
     | 
    
         
             
                      finishReason: context.finishReason
         
     | 
| 
       9188 
9244 
     | 
    
         
             
                    });
         
     | 
| 
       9189 
9245 
     | 
    
         
             
                  }
         
     | 
| 
       9190 
     | 
    
         
            -
                   
     | 
| 
      
 9246 
     | 
    
         
            +
                  for (const element of outerValue.elements) {
         
     | 
| 
      
 9247 
     | 
    
         
            +
                    const validationResult = await (0, import_provider_utils29.safeValidateTypes)({
         
     | 
| 
      
 9248 
     | 
    
         
            +
                      value: element,
         
     | 
| 
      
 9249 
     | 
    
         
            +
                      schema: elementSchema
         
     | 
| 
      
 9250 
     | 
    
         
            +
                    });
         
     | 
| 
      
 9251 
     | 
    
         
            +
                    if (!validationResult.success) {
         
     | 
| 
      
 9252 
     | 
    
         
            +
                      throw new NoObjectGeneratedError({
         
     | 
| 
      
 9253 
     | 
    
         
            +
                        message: "No object generated: response did not match schema.",
         
     | 
| 
      
 9254 
     | 
    
         
            +
                        cause: validationResult.error,
         
     | 
| 
      
 9255 
     | 
    
         
            +
                        text: text2,
         
     | 
| 
      
 9256 
     | 
    
         
            +
                        response: context.response,
         
     | 
| 
      
 9257 
     | 
    
         
            +
                        usage: context.usage,
         
     | 
| 
      
 9258 
     | 
    
         
            +
                        finishReason: context.finishReason
         
     | 
| 
      
 9259 
     | 
    
         
            +
                      });
         
     | 
| 
      
 9260 
     | 
    
         
            +
                    }
         
     | 
| 
      
 9261 
     | 
    
         
            +
                  }
         
     | 
| 
      
 9262 
     | 
    
         
            +
                  return outerValue.elements;
         
     | 
| 
      
 9263 
     | 
    
         
            +
                },
         
     | 
| 
      
 9264 
     | 
    
         
            +
                async parsePartial({ text: text2 }) {
         
     | 
| 
      
 9265 
     | 
    
         
            +
                  const result = await parsePartialJson(text2);
         
     | 
| 
      
 9266 
     | 
    
         
            +
                  switch (result.state) {
         
     | 
| 
      
 9267 
     | 
    
         
            +
                    case "failed-parse":
         
     | 
| 
      
 9268 
     | 
    
         
            +
                    case "undefined-input": {
         
     | 
| 
      
 9269 
     | 
    
         
            +
                      return void 0;
         
     | 
| 
      
 9270 
     | 
    
         
            +
                    }
         
     | 
| 
      
 9271 
     | 
    
         
            +
                    case "repaired-parse":
         
     | 
| 
      
 9272 
     | 
    
         
            +
                    case "successful-parse": {
         
     | 
| 
      
 9273 
     | 
    
         
            +
                      const outerValue = result.value;
         
     | 
| 
      
 9274 
     | 
    
         
            +
                      if (outerValue == null || typeof outerValue !== "object" || !("elements" in outerValue) || !Array.isArray(outerValue.elements)) {
         
     | 
| 
      
 9275 
     | 
    
         
            +
                        return void 0;
         
     | 
| 
      
 9276 
     | 
    
         
            +
                      }
         
     | 
| 
      
 9277 
     | 
    
         
            +
                      const rawElements = result.state === "repaired-parse" && outerValue.elements.length > 0 ? outerValue.elements.slice(0, -1) : outerValue.elements;
         
     | 
| 
      
 9278 
     | 
    
         
            +
                      const parsedElements = [];
         
     | 
| 
      
 9279 
     | 
    
         
            +
                      for (const rawElement of rawElements) {
         
     | 
| 
      
 9280 
     | 
    
         
            +
                        const validationResult = await (0, import_provider_utils29.safeValidateTypes)({
         
     | 
| 
      
 9281 
     | 
    
         
            +
                          value: rawElement,
         
     | 
| 
      
 9282 
     | 
    
         
            +
                          schema: elementSchema
         
     | 
| 
      
 9283 
     | 
    
         
            +
                        });
         
     | 
| 
      
 9284 
     | 
    
         
            +
                        if (validationResult.success) {
         
     | 
| 
      
 9285 
     | 
    
         
            +
                          parsedElements.push(validationResult.value);
         
     | 
| 
      
 9286 
     | 
    
         
            +
                        }
         
     | 
| 
      
 9287 
     | 
    
         
            +
                      }
         
     | 
| 
      
 9288 
     | 
    
         
            +
                      return { partial: parsedElements };
         
     | 
| 
      
 9289 
     | 
    
         
            +
                    }
         
     | 
| 
      
 9290 
     | 
    
         
            +
                    default: {
         
     | 
| 
      
 9291 
     | 
    
         
            +
                      const _exhaustiveCheck = result.state;
         
     | 
| 
      
 9292 
     | 
    
         
            +
                      throw new Error(`Unsupported parse state: ${_exhaustiveCheck}`);
         
     | 
| 
      
 9293 
     | 
    
         
            +
                    }
         
     | 
| 
      
 9294 
     | 
    
         
            +
                  }
         
     | 
| 
       9191 
9295 
     | 
    
         
             
                }
         
     | 
| 
       9192 
9296 
     | 
    
         
             
              };
         
     | 
| 
       9193 
9297 
     | 
    
         
             
            };
         
     | 
| 
         @@ -9273,7 +9377,7 @@ function pruneMessages({ 
     | 
|
| 
       9273 
9377 
     | 
    
         | 
| 
       9274 
9378 
     | 
    
         
             
            // src/generate-text/smooth-stream.ts
         
     | 
| 
       9275 
9379 
     | 
    
         
             
            var import_provider_utils30 = require("@ai-sdk/provider-utils");
         
     | 
| 
       9276 
     | 
    
         
            -
            var  
     | 
| 
      
 9380 
     | 
    
         
            +
            var import_provider29 = require("@ai-sdk/provider");
         
     | 
| 
       9277 
9381 
     | 
    
         
             
            var CHUNKING_REGEXPS = {
         
     | 
| 
       9278 
9382 
     | 
    
         
             
              word: /\S+\s+/m,
         
     | 
| 
       9279 
9383 
     | 
    
         
             
              line: /\n+/m
         
     | 
| 
         @@ -9303,7 +9407,7 @@ function smoothStream({ 
     | 
|
| 
       9303 
9407 
     | 
    
         
             
              } else {
         
     | 
| 
       9304 
9408 
     | 
    
         
             
                const chunkingRegex = typeof chunking === "string" ? CHUNKING_REGEXPS[chunking] : chunking;
         
     | 
| 
       9305 
9409 
     | 
    
         
             
                if (chunkingRegex == null) {
         
     | 
| 
       9306 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9410 
     | 
    
         
            +
                  throw new import_provider29.InvalidArgumentError({
         
     | 
| 
       9307 
9411 
     | 
    
         
             
                    argument: "chunking",
         
     | 
| 
       9308 
9412 
     | 
    
         
             
                    message: `Chunking must be "word" or "line" or a RegExp. Received: ${chunking}`
         
     | 
| 
       9309 
9413 
     | 
    
         
             
                  });
         
     | 
| 
         @@ -9675,7 +9779,7 @@ function wrapProvider({ 
     | 
|
| 
       9675 
9779 
     | 
    
         
             
            }
         
     | 
| 
       9676 
9780 
     | 
    
         | 
| 
       9677 
9781 
     | 
    
         
             
            // src/registry/custom-provider.ts
         
     | 
| 
       9678 
     | 
    
         
            -
            var  
     | 
| 
      
 9782 
     | 
    
         
            +
            var import_provider30 = require("@ai-sdk/provider");
         
     | 
| 
       9679 
9783 
     | 
    
         
             
            function customProvider({
         
     | 
| 
       9680 
9784 
     | 
    
         
             
              languageModels,
         
     | 
| 
       9681 
9785 
     | 
    
         
             
              textEmbeddingModels,
         
     | 
| 
         @@ -9692,7 +9796,7 @@ function customProvider({ 
     | 
|
| 
       9692 
9796 
     | 
    
         
             
                  if (fallbackProvider) {
         
     | 
| 
       9693 
9797 
     | 
    
         
             
                    return fallbackProvider.languageModel(modelId);
         
     | 
| 
       9694 
9798 
     | 
    
         
             
                  }
         
     | 
| 
       9695 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9799 
     | 
    
         
            +
                  throw new import_provider30.NoSuchModelError({ modelId, modelType: "languageModel" });
         
     | 
| 
       9696 
9800 
     | 
    
         
             
                },
         
     | 
| 
       9697 
9801 
     | 
    
         
             
                textEmbeddingModel(modelId) {
         
     | 
| 
       9698 
9802 
     | 
    
         
             
                  if (textEmbeddingModels != null && modelId in textEmbeddingModels) {
         
     | 
| 
         @@ -9701,7 +9805,7 @@ function customProvider({ 
     | 
|
| 
       9701 
9805 
     | 
    
         
             
                  if (fallbackProvider) {
         
     | 
| 
       9702 
9806 
     | 
    
         
             
                    return fallbackProvider.textEmbeddingModel(modelId);
         
     | 
| 
       9703 
9807 
     | 
    
         
             
                  }
         
     | 
| 
       9704 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9808 
     | 
    
         
            +
                  throw new import_provider30.NoSuchModelError({ modelId, modelType: "textEmbeddingModel" });
         
     | 
| 
       9705 
9809 
     | 
    
         
             
                },
         
     | 
| 
       9706 
9810 
     | 
    
         
             
                imageModel(modelId) {
         
     | 
| 
       9707 
9811 
     | 
    
         
             
                  if (imageModels != null && modelId in imageModels) {
         
     | 
| 
         @@ -9710,7 +9814,7 @@ function customProvider({ 
     | 
|
| 
       9710 
9814 
     | 
    
         
             
                  if (fallbackProvider == null ? void 0 : fallbackProvider.imageModel) {
         
     | 
| 
       9711 
9815 
     | 
    
         
             
                    return fallbackProvider.imageModel(modelId);
         
     | 
| 
       9712 
9816 
     | 
    
         
             
                  }
         
     | 
| 
       9713 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9817 
     | 
    
         
            +
                  throw new import_provider30.NoSuchModelError({ modelId, modelType: "imageModel" });
         
     | 
| 
       9714 
9818 
     | 
    
         
             
                },
         
     | 
| 
       9715 
9819 
     | 
    
         
             
                transcriptionModel(modelId) {
         
     | 
| 
       9716 
9820 
     | 
    
         
             
                  if (transcriptionModels != null && modelId in transcriptionModels) {
         
     | 
| 
         @@ -9719,7 +9823,7 @@ function customProvider({ 
     | 
|
| 
       9719 
9823 
     | 
    
         
             
                  if (fallbackProvider == null ? void 0 : fallbackProvider.transcriptionModel) {
         
     | 
| 
       9720 
9824 
     | 
    
         
             
                    return fallbackProvider.transcriptionModel(modelId);
         
     | 
| 
       9721 
9825 
     | 
    
         
             
                  }
         
     | 
| 
       9722 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9826 
     | 
    
         
            +
                  throw new import_provider30.NoSuchModelError({ modelId, modelType: "transcriptionModel" });
         
     | 
| 
       9723 
9827 
     | 
    
         
             
                },
         
     | 
| 
       9724 
9828 
     | 
    
         
             
                speechModel(modelId) {
         
     | 
| 
       9725 
9829 
     | 
    
         
             
                  if (speechModels != null && modelId in speechModels) {
         
     | 
| 
         @@ -9728,19 +9832,19 @@ function customProvider({ 
     | 
|
| 
       9728 
9832 
     | 
    
         
             
                  if (fallbackProvider == null ? void 0 : fallbackProvider.speechModel) {
         
     | 
| 
       9729 
9833 
     | 
    
         
             
                    return fallbackProvider.speechModel(modelId);
         
     | 
| 
       9730 
9834 
     | 
    
         
             
                  }
         
     | 
| 
       9731 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9835 
     | 
    
         
            +
                  throw new import_provider30.NoSuchModelError({ modelId, modelType: "speechModel" });
         
     | 
| 
       9732 
9836 
     | 
    
         
             
                }
         
     | 
| 
       9733 
9837 
     | 
    
         
             
              };
         
     | 
| 
       9734 
9838 
     | 
    
         
             
            }
         
     | 
| 
       9735 
9839 
     | 
    
         
             
            var experimental_customProvider = customProvider;
         
     | 
| 
       9736 
9840 
     | 
    
         | 
| 
       9737 
9841 
     | 
    
         
             
            // src/registry/no-such-provider-error.ts
         
     | 
| 
       9738 
     | 
    
         
            -
            var  
     | 
| 
      
 9842 
     | 
    
         
            +
            var import_provider31 = require("@ai-sdk/provider");
         
     | 
| 
       9739 
9843 
     | 
    
         
             
            var name16 = "AI_NoSuchProviderError";
         
     | 
| 
       9740 
9844 
     | 
    
         
             
            var marker16 = `vercel.ai.error.${name16}`;
         
     | 
| 
       9741 
9845 
     | 
    
         
             
            var symbol16 = Symbol.for(marker16);
         
     | 
| 
       9742 
9846 
     | 
    
         
             
            var _a16;
         
     | 
| 
       9743 
     | 
    
         
            -
            var NoSuchProviderError = class extends  
     | 
| 
      
 9847 
     | 
    
         
            +
            var NoSuchProviderError = class extends import_provider31.NoSuchModelError {
         
     | 
| 
       9744 
9848 
     | 
    
         
             
              constructor({
         
     | 
| 
       9745 
9849 
     | 
    
         
             
                modelId,
         
     | 
| 
       9746 
9850 
     | 
    
         
             
                modelType,
         
     | 
| 
         @@ -9754,13 +9858,13 @@ var NoSuchProviderError = class extends import_provider30.NoSuchModelError { 
     | 
|
| 
       9754 
9858 
     | 
    
         
             
                this.availableProviders = availableProviders;
         
     | 
| 
       9755 
9859 
     | 
    
         
             
              }
         
     | 
| 
       9756 
9860 
     | 
    
         
             
              static isInstance(error) {
         
     | 
| 
       9757 
     | 
    
         
            -
                return  
     | 
| 
      
 9861 
     | 
    
         
            +
                return import_provider31.AISDKError.hasMarker(error, marker16);
         
     | 
| 
       9758 
9862 
     | 
    
         
             
              }
         
     | 
| 
       9759 
9863 
     | 
    
         
             
            };
         
     | 
| 
       9760 
9864 
     | 
    
         
             
            _a16 = symbol16;
         
     | 
| 
       9761 
9865 
     | 
    
         | 
| 
       9762 
9866 
     | 
    
         
             
            // src/registry/provider-registry.ts
         
     | 
| 
       9763 
     | 
    
         
            -
            var  
     | 
| 
      
 9867 
     | 
    
         
            +
            var import_provider32 = require("@ai-sdk/provider");
         
     | 
| 
       9764 
9868 
     | 
    
         
             
            function createProviderRegistry(providers, {
         
     | 
| 
       9765 
9869 
     | 
    
         
             
              separator = ":",
         
     | 
| 
       9766 
9870 
     | 
    
         
             
              languageModelMiddleware
         
     | 
| 
         @@ -9805,7 +9909,7 @@ var DefaultProviderRegistry = class { 
     | 
|
| 
       9805 
9909 
     | 
    
         
             
              splitId(id, modelType) {
         
     | 
| 
       9806 
9910 
     | 
    
         
             
                const index = id.indexOf(this.separator);
         
     | 
| 
       9807 
9911 
     | 
    
         
             
                if (index === -1) {
         
     | 
| 
       9808 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9912 
     | 
    
         
            +
                  throw new import_provider32.NoSuchModelError({
         
     | 
| 
       9809 
9913 
     | 
    
         
             
                    modelId: id,
         
     | 
| 
       9810 
9914 
     | 
    
         
             
                    modelType,
         
     | 
| 
       9811 
9915 
     | 
    
         
             
                    message: `Invalid ${modelType} id for registry: ${id} (must be in the format "providerId${this.separator}modelId")`
         
     | 
| 
         @@ -9821,7 +9925,7 @@ var DefaultProviderRegistry = class { 
     | 
|
| 
       9821 
9925 
     | 
    
         
             
                  modelId
         
     | 
| 
       9822 
9926 
     | 
    
         
             
                );
         
     | 
| 
       9823 
9927 
     | 
    
         
             
                if (model == null) {
         
     | 
| 
       9824 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9928 
     | 
    
         
            +
                  throw new import_provider32.NoSuchModelError({ modelId: id, modelType: "languageModel" });
         
     | 
| 
       9825 
9929 
     | 
    
         
             
                }
         
     | 
| 
       9826 
9930 
     | 
    
         
             
                if (this.languageModelMiddleware != null) {
         
     | 
| 
       9827 
9931 
     | 
    
         
             
                  model = wrapLanguageModel({
         
     | 
| 
         @@ -9837,7 +9941,7 @@ var DefaultProviderRegistry = class { 
     | 
|
| 
       9837 
9941 
     | 
    
         
             
                const provider = this.getProvider(providerId, "textEmbeddingModel");
         
     | 
| 
       9838 
9942 
     | 
    
         
             
                const model = (_a17 = provider.textEmbeddingModel) == null ? void 0 : _a17.call(provider, modelId);
         
     | 
| 
       9839 
9943 
     | 
    
         
             
                if (model == null) {
         
     | 
| 
       9840 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9944 
     | 
    
         
            +
                  throw new import_provider32.NoSuchModelError({
         
     | 
| 
       9841 
9945 
     | 
    
         
             
                    modelId: id,
         
     | 
| 
       9842 
9946 
     | 
    
         
             
                    modelType: "textEmbeddingModel"
         
     | 
| 
       9843 
9947 
     | 
    
         
             
                  });
         
     | 
| 
         @@ -9850,7 +9954,7 @@ var DefaultProviderRegistry = class { 
     | 
|
| 
       9850 
9954 
     | 
    
         
             
                const provider = this.getProvider(providerId, "imageModel");
         
     | 
| 
       9851 
9955 
     | 
    
         
             
                const model = (_a17 = provider.imageModel) == null ? void 0 : _a17.call(provider, modelId);
         
     | 
| 
       9852 
9956 
     | 
    
         
             
                if (model == null) {
         
     | 
| 
       9853 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9957 
     | 
    
         
            +
                  throw new import_provider32.NoSuchModelError({ modelId: id, modelType: "imageModel" });
         
     | 
| 
       9854 
9958 
     | 
    
         
             
                }
         
     | 
| 
       9855 
9959 
     | 
    
         
             
                return model;
         
     | 
| 
       9856 
9960 
     | 
    
         
             
              }
         
     | 
| 
         @@ -9860,7 +9964,7 @@ var DefaultProviderRegistry = class { 
     | 
|
| 
       9860 
9964 
     | 
    
         
             
                const provider = this.getProvider(providerId, "transcriptionModel");
         
     | 
| 
       9861 
9965 
     | 
    
         
             
                const model = (_a17 = provider.transcriptionModel) == null ? void 0 : _a17.call(provider, modelId);
         
     | 
| 
       9862 
9966 
     | 
    
         
             
                if (model == null) {
         
     | 
| 
       9863 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9967 
     | 
    
         
            +
                  throw new import_provider32.NoSuchModelError({
         
     | 
| 
       9864 
9968 
     | 
    
         
             
                    modelId: id,
         
     | 
| 
       9865 
9969 
     | 
    
         
             
                    modelType: "transcriptionModel"
         
     | 
| 
       9866 
9970 
     | 
    
         
             
                  });
         
     | 
| 
         @@ -9873,7 +9977,7 @@ var DefaultProviderRegistry = class { 
     | 
|
| 
       9873 
9977 
     | 
    
         
             
                const provider = this.getProvider(providerId, "speechModel");
         
     | 
| 
       9874 
9978 
     | 
    
         
             
                const model = (_a17 = provider.speechModel) == null ? void 0 : _a17.call(provider, modelId);
         
     | 
| 
       9875 
9979 
     | 
    
         
             
                if (model == null) {
         
     | 
| 
       9876 
     | 
    
         
            -
                  throw new  
     | 
| 
      
 9980 
     | 
    
         
            +
                  throw new import_provider32.NoSuchModelError({ modelId: id, modelType: "speechModel" });
         
     | 
| 
       9877 
9981 
     | 
    
         
             
                }
         
     | 
| 
       9878 
9982 
     | 
    
         
             
                return model;
         
     | 
| 
       9879 
9983 
     | 
    
         
             
              }
         
     | 
| 
         @@ -10460,8 +10564,8 @@ var DefaultMCPClient = class { 
     | 
|
| 
       10460 
10564 
     | 
    
         
             
            var import_provider_utils33 = require("@ai-sdk/provider-utils");
         
     | 
| 
       10461 
10565 
     | 
    
         | 
| 
       10462 
10566 
     | 
    
         
             
            // src/error/no-transcript-generated-error.ts
         
     | 
| 
       10463 
     | 
    
         
            -
            var  
     | 
| 
       10464 
     | 
    
         
            -
            var NoTranscriptGeneratedError = class extends  
     | 
| 
      
 10567 
     | 
    
         
            +
            var import_provider33 = require("@ai-sdk/provider");
         
     | 
| 
      
 10568 
     | 
    
         
            +
            var NoTranscriptGeneratedError = class extends import_provider33.AISDKError {
         
     | 
| 
       10465 
10569 
     | 
    
         
             
              constructor(options) {
         
     | 
| 
       10466 
10570 
     | 
    
         
             
                super({
         
     | 
| 
       10467 
10571 
     | 
    
         
             
                  name: "AI_NoTranscriptGeneratedError",
         
     |