ai 6.0.0-beta.71 → 6.0.0-beta.73
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 +26 -0
 - package/dist/index.d.mts +10 -192
 - package/dist/index.d.ts +10 -192
 - package/dist/index.js +408 -1014
 - package/dist/index.js.map +1 -1
 - package/dist/index.mjs +332 -944
 - 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 -8
 - package/dist/mcp-stdio/index.d.mts +0 -89
 - package/dist/mcp-stdio/index.d.ts +0 -89
 - package/dist/mcp-stdio/index.js +0 -353
 - package/dist/mcp-stdio/index.js.map +0 -1
 - package/dist/mcp-stdio/index.mjs +0 -326
 - package/dist/mcp-stdio/index.mjs.map +0 -1
 - package/mcp-stdio.d.ts +0 -1
 
    
        package/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,5 +1,31 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # ai
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            ## 6.0.0-beta.73
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            ### Patch Changes
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            - 754df61: fix(ai): correct type field in arrayOutputStrategy from 'enum' to 'array'
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            ## 6.0.0-beta.72
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ### Patch Changes
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            - eca63f3: feat(ai): add OAuth for MCP clients + refactor to new package
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              This change replaces
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              ```ts
         
     | 
| 
      
 18 
     | 
    
         
            +
              import { experimental_createMCPClient } from 'ai';
         
     | 
| 
      
 19 
     | 
    
         
            +
              import { Experimental_StdioMCPTransport } from 'ai/mcp-stdio';
         
     | 
| 
      
 20 
     | 
    
         
            +
              ```
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              with
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              ```ts
         
     | 
| 
      
 25 
     | 
    
         
            +
              import { experimental_createMCPClient } from '@ai-sdk/mcp';
         
     | 
| 
      
 26 
     | 
    
         
            +
              import { Experimental_StdioMCPTransport } from '@ai-sdk/mcp/mcp-stdio';
         
     | 
| 
      
 27 
     | 
    
         
            +
              ```
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
       3 
29 
     | 
    
         
             
            ## 6.0.0-beta.71
         
     | 
| 
       4 
30 
     | 
    
         | 
| 
       5 
31 
     | 
    
         
             
            ### Patch Changes
         
     | 
    
        package/dist/index.d.mts
    CHANGED
    
    | 
         @@ -3,7 +3,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils'; 
     | 
|
| 
       3 
3 
     | 
    
         
             
            import { Tool, InferToolInput, InferToolOutput, AssistantModelMessage, ToolModelMessage, ReasoningPart, FlexibleSchema, InferSchema, ModelMessage, SystemModelMessage, UserModelMessage, ProviderOptions, IdGenerator, ToolCall, MaybePromiseLike, TextPart, FilePart, Resolvable, FetchFunction, DataContent } from '@ai-sdk/provider-utils';
         
     | 
| 
       4 
4 
     | 
    
         
             
            export { AssistantContent, AssistantModelMessage, DataContent, FilePart, FlexibleSchema, IdGenerator, ImagePart, InferSchema, InferToolInput, InferToolOutput, ModelMessage, Schema, SystemModelMessage, TextPart, Tool, ToolApprovalRequest, ToolApprovalResponse, ToolCallOptions, ToolCallPart, ToolContent, ToolExecuteFunction, ToolModelMessage, ToolResultPart, UserContent, UserModelMessage, asSchema, createIdGenerator, dynamicTool, generateId, jsonSchema, parseJsonEventStream, tool, zodSchema } from '@ai-sdk/provider-utils';
         
     | 
| 
       5 
5 
     | 
    
         
             
            import * as _ai_sdk_provider from '@ai-sdk/provider';
         
     | 
