ai 6.0.0-beta.70 → 6.0.0-beta.72

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 CHANGED
@@ -1,5 +1,31 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.0-beta.72
4
+
5
+ ### Patch Changes
6
+
7
+ - eca63f3: feat(ai): add OAuth for MCP clients + refactor to new package
8
+
9
+ This change replaces
10
+
11
+ ```ts
12
+ import { experimental_createMCPClient } from 'ai';
13
+ import { Experimental_StdioMCPTransport } from 'ai/mcp-stdio';
14
+ ```
15
+
16
+ with
17
+
18
+ ```ts
19
+ import { experimental_createMCPClient } from '@ai-sdk/mcp';
20
+ import { Experimental_StdioMCPTransport } from '@ai-sdk/mcp/mcp-stdio';
21
+ ```
22
+
23
+ ## 6.0.0-beta.71
24
+
25
+ ### Patch Changes
26
+
27
+ - 077aea3: feat(ai): stable structured output on generateText, streamText, and ToolLoopAgent
28
+
3
29
  ## 6.0.0-beta.70
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, JSONObject } 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 } 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';
@@ -632,9 +632,16 @@ interface GenerateTextResult<TOOLS extends ToolSet, OUTPUT> {
632
632
  */
633
633
  readonly steps: Array<StepResult<TOOLS>>;
634
634
  /**
635
- The generated structured output. It uses the `experimental_output` specification.
635
+ The generated structured output. It uses the `output` specification.
636
+
637
+ @deprecated Use `output` instead.
636
638
  */
637
639
  readonly experimental_output: OUTPUT;
640
+ /**
641
+ The generated structured output. It uses the `output` specification.
642
+
643
+ */
644
+ readonly output: OUTPUT;
638
645
  }
639
646
 
640
647
  /**
@@ -927,9 +934,9 @@ type StopCondition<TOOLS extends ToolSet> = (options: {
927
934
  declare function stepCountIs(stepCount: number): StopCondition<any>;
928
935
  declare function hasToolCall(toolName: string): StopCondition<any>;
929
936
 
930
- declare const symbol$f: unique symbol;
937
+ declare const symbol$e: unique symbol;
931
938
  declare class InvalidToolInputError extends AISDKError {
932
- private readonly [symbol$f];
939
+ private readonly [symbol$e];
933
940
  readonly toolName: string;
934
941
  readonly toolInput: string;
935
942
  constructor({ toolInput, toolName, cause, message, }: {
@@ -941,9 +948,9 @@ declare class InvalidToolInputError extends AISDKError {
941
948
  static isInstance(error: unknown): error is InvalidToolInputError;
942
949
  }
943
950
 
944
- declare const symbol$e: unique symbol;
951
+ declare const symbol$d: unique symbol;
945
952
  declare class NoSuchToolError extends AISDKError {
946
- private readonly [symbol$e];
953
+ private readonly [symbol$d];
947
954
  readonly toolName: string;
948
955
  readonly availableTools: string[] | undefined;
949
956
  constructor({ toolName, availableTools, message, }: {
@@ -1092,7 +1099,7 @@ If set and supported by the model, calls will generate deterministic results.
1092
1099
  @returns
1093
1100
  A result object that contains the generated text, the results of the tool calls, and additional information.
1094
1101
  */