| 
       6 
     | 
    
         
            -
            import { EmbeddingModelV3, EmbeddingModelV2, EmbeddingModelV3Embedding, ImageModelV3, ImageModelV3CallWarning, ImageModelV3ProviderMetadata, JSONValue as JSONValue$1, LanguageModelV3, LanguageModelV2, LanguageModelV3FinishReason, LanguageModelV3CallWarning, LanguageModelV3Source, LanguageModelV3Middleware, SharedV3ProviderMetadata, SpeechModelV3, SpeechModelV2, SpeechModelV3CallWarning, TranscriptionModelV3, TranscriptionModelV2, TranscriptionModelV3CallWarning, LanguageModelV3Usage, LanguageModelV3CallOptions, AISDKError, LanguageModelV3ToolCall, JSONSchema7, JSONParseError, TypeValidationError, ProviderV3, ProviderV2, NoSuchModelError 
     | 
| 
      
 6 
     | 
    
         
            +
            import { EmbeddingModelV3, EmbeddingModelV2, EmbeddingModelV3Embedding, ImageModelV3, ImageModelV3CallWarning, ImageModelV3ProviderMetadata, JSONValue as JSONValue$1, LanguageModelV3, LanguageModelV2, LanguageModelV3FinishReason, LanguageModelV3CallWarning, LanguageModelV3Source, LanguageModelV3Middleware, SharedV3ProviderMetadata, SpeechModelV3, SpeechModelV2, SpeechModelV3CallWarning, TranscriptionModelV3, TranscriptionModelV2, TranscriptionModelV3CallWarning, LanguageModelV3Usage, LanguageModelV3CallOptions, AISDKError, LanguageModelV3ToolCall, JSONSchema7, JSONParseError, TypeValidationError, ProviderV3, ProviderV2, NoSuchModelError } from '@ai-sdk/provider';
         
     | 
| 
       7 
7 
     | 
    
         
             
            export { AISDKError, APICallError, EmptyResponseBodyError, InvalidPromptError, InvalidResponseDataError, JSONParseError, JSONSchema7, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, TooManyEmbeddingValuesForCallError, TypeValidationError, UnsupportedFunctionalityError } from '@ai-sdk/provider';
         
     | 
| 
       8 
8 
     | 
    
         
             
            import { ServerResponse } from 'node:http';
         
     | 
| 
       9 
9 
     | 
    
         
             
            import { AttributeValue, Tracer } from '@opentelemetry/api';
         
     | 
| 
         @@ -934,9 +934,9 @@ type StopCondition<TOOLS extends ToolSet> = (options: { 
     | 
|
| 
       934 
934 
     | 
    
         
             
            declare function stepCountIs(stepCount: number): StopCondition<any>;
         
     | 
| 
       935 
935 
     | 
    
         
             
            declare function hasToolCall(toolName: string): StopCondition<any>;
         
     | 
| 
       936 
936 
     | 
    
         | 
| 
       937 
     | 
    
         
            -
            declare const symbol$ 
     | 
| 
      
 937 
     | 
    
         
            +
            declare const symbol$e: unique symbol;
         
     | 
| 
       938 
938 
     | 
    
         
             
            declare class InvalidToolInputError extends AISDKError {
         
     | 
| 
       939 
     | 
    
         
            -
                private readonly [symbol$ 
     | 
| 
      
 939 
     | 
    
         
            +
                private readonly [symbol$e];
         
     | 
| 
       940 
940 
     | 
    
         
             
                readonly toolName: string;
         
     | 
| 
       941 
941 
     | 
    
         
             
                readonly toolInput: string;
         
     | 
| 
       942 
942 
     | 
    
         
             
                constructor({ toolInput, toolName, cause, message, }: {
         
     | 
| 
         @@ -948,9 +948,9 @@ declare class InvalidToolInputError extends AISDKError { 
     | 
|
| 
       948 
948 
     | 
    
         
             
                static isInstance(error: unknown): error is InvalidToolInputError;
         
     | 
| 
       949 
949 
     | 
    
         
             
            }
         
     | 
| 
       950 
950 
     | 
    
         | 
| 
       951 
     | 
    
         
            -
            declare const symbol$ 
     | 
| 
      
 951 
     | 
    
         
            +
            declare const symbol$d: unique symbol;
         
     | 
| 
       952 
952 
     | 
    
         
             
            declare class NoSuchToolError extends AISDKError {
         
     | 
| 
       953 
     | 
    
         
            -
                private readonly [symbol$ 
     | 
| 
      
 953 
     | 
    
         
            +
                private readonly [symbol$d];
         
     | 
| 
       954 
954 
     | 
    
         
             
                readonly toolName: string;
         
     | 
| 
       955 
955 
     | 
    
         
             
                readonly availableTools: string[] | undefined;
         
     | 
| 
       956 
956 
     | 
    
         
             
                constructor({ toolName, availableTools, message, }: {
         
     | 
| 
         @@ -3528,9 +3528,9 @@ declare function embedMany<VALUE = string>({ model: modelArg, values, maxParalle 
     | 
|
| 
       3528 
3528 
     | 
    
         
             
                maxParallelCalls?: number;
         
     | 
| 
       3529 
3529 
     | 
    
         
             
            }): Promise<EmbedManyResult<VALUE>>;
         
     | 
| 
       3530 
3530 
     | 
    
         | 
| 
       3531 
     | 
    
         
            -
            declare const symbol$ 
     | 
| 
      
 3531 
     | 
    
         
            +
            declare const symbol$c: unique symbol;
         
     | 
| 
       3532 
3532 
     | 
    
         
             
            declare class InvalidArgumentError extends AISDKError {
         
     | 
| 
       3533 
     | 
    
         
            -
                private readonly [symbol$ 
     | 
| 
      
 3533 
     | 
    
         
            +
                private readonly [symbol$c];
         
     | 
| 
       3534 
3534 
     | 
    
         
             
                readonly parameter: string;
         
     | 
| 
       3535 
3535 
     | 
    
         
             
                readonly value: unknown;
         
     | 
| 
       3536 
3536 
     | 
    
         
             
                constructor({ parameter, value, message, }: {
         
     | 
| 
         @@ -3617,9 +3617,9 @@ type SingleRequestTextStreamPart<TOOLS extends ToolSet> = { 
     | 
|
| 
       3617 
3617 
     | 
    
         
             
                rawValue: unknown;
         
     | 
| 
       3618 
3618 
     | 
    
         
             
            };
         
     | 
| 
       3619 
3619 
     | 
    
         | 
| 
       3620 
     | 
    
         
            -
            declare const symbol$ 
     | 
| 
      
 3620 
     | 
    
         
            +
            declare const symbol$b: unique symbol;
         
     | 
| 
       3621 
3621 
     | 
    
         
             
            declare class InvalidStreamPartError extends AISDKError {
         
     | 
| 
       3622 
     | 
    
         
            -
                private readonly [symbol$ 
     | 
| 
      
 3622 
     | 
    
         
            +
                private readonly [symbol$b];
         
     | 
| 
       3623 
3623 
     | 
    
         
             
                readonly chunk: SingleRequestTextStreamPart<any>;
         
     | 
| 
       3624 
3624 
     | 
    
         
             
                constructor({ chunk, message, }: {
         
     | 
| 
       3625 
3625 
     | 
    
         
             
                    chunk: SingleRequestTextStreamPart<any>;
         
     | 
| 
         @@ -3628,24 +3628,6 @@ declare class InvalidStreamPartError extends AISDKError { 
     | 
|
| 
       3628 
3628 
     | 
    
         
             
                static isInstance(error: unknown): error is InvalidStreamPartError;
         
     | 
| 
       3629 
3629 
     | 
    
         
             
            }
         
     | 
| 
       3630 
3630 
     | 
    
         | 
| 
       3631 
     | 
    
         
            -
            declare const symbol$b: unique symbol;
         
     | 
| 
       3632 
     | 
    
         
            -
            /**
         
     | 
| 
       3633 
     | 
    
         
            -
             * An error occurred with the MCP client.
         
     | 
| 
       3634 
     | 
    
         
            -
             */
         
     | 
| 
       3635 
     | 
    
         
            -
            declare class MCPClientError extends AISDKError {
         
     | 
| 
       3636 
     | 
    
         
            -
                private readonly [symbol$b];
         
     | 
| 
       3637 
     | 
    
         
            -
                readonly data?: unknown;
         
     | 
| 
       3638 
     | 
    
         
            -
                readonly code?: number;
         
     | 
| 
       3639 
     | 
    
         
            -
                constructor({ name, message, cause, data, code, }: {
         
     | 
| 
       3640 
     | 
    
         
            -
                    name?: string;
         
     | 
| 
       3641 
     | 
    
         
            -
                    message: string;
         
     | 
| 
       3642 
     | 
    
         
            -
                    cause?: unknown;
         
     | 
| 
       3643 
     | 
    
         
            -
                    data?: unknown;
         
     | 
| 
       3644 
     | 
    
         
            -
                    code?: number;
         
     | 
| 
       3645 
     | 
    
         
            -
                });
         
     | 
| 
       3646 
     | 
    
         
            -
                static isInstance(error: unknown): error is MCPClientError;
         
     | 
| 
       3647 
     | 
    
         
            -
            }
         
     | 
| 
       3648 
     | 
    
         
            -
             
     | 
| 
       3649 
3631 
     | 
    
         
             
            declare const symbol$a: unique symbol;
         
     | 
| 
       3650 
3632 
     | 
    
         
             
            /**
         
     | 
| 
       3651 
3633 
     | 
    
         
             
            Thrown when no image could be generated. This can have multiple causes:
         
     | 
| 
         @@ -4775,170 +4757,6 @@ declare function pipeTextStreamToResponse({ response, status, statusText, header 
     | 
|
| 
       4775 
4757 
     | 
    
         
             
                textStream: ReadableStream<string>;
         
     | 
| 
       4776 
4758 
     | 
    
         
             
            } & ResponseInit): void;
         
     | 
| 
       4777 
4759 
     | 
    
         | 
| 
       4778 
     | 
    
         
            -
            declare const JSONRPCRequestSchema: z.ZodObject<{
         
     | 
| 
       4779 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4780 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4781 
     | 
    
         
            -
                method: z.ZodString;
         
     | 
| 
       4782 
     | 
    
         
            -
                params: z.ZodOptional<z.ZodObject<{
         
     | 
| 
       4783 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4784 
     | 
    
         
            -
                }, z.core.$loose>>;
         
     | 
| 
       4785 
     | 
    
         
            -
            }, z.core.$strict>;
         
     | 
| 
       4786 
     | 
    
         
            -
            type JSONRPCRequest = z.infer<typeof JSONRPCRequestSchema>;
         
     | 
| 
       4787 
     | 
    
         
            -
            declare const JSONRPCResponseSchema: z.ZodObject<{
         
     | 
| 
       4788 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4789 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4790 
     | 
    
         
            -
                result: z.ZodObject<{
         
     | 
| 
       4791 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4792 
     | 
    
         
            -
                }, z.core.$loose>;
         
     | 
| 
       4793 
     | 
    
         
            -
            }, z.core.$strict>;
         
     | 
| 
       4794 
     | 
    
         
            -
            type JSONRPCResponse = z.infer<typeof JSONRPCResponseSchema>;
         
     | 
| 
       4795 
     | 
    
         
            -
            declare const JSONRPCErrorSchema: z.ZodObject<{
         
     | 
| 
       4796 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4797 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4798 
     | 
    
         
            -
                error: z.ZodObject<{
         
     | 
| 
       4799 
     | 
    
         
            -
                    code: z.ZodNumber;
         
     | 
| 
       4800 
     | 
    
         
            -
                    message: z.ZodString;
         
     | 
| 
       4801 
     | 
    
         
            -
                    data: z.ZodOptional<z.ZodUnknown>;
         
     | 
| 
       4802 
     | 
    
         
            -
                }, z.core.$strip>;
         
     | 
| 
       4803 
     | 
    
         
            -
            }, z.core.$strict>;
         
     | 
| 
       4804 
     | 
    
         
            -
            type JSONRPCError = z.infer<typeof JSONRPCErrorSchema>;
         
     | 
| 
       4805 
     | 
    
         
            -
            declare const JSONRPCNotificationSchema: z.ZodObject<{
         
     | 
| 
       4806 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4807 
     | 
    
         
            -
                method: z.ZodString;
         
     | 
| 
       4808 
     | 
    
         
            -
                params: z.ZodOptional<z.ZodObject<{
         
     | 
| 
       4809 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4810 
     | 
    
         
            -
                }, z.core.$loose>>;
         
     | 
| 
       4811 
     | 
    
         
            -
            }, z.core.$strict>;
         
     | 
| 
       4812 
     | 
    
         
            -
            type JSONRPCNotification = z.infer<typeof JSONRPCNotificationSchema>;
         
     | 
| 
       4813 
     | 
    
         
            -
            declare const JSONRPCMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
         
     | 
| 
       4814 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4815 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4816 
     | 
    
         
            -
                method: z.ZodString;
         
     | 
| 
       4817 
     | 
    
         
            -
                params: z.ZodOptional<z.ZodObject<{
         
     | 
| 
       4818 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4819 
     | 
    
         
            -
                }, z.core.$loose>>;
         
     | 
| 
       4820 
     | 
    
         
            -
            }, z.core.$strict>, z.ZodObject<{
         
     | 
| 
       4821 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4822 
     | 
    
         
            -
                method: z.ZodString;
         
     | 
| 
       4823 
     | 
    
         
            -
                params: z.ZodOptional<z.ZodObject<{
         
     | 
| 
       4824 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4825 
     | 
    
         
            -
                }, z.core.$loose>>;
         
     | 
| 
       4826 
     | 
    
         
            -
            }, z.core.$strict>, z.ZodObject<{
         
     | 
| 
       4827 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4828 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4829 
     | 
    
         
            -
                result: z.ZodObject<{
         
     | 
| 
       4830 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4831 
     | 
    
         
            -
                }, z.core.$loose>;
         
     | 
| 
       4832 
     | 
    
         
            -
            }, z.core.$strict>, z.ZodObject<{
         
     | 
| 
       4833 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4834 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4835 
     | 
    
         
            -
                error: z.ZodObject<{
         
     | 
| 
       4836 
     | 
    
         
            -
                    code: z.ZodNumber;
         
     | 
| 
       4837 
     | 
    
         
            -
                    message: z.ZodString;
         
     | 
| 
       4838 
     | 
    
         
            -
                    data: z.ZodOptional<z.ZodUnknown>;
         
     | 
| 
       4839 
     | 
    
         
            -
                }, z.core.$strip>;
         
     | 
| 
       4840 
     | 
    
         
            -
            }, z.core.$strict>]>;
         
     | 
| 
       4841 
     | 
    
         
            -
            type JSONRPCMessage = z.infer<typeof JSONRPCMessageSchema>;
         
     | 
| 
       4842 
     | 
    
         
            -
             
     | 
| 
       4843 
     | 
    
         
            -
            /**
         
     | 
| 
       4844 
     | 
    
         
            -
             * Transport interface for MCP (Model Context Protocol) communication.
         
     | 
| 
       4845 
     | 
    
         
            -
             * Maps to the `Transport` interface in the MCP spec.
         
     | 
| 
       4846 
     | 
    
         
            -
             */
         
     | 
| 
       4847 
     | 
    
         
            -
            interface MCPTransport {
         
     | 
| 
       4848 
     | 
    
         
            -
                /**
         
     | 
| 
       4849 
     | 
    
         
            -
                 * Initialize and start the transport
         
     | 
| 
       4850 
     | 
    
         
            -
                 */
         
     | 
| 
       4851 
     | 
    
         
            -
                start(): Promise<void>;
         
     | 
| 
       4852 
     | 
    
         
            -
                /**
         
     | 
| 
       4853 
     | 
    
         
            -
                 * Send a JSON-RPC message through the transport
         
     | 
| 
       4854 
     | 
    
         
            -
                 * @param message The JSON-RPC message to send
         
     | 
| 
       4855 
     | 
    
         
            -
                 */
         
     | 
| 
       4856 
     | 
    
         
            -
                send(message: JSONRPCMessage): Promise<void>;
         
     | 
| 
       4857 
     | 
    
         
            -
                /**
         
     | 
| 
       4858 
     | 
    
         
            -
                 * Clean up and close the transport
         
     | 
| 
       4859 
     | 
    
         
            -
                 */
         
     | 
| 
       4860 
     | 
    
         
            -
                close(): Promise<void>;
         
     | 
| 
       4861 
     | 
    
         
            -
                /**
         
     | 
| 
       4862 
     | 
    
         
            -
                 * Event handler for transport closure
         
     | 
| 
       4863 
     | 
    
         
            -
                 */
         
     | 
| 
       4864 
     | 
    
         
            -
                onclose?: () => void;
         
     | 
| 
       4865 
     | 
    
         
            -
                /**
         
     | 
| 
       4866 
     | 
    
         
            -
                 * Event handler for transport errors
         
     | 
| 
       4867 
     | 
    
         
            -
                 */
         
     | 
| 
       4868 
     | 
    
         
            -
                onerror?: (error: Error) => void;
         
     | 
| 
       4869 
     | 
    
         
            -
                /**
         
     | 
| 
       4870 
     | 
    
         
            -
                 * Event handler for received messages
         
     | 
| 
       4871 
     | 
    
         
            -
                 */
         
     | 
| 
       4872 
     | 
    
         
            -
                onmessage?: (message: JSONRPCMessage) => void;
         
     | 
| 
       4873 
     | 
    
         
            -
            }
         
     | 
| 
       4874 
     | 
    
         
            -
            type MCPTransportConfig = {
         
     | 
| 
       4875 
     | 
    
         
            -
                type: 'sse';
         
     | 
| 
       4876 
     | 
    
         
            -
                /**
         
     | 
| 
       4877 
     | 
    
         
            -
                 * The URL of the MCP server.
         
     | 
| 
       4878 
     | 
    
         
            -
                 */
         
     | 
| 
       4879 
     | 
    
         
            -
                url: string;
         
     | 
| 
       4880 
     | 
    
         
            -
                /**
         
     | 
| 
       4881 
     | 
    
         
            -
                 * Additional HTTP headers to be sent with requests.
         
     | 
| 
       4882 
     | 
    
         
            -
                 */
         
     | 
| 
       4883 
     | 
    
         
            -
                headers?: Record<string, string>;
         
     | 
| 
       4884 
     | 
    
         
            -
            };
         
     | 
| 
       4885 
     | 
    
         
            -
             
     | 
| 
       4886 
     | 
    
         
            -
            type ToolSchemas = Record<string, {
         
     | 
| 
       4887 
     | 
    
         
            -
                inputSchema: FlexibleSchema<JSONObject | unknown>;
         
     | 
| 
       4888 
     | 
    
         
            -
            }> | 'automatic' | undefined;
         
     | 
| 
       4889 
     | 
    
         
            -
            type McpToolSet<TOOL_SCHEMAS extends ToolSchemas = 'automatic'> = TOOL_SCHEMAS extends Record<string, {
         
     | 
| 
       4890 
     | 
    
         
            -
                inputSchema: FlexibleSchema<any>;
         
     | 
| 
       4891 
     | 
    
         
            -
            }> ? {
         
     | 
| 
       4892 
     | 
    
         
            -
                [K in keyof TOOL_SCHEMAS]: TOOL_SCHEMAS[K] extends {
         
     | 
| 
       4893 
     | 
    
         
            -
                    inputSchema: FlexibleSchema<infer INPUT>;
         
     | 
| 
       4894 
     | 
    
         
            -
                } ? Tool<INPUT, CallToolResult> & Required<Pick<Tool<INPUT, CallToolResult>, 'execute'>> : never;
         
     | 
| 
       4895 
     | 
    
         
            -
            } : McpToolSet<Record<string, {
         
     | 
| 
       4896 
     | 
    
         
            -
                inputSchema: FlexibleSchema<unknown>;
         
     | 
| 
       4897 
     | 
    
         
            -
            }>>;
         
     | 
| 
       4898 
     | 
    
         
            -
            declare const CallToolResultSchema: z.ZodUnion<[z.ZodObject<{
         
     | 
| 
       4899 
     | 
    
         
            -
                _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4900 
     | 
    
         
            -
                content: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
         
     | 
| 
       4901 
     | 
    
         
            -
                    type: z.ZodLiteral<"text">;
         
     | 
| 
       4902 
     | 
    
         
            -
                    text: z.ZodString;
         
     | 
| 
       4903 
     | 
    
         
            -
                }, z.core.$loose>, z.ZodObject<{
         
     | 
| 
       4904 
     | 
    
         
            -
                    type: z.ZodLiteral<"image">;
         
     | 
| 
       4905 
     | 
    
         
            -
                    data: z.ZodBase64;
         
     | 
| 
       4906 
     | 
    
         
            -
                    mimeType: z.ZodString;
         
     | 
| 
       4907 
     | 
    
         
            -
                }, z.core.$loose>, z.ZodObject<{
         
     | 
| 
       4908 
     | 
    
         
            -
                    type: z.ZodLiteral<"resource">;
         
     | 
| 
       4909 
     | 
    
         
            -
                    resource: z.ZodUnion<readonly [z.ZodObject<{
         
     | 
| 
       4910 
     | 
    
         
            -
                        uri: z.ZodString;
         
     | 
| 
       4911 
     | 
    
         
            -
                        mimeType: z.ZodOptional<z.ZodString>;
         
     | 
| 
       4912 
     | 
    
         
            -
                        text: z.ZodString;
         
     | 
| 
       4913 
     | 
    
         
            -
                    }, z.core.$loose>, z.ZodObject<{
         
     | 
| 
       4914 
     | 
    
         
            -
                        uri: z.ZodString;
         
     | 
| 
       4915 
     | 
    
         
            -
                        mimeType: z.ZodOptional<z.ZodString>;
         
     | 
| 
       4916 
     | 
    
         
            -
                        blob: z.ZodBase64;
         
     | 
| 
       4917 
     | 
    
         
            -
                    }, z.core.$loose>]>;
         
     | 
| 
       4918 
     | 
    
         
            -
                }, z.core.$loose>]>>;
         
     | 
| 
       4919 
     | 
    
         
            -
                isError: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
         
     | 
| 
       4920 
     | 
    
         
            -
            }, z.core.$loose>, z.ZodObject<{
         
     | 
| 
       4921 
     | 
    
         
            -
                _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4922 
     | 
    
         
            -
                toolResult: z.ZodUnknown;
         
     | 
| 
       4923 
     | 
    
         
            -
            }, z.core.$loose>]>;
         
     | 
| 
       4924 
     | 
    
         
            -
            type CallToolResult = z.infer<typeof CallToolResultSchema>;
         
     | 
| 
       4925 
     | 
    
         
            -
             
     | 
| 
       4926 
     | 
    
         
            -
            interface MCPClientConfig {
         
     | 
| 
       4927 
     | 
    
         
            -
                /** Transport configuration for connecting to the MCP server */
         
     | 
| 
       4928 
     | 
    
         
            -
                transport: MCPTransportConfig | MCPTransport;
         
     | 
| 
       4929 
     | 
    
         
            -
                /** Optional callback for uncaught errors */
         
     | 
| 
       4930 
     | 
    
         
            -
                onUncaughtError?: (error: unknown) => void;
         
     | 
| 
       4931 
     | 
    
         
            -
                /** Optional client name, defaults to 'ai-sdk-mcp-client' */
         
     | 
| 
       4932 
     | 
    
         
            -
                name?: string;
         
     | 
| 
       4933 
     | 
    
         
            -
            }
         
     | 
| 
       4934 
     | 
    
         
            -
            declare function createMCPClient(config: MCPClientConfig): Promise<MCPClient>;
         
     | 
| 
       4935 
     | 
    
         
            -
            interface MCPClient {
         
     | 
| 
       4936 
     | 
    
         
            -
                tools<TOOL_SCHEMAS extends ToolSchemas = 'automatic'>(options?: {
         
     | 
| 
       4937 
     | 
    
         
            -
                    schemas?: TOOL_SCHEMAS;
         
     | 
| 
       4938 
     | 
    
         
            -
                }): Promise<McpToolSet<TOOL_SCHEMAS>>;
         
     | 
| 
       4939 
     | 
    
         
            -
                close: () => Promise<void>;
         
     | 
| 
       4940 
     | 
    
         
            -
            }
         
     | 
| 
       4941 
     | 
    
         
            -
             
     | 
| 
       4942 
4760 
     | 
    
         
             
            /**
         
     | 
| 
       4943 
4761 
     | 
    
         
             
            The result of a `transcribe` call.
         
     | 
| 
       4944 
4762 
     | 
    
         
             
            It contains the transcript and additional information.
         
     | 
| 
         @@ -5064,4 +4882,4 @@ declare global { 
     | 
|
| 
       5064 
4882 
     | 
    
         
             
                var AI_SDK_LOG_WARNINGS: LogWarningsFunction | undefined | false;
         
     | 
| 
       5065 
4883 
     | 
    
         
             
            }
         
     | 
| 
       5066 
4884 
     | 
    
         | 
| 
       5067 
     | 
    
         
            -
            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,  
     | 
| 
      
 4885 
     | 
    
         
            +
            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, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, 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, 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
    
    | 
         @@ -3,7 +3,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils'; 
     | 
|
| 
       3 
3 
     | 
    
         
             
            import { Tool, InferToolInput, InferToolOutput, AssistantModelMessage, ToolModelMessage, ReasoningPart, FlexibleSchema, InferSchema, ModelMessage, SystemModelMessage, UserModelMessage, ProviderOptions, IdGenerator, ToolCall, MaybePromiseLike, TextPart, FilePart, Resolvable, FetchFunction, DataContent } from '@ai-sdk/provider-utils';
         
     | 
| 
       4 
4 
     | 
    
         
             
            export { AssistantContent, AssistantModelMessage, DataContent, FilePart, FlexibleSchema, IdGenerator, ImagePart, InferSchema, InferToolInput, InferToolOutput, ModelMessage, Schema, SystemModelMessage, TextPart, Tool, ToolApprovalRequest, ToolApprovalResponse, ToolCallOptions, ToolCallPart, ToolContent, ToolExecuteFunction, ToolModelMessage, ToolResultPart, UserContent, UserModelMessage, asSchema, createIdGenerator, dynamicTool, generateId, jsonSchema, parseJsonEventStream, tool, zodSchema } from '@ai-sdk/provider-utils';
         
     | 
| 
       5 
5 
     | 
    
         
             
            import * as _ai_sdk_provider from '@ai-sdk/provider';
         
     | 
| 
       6 
     | 
    
         
            -
            import { EmbeddingModelV3, EmbeddingModelV2, EmbeddingModelV3Embedding, ImageModelV3, ImageModelV3CallWarning, ImageModelV3ProviderMetadata, JSONValue as JSONValue$1, LanguageModelV3, LanguageModelV2, LanguageModelV3FinishReason, LanguageModelV3CallWarning, LanguageModelV3Source, LanguageModelV3Middleware, SharedV3ProviderMetadata, SpeechModelV3, SpeechModelV2, SpeechModelV3CallWarning, TranscriptionModelV3, TranscriptionModelV2, TranscriptionModelV3CallWarning, LanguageModelV3Usage, LanguageModelV3CallOptions, AISDKError, LanguageModelV3ToolCall, JSONSchema7, JSONParseError, TypeValidationError, ProviderV3, ProviderV2, NoSuchModelError 
     | 
| 
      
 6 
     | 
    
         
            +
            import { EmbeddingModelV3, EmbeddingModelV2, EmbeddingModelV3Embedding, ImageModelV3, ImageModelV3CallWarning, ImageModelV3ProviderMetadata, JSONValue as JSONValue$1, LanguageModelV3, LanguageModelV2, LanguageModelV3FinishReason, LanguageModelV3CallWarning, LanguageModelV3Source, LanguageModelV3Middleware, SharedV3ProviderMetadata, SpeechModelV3, SpeechModelV2, SpeechModelV3CallWarning, TranscriptionModelV3, TranscriptionModelV2, TranscriptionModelV3CallWarning, LanguageModelV3Usage, LanguageModelV3CallOptions, AISDKError, LanguageModelV3ToolCall, JSONSchema7, JSONParseError, TypeValidationError, ProviderV3, ProviderV2, NoSuchModelError } from '@ai-sdk/provider';
         
     | 
| 
       7 
7 
     | 
    
         
             
            export { AISDKError, APICallError, EmptyResponseBodyError, InvalidPromptError, InvalidResponseDataError, JSONParseError, JSONSchema7, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, TooManyEmbeddingValuesForCallError, TypeValidationError, UnsupportedFunctionalityError } from '@ai-sdk/provider';
         
     | 
| 
       8 
8 
     | 
    
         
             
            import { ServerResponse } from 'node:http';
         
     | 
| 
       9 
9 
     | 
    
         
             
            import { AttributeValue, Tracer } from '@opentelemetry/api';
         
     | 
| 
         @@ -934,9 +934,9 @@ type StopCondition<TOOLS extends ToolSet> = (options: { 
     | 
|
| 
       934 
934 
     | 
    
         
             
            declare function stepCountIs(stepCount: number): StopCondition<any>;
         
     | 
| 
       935 
935 
     | 
    
         
             
            declare function hasToolCall(toolName: string): StopCondition<any>;
         
     | 
| 
       936 
936 
     | 
    
         | 
| 
       937 
     | 
    
         
            -
            declare const symbol$ 
     | 
| 
      
 937 
     | 
    
         
            +
            declare const symbol$e: unique symbol;
         
     | 
| 
       938 
938 
     | 
    
         
             
            declare class InvalidToolInputError extends AISDKError {
         
     | 
| 
       939 
     | 
    
         
            -
                private readonly [symbol$ 
     | 
| 
      
 939 
     | 
    
         
            +
                private readonly [symbol$e];
         
     | 
| 
       940 
940 
     | 
    
         
             
                readonly toolName: string;
         
     | 
| 
       941 
941 
     | 
    
         
             
                readonly toolInput: string;
         
     | 
| 
       942 
942 
     | 
    
         
             
                constructor({ toolInput, toolName, cause, message, }: {
         
     | 
| 
         @@ -948,9 +948,9 @@ declare class InvalidToolInputError extends AISDKError { 
     | 
|
| 
       948 
948 
     | 
    
         
             
                static isInstance(error: unknown): error is InvalidToolInputError;
         
     | 
| 
       949 
949 
     | 
    
         
             
            }
         
     | 
| 
       950 
950 
     | 
    
         | 
| 
       951 
     | 
    
         
            -
            declare const symbol$ 
     | 
| 
      
 951 
     | 
    
         
            +
            declare const symbol$d: unique symbol;
         
     | 
| 
       952 
952 
     | 
    
         
             
            declare class NoSuchToolError extends AISDKError {
         
     | 
| 
       953 
     | 
    
         
            -
                private readonly [symbol$ 
     | 
| 
      
 953 
     | 
    
         
            +
                private readonly [symbol$d];
         
     | 
| 
       954 
954 
     | 
    
         
             
                readonly toolName: string;
         
     | 
| 
       955 
955 
     | 
    
         
             
                readonly availableTools: string[] | undefined;
         
     | 
| 
       956 
956 
     | 
    
         
             
                constructor({ toolName, availableTools, message, }: {
         
     | 
| 
         @@ -3528,9 +3528,9 @@ declare function embedMany<VALUE = string>({ model: modelArg, values, maxParalle 
     | 
|
| 
       3528 
3528 
     | 
    
         
             
                maxParallelCalls?: number;
         
     | 
| 
       3529 
3529 
     | 
    
         
             
            }): Promise<EmbedManyResult<VALUE>>;
         
     | 
| 
       3530 
3530 
     | 
    
         | 
| 
       3531 
     | 
    
         
            -
            declare const symbol$ 
     | 
| 
      
 3531 
     | 
    
         
            +
            declare const symbol$c: unique symbol;
         
     | 
| 
       3532 
3532 
     | 
    
         
             
            declare class InvalidArgumentError extends AISDKError {
         
     | 
| 
       3533 
     | 
    
         
            -
                private readonly [symbol$ 
     | 
| 
      
 3533 
     | 
    
         
            +
                private readonly [symbol$c];
         
     | 
| 
       3534 
3534 
     | 
    
         
             
                readonly parameter: string;
         
     | 
| 
       3535 
3535 
     | 
    
         
             
                readonly value: unknown;
         
     | 
| 
       3536 
3536 
     | 
    
         
             
                constructor({ parameter, value, message, }: {
         
     | 
| 
         @@ -3617,9 +3617,9 @@ type SingleRequestTextStreamPart<TOOLS extends ToolSet> = { 
     | 
|
| 
       3617 
3617 
     | 
    
         
             
                rawValue: unknown;
         
     | 
| 
       3618 
3618 
     | 
    
         
             
            };
         
     | 
| 
       3619 
3619 
     | 
    
         | 
| 
       3620 
     | 
    
         
            -
            declare const symbol$ 
     | 
| 
      
 3620 
     | 
    
         
            +
            declare const symbol$b: unique symbol;
         
     | 
| 
       3621 
3621 
     | 
    
         
             
            declare class InvalidStreamPartError extends AISDKError {
         
     | 
| 
       3622 
     | 
    
         
            -
                private readonly [symbol$ 
     | 
| 
      
 3622 
     | 
    
         
            +
                private readonly [symbol$b];
         
     | 
| 
       3623 
3623 
     | 
    
         
             
                readonly chunk: SingleRequestTextStreamPart<any>;
         
     | 
| 
       3624 
3624 
     | 
    
         
             
                constructor({ chunk, message, }: {
         
     | 
| 
       3625 
3625 
     | 
    
         
             
                    chunk: SingleRequestTextStreamPart<any>;
         
     | 
| 
         @@ -3628,24 +3628,6 @@ declare class InvalidStreamPartError extends AISDKError { 
     | 
|
| 
       3628 
3628 
     | 
    
         
             
                static isInstance(error: unknown): error is InvalidStreamPartError;
         
     | 
| 
       3629 
3629 
     | 
    
         
             
            }
         
     | 
| 
       3630 
3630 
     | 
    
         | 
| 
       3631 
     | 
    
         
            -
            declare const symbol$b: unique symbol;
         
     | 
| 
       3632 
     | 
    
         
            -
            /**
         
     | 
| 
       3633 
     | 
    
         
            -
             * An error occurred with the MCP client.
         
     | 
| 
       3634 
     | 
    
         
            -
             */
         
     | 
| 
       3635 
     | 
    
         
            -
            declare class MCPClientError extends AISDKError {
         
     | 
| 
       3636 
     | 
    
         
            -
                private readonly [symbol$b];
         
     | 
| 
       3637 
     | 
    
         
            -
                readonly data?: unknown;
         
     | 
| 
       3638 
     | 
    
         
            -
                readonly code?: number;
         
     | 
| 
       3639 
     | 
    
         
            -
                constructor({ name, message, cause, data, code, }: {
         
     | 
| 
       3640 
     | 
    
         
            -
                    name?: string;
         
     | 
| 
       3641 
     | 
    
         
            -
                    message: string;
         
     | 
| 
       3642 
     | 
    
         
            -
                    cause?: unknown;
         
     | 
| 
       3643 
     | 
    
         
            -
                    data?: unknown;
         
     | 
| 
       3644 
     | 
    
         
            -
                    code?: number;
         
     | 
| 
       3645 
     | 
    
         
            -
                });
         
     | 
| 
       3646 
     | 
    
         
            -
                static isInstance(error: unknown): error is MCPClientError;
         
     | 
| 
       3647 
     | 
    
         
            -
            }
         
     | 
| 
       3648 
     | 
    
         
            -
             
     | 
| 
       3649 
3631 
     | 
    
         
             
            declare const symbol$a: unique symbol;
         
     | 
| 
       3650 
3632 
     | 
    
         
             
            /**
         
     | 
| 
       3651 
3633 
     | 
    
         
             
            Thrown when no image could be generated. This can have multiple causes:
         
     | 
| 
         @@ -4775,170 +4757,6 @@ declare function pipeTextStreamToResponse({ response, status, statusText, header 
     | 
|
| 
       4775 
4757 
     | 
    
         
             
                textStream: ReadableStream<string>;
         
     | 
| 
       4776 
4758 
     | 
    
         
             
            } & ResponseInit): void;
         
     | 
| 
       4777 
4759 
     | 
    
         | 
| 
       4778 
     | 
    
         
            -
            declare const JSONRPCRequestSchema: z.ZodObject<{
         
     | 
| 
       4779 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4780 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4781 
     | 
    
         
            -
                method: z.ZodString;
         
     | 
| 
       4782 
     | 
    
         
            -
                params: z.ZodOptional<z.ZodObject<{
         
     | 
| 
       4783 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4784 
     | 
    
         
            -
                }, z.core.$loose>>;
         
     | 
| 
       4785 
     | 
    
         
            -
            }, z.core.$strict>;
         
     | 
| 
       4786 
     | 
    
         
            -
            type JSONRPCRequest = z.infer<typeof JSONRPCRequestSchema>;
         
     | 
| 
       4787 
     | 
    
         
            -
            declare const JSONRPCResponseSchema: z.ZodObject<{
         
     | 
| 
       4788 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4789 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4790 
     | 
    
         
            -
                result: z.ZodObject<{
         
     | 
| 
       4791 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4792 
     | 
    
         
            -
                }, z.core.$loose>;
         
     | 
| 
       4793 
     | 
    
         
            -
            }, z.core.$strict>;
         
     | 
| 
       4794 
     | 
    
         
            -
            type JSONRPCResponse = z.infer<typeof JSONRPCResponseSchema>;
         
     | 
| 
       4795 
     | 
    
         
            -
            declare const JSONRPCErrorSchema: z.ZodObject<{
         
     | 
| 
       4796 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4797 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4798 
     | 
    
         
            -
                error: z.ZodObject<{
         
     | 
| 
       4799 
     | 
    
         
            -
                    code: z.ZodNumber;
         
     | 
| 
       4800 
     | 
    
         
            -
                    message: z.ZodString;
         
     | 
| 
       4801 
     | 
    
         
            -
                    data: z.ZodOptional<z.ZodUnknown>;
         
     | 
| 
       4802 
     | 
    
         
            -
                }, z.core.$strip>;
         
     | 
| 
       4803 
     | 
    
         
            -
            }, z.core.$strict>;
         
     | 
| 
       4804 
     | 
    
         
            -
            type JSONRPCError = z.infer<typeof JSONRPCErrorSchema>;
         
     | 
| 
       4805 
     | 
    
         
            -
            declare const JSONRPCNotificationSchema: z.ZodObject<{
         
     | 
| 
       4806 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4807 
     | 
    
         
            -
                method: z.ZodString;
         
     | 
| 
       4808 
     | 
    
         
            -
                params: z.ZodOptional<z.ZodObject<{
         
     | 
| 
       4809 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4810 
     | 
    
         
            -
                }, z.core.$loose>>;
         
     | 
| 
       4811 
     | 
    
         
            -
            }, z.core.$strict>;
         
     | 
| 
       4812 
     | 
    
         
            -
            type JSONRPCNotification = z.infer<typeof JSONRPCNotificationSchema>;
         
     | 
| 
       4813 
     | 
    
         
            -
            declare const JSONRPCMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
         
     | 
| 
       4814 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4815 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4816 
     | 
    
         
            -
                method: z.ZodString;
         
     | 
| 
       4817 
     | 
    
         
            -
                params: z.ZodOptional<z.ZodObject<{
         
     | 
| 
       4818 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4819 
     | 
    
         
            -
                }, z.core.$loose>>;
         
     | 
| 
       4820 
     | 
    
         
            -
            }, z.core.$strict>, z.ZodObject<{
         
     | 
| 
       4821 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4822 
     | 
    
         
            -
                method: z.ZodString;
         
     | 
| 
       4823 
     | 
    
         
            -
                params: z.ZodOptional<z.ZodObject<{
         
     | 
| 
       4824 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4825 
     | 
    
         
            -
                }, z.core.$loose>>;
         
     | 
| 
       4826 
     | 
    
         
            -
            }, z.core.$strict>, z.ZodObject<{
         
     | 
| 
       4827 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4828 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4829 
     | 
    
         
            -
                result: z.ZodObject<{
         
     | 
| 
       4830 
     | 
    
         
            -
                    _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4831 
     | 
    
         
            -
                }, z.core.$loose>;
         
     | 
| 
       4832 
     | 
    
         
            -
            }, z.core.$strict>, z.ZodObject<{
         
     | 
| 
       4833 
     | 
    
         
            -
                jsonrpc: z.ZodLiteral<"2.0">;
         
     | 
| 
       4834 
     | 
    
         
            -
                id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
         
     | 
| 
       4835 
     | 
    
         
            -
                error: z.ZodObject<{
         
     | 
| 
       4836 
     | 
    
         
            -
                    code: z.ZodNumber;
         
     | 
| 
       4837 
     | 
    
         
            -
                    message: z.ZodString;
         
     | 
| 
       4838 
     | 
    
         
            -
                    data: z.ZodOptional<z.ZodUnknown>;
         
     | 
| 
       4839 
     | 
    
         
            -
                }, z.core.$strip>;
         
     | 
| 
       4840 
     | 
    
         
            -
            }, z.core.$strict>]>;
         
     | 
| 
       4841 
     | 
    
         
            -
            type JSONRPCMessage = z.infer<typeof JSONRPCMessageSchema>;
         
     | 
| 
       4842 
     | 
    
         
            -
             
     | 
| 
       4843 
     | 
    
         
            -
            /**
         
     | 
| 
       4844 
     | 
    
         
            -
             * Transport interface for MCP (Model Context Protocol) communication.
         
     | 
| 
       4845 
     | 
    
         
            -
             * Maps to the `Transport` interface in the MCP spec.
         
     | 
| 
       4846 
     | 
    
         
            -
             */
         
     | 
| 
       4847 
     | 
    
         
            -
            interface MCPTransport {
         
     | 
| 
       4848 
     | 
    
         
            -
                /**
         
     | 
| 
       4849 
     | 
    
         
            -
                 * Initialize and start the transport
         
     | 
| 
       4850 
     | 
    
         
            -
                 */
         
     | 
| 
       4851 
     | 
    
         
            -
                start(): Promise<void>;
         
     | 
| 
       4852 
     | 
    
         
            -
                /**
         
     | 
| 
       4853 
     | 
    
         
            -
                 * Send a JSON-RPC message through the transport
         
     | 
| 
       4854 
     | 
    
         
            -
                 * @param message The JSON-RPC message to send
         
     | 
| 
       4855 
     | 
    
         
            -
                 */
         
     | 
| 
       4856 
     | 
    
         
            -
                send(message: JSONRPCMessage): Promise<void>;
         
     | 
| 
       4857 
     | 
    
         
            -
                /**
         
     | 
| 
       4858 
     | 
    
         
            -
                 * Clean up and close the transport
         
     | 
| 
       4859 
     | 
    
         
            -
                 */
         
     | 
| 
       4860 
     | 
    
         
            -
                close(): Promise<void>;
         
     | 
| 
       4861 
     | 
    
         
            -
                /**
         
     | 
| 
       4862 
     | 
    
         
            -
                 * Event handler for transport closure
         
     | 
| 
       4863 
     | 
    
         
            -
                 */
         
     | 
| 
       4864 
     | 
    
         
            -
                onclose?: () => void;
         
     | 
| 
       4865 
     | 
    
         
            -
                /**
         
     | 
| 
       4866 
     | 
    
         
            -
                 * Event handler for transport errors
         
     | 
| 
       4867 
     | 
    
         
            -
                 */
         
     | 
| 
       4868 
     | 
    
         
            -
                onerror?: (error: Error) => void;
         
     | 
| 
       4869 
     | 
    
         
            -
                /**
         
     | 
| 
       4870 
     | 
    
         
            -
                 * Event handler for received messages
         
     | 
| 
       4871 
     | 
    
         
            -
                 */
         
     | 
| 
       4872 
     | 
    
         
            -
                onmessage?: (message: JSONRPCMessage) => void;
         
     | 
| 
       4873 
     | 
    
         
            -
            }
         
     | 
| 
       4874 
     | 
    
         
            -
            type MCPTransportConfig = {
         
     | 
| 
       4875 
     | 
    
         
            -
                type: 'sse';
         
     | 
| 
       4876 
     | 
    
         
            -
                /**
         
     | 
| 
       4877 
     | 
    
         
            -
                 * The URL of the MCP server.
         
     | 
| 
       4878 
     | 
    
         
            -
                 */
         
     | 
| 
       4879 
     | 
    
         
            -
                url: string;
         
     | 
| 
       4880 
     | 
    
         
            -
                /**
         
     | 
| 
       4881 
     | 
    
         
            -
                 * Additional HTTP headers to be sent with requests.
         
     | 
| 
       4882 
     | 
    
         
            -
                 */
         
     | 
| 
       4883 
     | 
    
         
            -
                headers?: Record<string, string>;
         
     | 
| 
       4884 
     | 
    
         
            -
            };
         
     | 
| 
       4885 
     | 
    
         
            -
             
     | 
| 
       4886 
     | 
    
         
            -
            type ToolSchemas = Record<string, {
         
     | 
| 
       4887 
     | 
    
         
            -
                inputSchema: FlexibleSchema<JSONObject | unknown>;
         
     | 
| 
       4888 
     | 
    
         
            -
            }> | 'automatic' | undefined;
         
     | 
| 
       4889 
     | 
    
         
            -
            type McpToolSet<TOOL_SCHEMAS extends ToolSchemas = 'automatic'> = TOOL_SCHEMAS extends Record<string, {
         
     | 
| 
       4890 
     | 
    
         
            -
                inputSchema: FlexibleSchema<any>;
         
     | 
| 
       4891 
     | 
    
         
            -
            }> ? {
         
     | 
| 
       4892 
     | 
    
         
            -
                [K in keyof TOOL_SCHEMAS]: TOOL_SCHEMAS[K] extends {
         
     | 
| 
       4893 
     | 
    
         
            -
                    inputSchema: FlexibleSchema<infer INPUT>;
         
     | 
| 
       4894 
     | 
    
         
            -
                } ? Tool<INPUT, CallToolResult> & Required<Pick<Tool<INPUT, CallToolResult>, 'execute'>> : never;
         
     | 
| 
       4895 
     | 
    
         
            -
            } : McpToolSet<Record<string, {
         
     | 
| 
       4896 
     | 
    
         
            -
                inputSchema: FlexibleSchema<unknown>;
         
     | 
| 
       4897 
     | 
    
         
            -
            }>>;
         
     | 
| 
       4898 
     | 
    
         
            -
            declare const CallToolResultSchema: z.ZodUnion<[z.ZodObject<{
         
     | 
| 
       4899 
     | 
    
         
            -
                _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4900 
     | 
    
         
            -
                content: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
         
     | 
| 
       4901 
     | 
    
         
            -
                    type: z.ZodLiteral<"text">;
         
     | 
| 
       4902 
     | 
    
         
            -
                    text: z.ZodString;
         
     | 
| 
       4903 
     | 
    
         
            -
                }, z.core.$loose>, z.ZodObject<{
         
     | 
| 
       4904 
     | 
    
         
            -
                    type: z.ZodLiteral<"image">;
         
     | 
| 
       4905 
     | 
    
         
            -
                    data: z.ZodBase64;
         
     | 
| 
       4906 
     | 
    
         
            -
                    mimeType: z.ZodString;
         
     | 
| 
       4907 
     | 
    
         
            -
                }, z.core.$loose>, z.ZodObject<{
         
     | 
| 
       4908 
     | 
    
         
            -
                    type: z.ZodLiteral<"resource">;
         
     | 
| 
       4909 
     | 
    
         
            -
                    resource: z.ZodUnion<readonly [z.ZodObject<{
         
     | 
| 
       4910 
     | 
    
         
            -
                        uri: z.ZodString;
         
     | 
| 
       4911 
     | 
    
         
            -
                        mimeType: z.ZodOptional<z.ZodString>;
         
     | 
| 
       4912 
     | 
    
         
            -
                        text: z.ZodString;
         
     | 
| 
       4913 
     | 
    
         
            -
                    }, z.core.$loose>, z.ZodObject<{
         
     | 
| 
       4914 
     | 
    
         
            -
                        uri: z.ZodString;
         
     | 
| 
       4915 
     | 
    
         
            -
                        mimeType: z.ZodOptional<z.ZodString>;
         
     | 
| 
       4916 
     | 
    
         
            -
                        blob: z.ZodBase64;
         
     | 
| 
       4917 
     | 
    
         
            -
                    }, z.core.$loose>]>;
         
     | 
| 
       4918 
     | 
    
         
            -
                }, z.core.$loose>]>>;
         
     | 
| 
       4919 
     | 
    
         
            -
                isError: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
         
     | 
| 
       4920 
     | 
    
         
            -
            }, z.core.$loose>, z.ZodObject<{
         
     | 
| 
       4921 
     | 
    
         
            -
                _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
         
     | 
| 
       4922 
     | 
    
         
            -
                toolResult: z.ZodUnknown;
         
     | 
| 
       4923 
     | 
    
         
            -
            }, z.core.$loose>]>;
         
     | 
| 
       4924 
     | 
    
         
            -
            type CallToolResult = z.infer<typeof CallToolResultSchema>;
         
     | 
| 
       4925 
     | 
    
         
            -
             
     | 
| 
       4926 
     | 
    
         
            -
            interface MCPClientConfig {
         
     | 
| 
       4927 
     | 
    
         
            -
                /** Transport configuration for connecting to the MCP server */
         
     | 
| 
       4928 
     | 
    
         
            -
                transport: MCPTransportConfig | MCPTransport;
         
     | 
| 
       4929 
     | 
    
         
            -
                /** Optional callback for uncaught errors */
         
     | 
| 
       4930 
     | 
    
         
            -
                onUncaughtError?: (error: unknown) => void;
         
     | 
| 
       4931 
     | 
    
         
            -
                /** Optional client name, defaults to 'ai-sdk-mcp-client' */
         
     | 
| 
       4932 
     | 
    
         
            -
                name?: string;
         
     | 
| 
       4933 
     | 
    
         
            -
            }
         
     | 
| 
       4934 
     | 
    
         
            -
            declare function createMCPClient(config: MCPClientConfig): Promise<MCPClient>;
         
     | 
| 
       4935 
     | 
    
         
            -
            interface MCPClient {
         
     | 
| 
       4936 
     | 
    
         
            -
                tools<TOOL_SCHEMAS extends ToolSchemas = 'automatic'>(options?: {
         
     | 
| 
       4937 
     | 
    
         
            -
                    schemas?: TOOL_SCHEMAS;
         
     | 
| 
       4938 
     | 
    
         
            -
                }): Promise<McpToolSet<TOOL_SCHEMAS>>;
         
     | 
| 
       4939 
     | 
    
         
            -
                close: () => Promise<void>;
         
     | 
| 
       4940 
     | 
    
         
            -
            }
         
     | 
| 
       4941 
     | 
    
         
            -
             
     | 
| 
       4942 
4760 
     | 
    
         
             
            /**
         
     | 
| 
       4943 
4761 
     | 
    
         
             
            The result of a `transcribe` call.
         
     | 
| 
       4944 
4762 
     | 
    
         
             
            It contains the transcript and additional information.
         
     | 
| 
         @@ -5064,4 +4882,4 @@ declare global { 
     | 
|
| 
       5064 
4882 
     | 
    
         
             
                var AI_SDK_LOG_WARNINGS: LogWarningsFunction | undefined | false;
         
     | 
| 
       5065 
4883 
     | 
    
         
             
            }
         
     | 
| 
       5066 
4884 
     | 
    
         | 
| 
       5067 
     | 
    
         
            -
            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,  
     | 
| 
      
 4885 
     | 
    
         
            +
            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, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, 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, 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 };
         
     |