1095
- declare function generateText<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never>({ model: modelArg, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, headers, stopWhen, experimental_output: output, experimental_telemetry: telemetry, providerOptions, experimental_activeTools, activeTools, experimental_prepareStep, prepareStep, experimental_repairToolCall: repairToolCall, experimental_download: download, experimental_context, _internal: { generateId, currentDate, }, onStepFinish, onFinish, ...settings }: CallSettings & Prompt & {
1102
+ declare function generateText<TOOLS extends ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never>({ model: modelArg, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, headers, stopWhen, experimental_output, output, experimental_telemetry: telemetry, providerOptions, experimental_activeTools, activeTools, experimental_prepareStep, prepareStep, experimental_repairToolCall: repairToolCall, experimental_download: download, experimental_context, _internal: { generateId, currentDate, }, onStepFinish, onFinish, ...settings }: CallSettings & Prompt & {
1096
1103
  /**
1097
1104
  The language model to use.
1098
1105
  */
@@ -1134,7 +1141,13 @@ changing the tool call and result types in the result.
1134
1141
  /**
1135
1142
  Optional specification for parsing structured outputs from the LLM response.
1136
1143
  */
1137
- experimental_output?: Output<OUTPUT, OUTPUT_PARTIAL>;
1144
+ output?: Output<OUTPUT, PARTIAL_OUTPUT>;
1145
+ /**
1146
+ Optional specification for parsing structured outputs from the LLM response.
1147
+
1148
+ @deprecated Use `output` instead.
1149
+ */
1150
+ experimental_output?: Output<OUTPUT, PARTIAL_OUTPUT>;
1138
1151
  /**
1139
1152
  Custom download function to use for URLs.
1140
1153
 
@@ -1332,7 +1345,7 @@ If set and supported by the model, calls will generate deterministic results.
1332
1345
  @return
1333
1346
  A result object for accessing different stream types and additional information.
1334
1347
  */
1335
- declare function streamText<TOOLS extends ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, stopWhen, experimental_output: output, experimental_telemetry: telemetry, prepareStep, providerOptions, experimental_activeTools, activeTools, experimental_repairToolCall: repairToolCall, experimental_transform: transform, experimental_download: download, includeRawChunks, onChunk, onError, onFinish, onAbort, onStepFinish, experimental_context, _internal: { now, generateId, currentDate, }, ...settings }: CallSettings & Prompt & {
1348
+ declare function streamText<TOOLS extends ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, stopWhen, experimental_output, output, experimental_telemetry: telemetry, prepareStep, providerOptions, experimental_activeTools, activeTools, experimental_repairToolCall: repairToolCall, experimental_transform: transform, experimental_download: download, includeRawChunks, onChunk, onError, onFinish, onAbort, onStepFinish, experimental_context, _internal: { now, generateId, currentDate, }, ...settings }: CallSettings & Prompt & {
1336
1349
  /**
1337
1350
  The language model to use.
1338
1351
  */
@@ -1374,6 +1387,12 @@ functionality that can be fully encapsulated in the provider.
1374
1387
  /**
1375
1388
  Optional specification for parsing structured outputs from the LLM response.
1376
1389
  */
1390
+ output?: Output<OUTPUT, PARTIAL_OUTPUT>;
1391
+ /**
1392
+ Optional specification for parsing structured outputs from the LLM response.
1393
+
1394
+ @deprecated Use `output` instead.
1395
+ */
1377
1396
  experimental_output?: Output<OUTPUT, PARTIAL_OUTPUT>;
1378
1397
  /**
1379
1398
  Optional function that you can use to provide different settings for a step.
@@ -2301,10 +2320,16 @@ interface StreamTextResult<TOOLS extends ToolSet, PARTIAL_OUTPUT> {
2301
2320
  */
2302
2321
  readonly fullStream: AsyncIterableStream<TextStreamPart<TOOLS>>;
2303
2322
  /**
2304
- A stream of partial outputs. It uses the `experimental_output` specification.
2323
+ * A stream of partial outputs. It uses the `output` specification.
2324
+ *
2325
+ * @deprecated Use `partialOutputStream` instead.
2305
2326
  */
2306
2327
  readonly experimental_partialOutputStream: AsyncIterableStream<PARTIAL_OUTPUT>;
2307
2328
  /**
2329
+ * A stream of partial outputs. It uses the `output` specification.
2330
+ */
2331
+ readonly partialOutputStream: AsyncIterableStream<PARTIAL_OUTPUT>;
2332
+ /**
2308
2333
  Consumes the stream without processing the parts.
2309
2334
  This is useful to force the stream to finish.
2310
2335
  It effectively removes the backpressure and allows the stream to finish,
@@ -2553,9 +2578,9 @@ type ToolLoopAgentSettings<CALL_OPTIONS = never, TOOLS extends ToolSet = {}, OUT
2553
2578
  */
2554
2579
  activeTools?: Array<keyof NoInfer<TOOLS>>;
2555
2580
  /**
2556
- Optional specification for parsing structured outputs from the LLM response.
2581
+ Optional specification for generating structured outputs.
2557
2582
  */
2558
- experimental_output?: OUTPUT;
2583
+ output?: OUTPUT;
2559
2584
  /**
2560
2585
  Optional function that you can use to provide different settings for a step.
2561
2586
  */
@@ -3503,9 +3528,9 @@ declare function embedMany<VALUE = string>({ model: modelArg, values, maxParalle
3503
3528
  maxParallelCalls?: number;
3504
3529
  }): Promise<EmbedManyResult<VALUE>>;
3505
3530
 
3506
- declare const symbol$d: unique symbol;
3531
+ declare const symbol$c: unique symbol;
3507
3532
  declare class InvalidArgumentError extends AISDKError {
3508
- private readonly [symbol$d];
3533
+ private readonly [symbol$c];
3509
3534
  readonly parameter: string;
3510
3535
  readonly value: unknown;
3511
3536
  constructor({ parameter, value, message, }: {
@@ -3592,9 +3617,9 @@ type SingleRequestTextStreamPart<TOOLS extends ToolSet> = {
3592
3617
  rawValue: unknown;
3593
3618
  };
3594
3619
 
3595
- declare const symbol$c: unique symbol;
3620
+ declare const symbol$b: unique symbol;
3596
3621
  declare class InvalidStreamPartError extends AISDKError {
3597
- private readonly [symbol$c];
3622
+ private readonly [symbol$b];
3598
3623
  readonly chunk: SingleRequestTextStreamPart<any>;
3599
3624
  constructor({ chunk, message, }: {
3600
3625
  chunk: SingleRequestTextStreamPart<any>;
@@ -3603,24 +3628,6 @@ declare class InvalidStreamPartError extends AISDKError {
3603
3628
  static isInstance(error: unknown): error is InvalidStreamPartError;
3604
3629
  }
3605
3630
 
3606
- declare const symbol$b: unique symbol;
3607
- /**
3608
- * An error occurred with the MCP client.
3609
- */
3610
- declare class MCPClientError extends AISDKError {
3611
- private readonly [symbol$b];
3612
- readonly data?: unknown;
3613
- readonly code?: number;
3614
- constructor({ name, message, cause, data, code, }: {
3615
- name?: string;
3616
- message: string;
3617
- cause?: unknown;
3618
- data?: unknown;
3619
- code?: number;
3620
- });
3621
- static isInstance(error: unknown): error is MCPClientError;
3622
- }
3623
-
3624
3631
  declare const symbol$a: unique symbol;
3625
3632
  /**
3626
3633
  Thrown when no image could be generated. This can have multiple causes:
@@ -4750,170 +4757,6 @@ declare function pipeTextStreamToResponse({ response, status, statusText, header
4750
4757
  textStream: ReadableStream<string>;
4751
4758
  } & ResponseInit): void;
4752
4759
 
4753
- declare const JSONRPCRequestSchema: z.ZodObject<{
4754
- jsonrpc: z.ZodLiteral<"2.0">;
4755
- id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
4756
- method: z.ZodString;
4757
- params: z.ZodOptional<z.ZodObject<{
4758
- _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
4759
- }, z.core.$loose>>;
4760
- }, z.core.$strict>;
4761
- type JSONRPCRequest = z.infer<typeof JSONRPCRequestSchema>;
4762
- declare const JSONRPCResponseSchema: z.ZodObject<{
4763
- jsonrpc: z.ZodLiteral<"2.0">;
4764
- id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
4765
- result: z.ZodObject<{
4766
- _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
4767
- }, z.core.$loose>;
4768
- }, z.core.$strict>;
4769
- type JSONRPCResponse = z.infer<typeof JSONRPCResponseSchema>;
4770
- declare const JSONRPCErrorSchema: z.ZodObject<{
4771
- jsonrpc: z.ZodLiteral<"2.0">;
4772
- id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
4773
- error: z.ZodObject<{
4774
- code: z.ZodNumber;
4775
- message: z.ZodString;
4776
- data: z.ZodOptional<z.ZodUnknown>;
4777
- }, z.core.$strip>;
4778
- }, z.core.$strict>;
4779
- type JSONRPCError = z.infer<typeof JSONRPCErrorSchema>;
4780
- declare const JSONRPCNotificationSchema: z.ZodObject<{
4781
- jsonrpc: z.ZodLiteral<"2.0">;
4782
- method: z.ZodString;
4783
- params: z.ZodOptional<z.ZodObject<{
4784
- _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
4785
- }, z.core.$loose>>;
4786
- }, z.core.$strict>;
4787
- type JSONRPCNotification = z.infer<typeof JSONRPCNotificationSchema>;
4788
- declare const JSONRPCMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
4789
- jsonrpc: z.ZodLiteral<"2.0">;
4790
- id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
4791
- method: z.ZodString;
4792
- params: z.ZodOptional<z.ZodObject<{
4793
- _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
4794
- }, z.core.$loose>>;
4795
- }, z.core.$strict>, z.ZodObject<{
4796
- jsonrpc: z.ZodLiteral<"2.0">;
4797
- method: z.ZodString;
4798
- params: z.ZodOptional<z.ZodObject<{
4799
- _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
4800
- }, z.core.$loose>>;
4801
- }, z.core.$strict>, z.ZodObject<{
4802
- jsonrpc: z.ZodLiteral<"2.0">;
4803
- id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
4804
- result: z.ZodObject<{
4805
- _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
4806
- }, z.core.$loose>;
4807
- }, z.core.$strict>, z.ZodObject<{
4808
- jsonrpc: z.ZodLiteral<"2.0">;
4809
- id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
4810
- error: z.ZodObject<{
4811
- code: z.ZodNumber;
4812
- message: z.ZodString;
4813
- data: z.ZodOptional<z.ZodUnknown>;
4814
- }, z.core.$strip>;
4815
- }, z.core.$strict>]>;
4816
- type JSONRPCMessage = z.infer<typeof JSONRPCMessageSchema>;
4817
-
4818
- /**
4819
- * Transport interface for MCP (Model Context Protocol) communication.
4820
- * Maps to the `Transport` interface in the MCP spec.
4821
- */
4822
- interface MCPTransport {
4823
- /**
4824
- * Initialize and start the transport
4825
- */
4826
- start(): Promise<void>;
4827
- /**
4828
- * Send a JSON-RPC message through the transport
4829
- * @param message The JSON-RPC message to send
4830
- */
4831
- send(message: JSONRPCMessage): Promise<void>;
4832
- /**
4833
- * Clean up and close the transport
4834
- */
4835
- close(): Promise<void>;
4836
- /**
4837
- * Event handler for transport closure
4838
- */
4839
- onclose?: () => void;
4840
- /**
4841
- * Event handler for transport errors
4842
- */
4843
- onerror?: (error: Error) => void;
4844
- /**
4845
- * Event handler for received messages
4846
- */
4847
- onmessage?: (message: JSONRPCMessage) => void;
4848
- }
4849
- type MCPTransportConfig = {
4850
- type: 'sse';
4851
- /**
4852
- * The URL of the MCP server.
4853
- */
4854
- url: string;
4855
- /**
4856
- * Additional HTTP headers to be sent with requests.
4857
- */
4858
- headers?: Record<string, string>;
4859
- };
4860
-
4861
- type ToolSchemas = Record<string, {
4862
- inputSchema: FlexibleSchema<JSONObject | unknown>;
4863
- }> | 'automatic' | undefined;
4864
- type McpToolSet<TOOL_SCHEMAS extends ToolSchemas = 'automatic'> = TOOL_SCHEMAS extends Record<string, {
4865
- inputSchema: FlexibleSchema<any>;
4866
- }> ? {
4867
- [K in keyof TOOL_SCHEMAS]: TOOL_SCHEMAS[K] extends {
4868
- inputSchema: FlexibleSchema<infer INPUT>;
4869
- } ? Tool<INPUT, CallToolResult> & Required<Pick<Tool<INPUT, CallToolResult>, 'execute'>> : never;
4870
- } : McpToolSet<Record<string, {
4871
- inputSchema: FlexibleSchema<unknown>;
4872
- }>>;
4873
- declare const CallToolResultSchema: z.ZodUnion<[z.ZodObject<{
4874
- _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
4875
- content: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
4876
- type: z.ZodLiteral<"text">;
4877
- text: z.ZodString;
4878
- }, z.core.$loose>, z.ZodObject<{
4879
- type: z.ZodLiteral<"image">;
4880
- data: z.ZodBase64;
4881
- mimeType: z.ZodString;
4882
- }, z.core.$loose>, z.ZodObject<{
4883
- type: z.ZodLiteral<"resource">;
4884
- resource: z.ZodUnion<readonly [z.ZodObject<{
4885
- uri: z.ZodString;
4886
- mimeType: z.ZodOptional<z.ZodString>;
4887
- text: z.ZodString;
4888
- }, z.core.$loose>, z.ZodObject<{
4889
- uri: z.ZodString;
4890
- mimeType: z.ZodOptional<z.ZodString>;
4891
- blob: z.ZodBase64;
4892
- }, z.core.$loose>]>;
4893
- }, z.core.$loose>]>>;
4894
- isError: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4895
- }, z.core.$loose>, z.ZodObject<{
4896
- _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
4897
- toolResult: z.ZodUnknown;
4898
- }, z.core.$loose>]>;
4899
- type CallToolResult = z.infer<typeof CallToolResultSchema>;
4900
-
4901
- interface MCPClientConfig {
4902
- /** Transport configuration for connecting to the MCP server */
4903
- transport: MCPTransportConfig | MCPTransport;
4904
- /** Optional callback for uncaught errors */
4905
- onUncaughtError?: (error: unknown) => void;
4906
- /** Optional client name, defaults to 'ai-sdk-mcp-client' */
4907
- name?: string;
4908
- }
4909
- declare function createMCPClient(config: MCPClientConfig): Promise<MCPClient>;
4910
- interface MCPClient {
4911
- tools<TOOL_SCHEMAS extends ToolSchemas = 'automatic'>(options?: {
4912
- schemas?: TOOL_SCHEMAS;
4913
- }): Promise<McpToolSet<TOOL_SCHEMAS>>;
4914
- close: () => Promise<void>;
4915
- }
4916
-
4917
4760
  /**
4918
4761
  The result of a `transcribe` call.
4919
4762
  It contains the transcript and additional information.
@@ -5039,4 +4882,4 @@ declare global {
5039
4882
  var AI_SDK_LOG_WARNINGS: LogWarningsFunction | undefined | false;
5040
4883
  }
5041
4884
 
5042
- 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 };
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 };