ai 5.0.0-beta.30 → 5.0.0-beta.32
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 +21 -0
- package/dist/bin/ai.min.js +18 -18
- package/dist/index.d.mts +115 -88
- package/dist/index.d.ts +115 -88
- package/dist/index.js +95 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +95 -35
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs.map +1 -1
- package/dist/mcp-stdio/index.js +24 -24
- package/dist/mcp-stdio/index.js.map +1 -1
- package/dist/mcp-stdio/index.mjs +24 -24
- package/dist/mcp-stdio/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ModelMessage, Tool, InferToolInput, InferToolOutput, AssistantModelMessage, ToolModelMessage, ReasoningPart, Schema, SystemModelMessage, UserModelMessage, ProviderOptions, IdGenerator, ToolCall, InferSchema, FlexibleSchema, DataContent, Validator, StandardSchemaV1, Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
|
2
|
-
export { AssistantContent, AssistantModelMessage, DataContent, FilePart, IdGenerator, ImagePart, InferToolInput, InferToolOutput, ModelMessage, Schema, SystemModelMessage, TextPart, Tool, ToolCallOptions, ToolCallPart, ToolContent, ToolExecuteFunction, ToolModelMessage, ToolResultPart, UserContent, UserModelMessage, asSchema, createIdGenerator, dynamicTool, generateId, jsonSchema, tool } from '@ai-sdk/provider-utils';
|
2
|
+
export { AssistantContent, AssistantModelMessage, DataContent, FilePart, IdGenerator, ImagePart, InferToolInput, InferToolOutput, ModelMessage, Schema, SystemModelMessage, TextPart, Tool, ToolCallOptions, ToolCallPart, ToolContent, ToolExecuteFunction, ToolModelMessage, ToolResultPart, UserContent, UserModelMessage, asSchema, createIdGenerator, dynamicTool, generateId, jsonSchema, tool, zodSchema } from '@ai-sdk/provider-utils';
|
3
3
|
import { AttributeValue, Tracer } from '@opentelemetry/api';
|
4
4
|
import { EmbeddingModelV2, EmbeddingModelV2Embedding, ImageModelV2, ImageModelV2CallWarning, ImageModelV2ProviderMetadata, JSONValue as JSONValue$1, LanguageModelV2, LanguageModelV2FinishReason, LanguageModelV2CallWarning, LanguageModelV2Source, SharedV2ProviderMetadata, SpeechModelV2, SpeechModelV2CallWarning, TranscriptionModelV2, TranscriptionModelV2CallWarning, LanguageModelV2Usage, LanguageModelV2CallOptions, AISDKError, LanguageModelV2ToolCall, JSONSchema7, JSONParseError, TypeValidationError, LanguageModelV2Middleware, ProviderV2, NoSuchModelError, JSONObject } from '@ai-sdk/provider';
|
5
5
|
export { AISDKError, APICallError, EmptyResponseBodyError, InvalidPromptError, InvalidResponseDataError, JSONParseError, JSONSchema7, LoadAPIKeyError, NoContentGeneratedError, NoSuchModelError, TypeValidationError, UnsupportedFunctionalityError } from '@ai-sdk/provider';
|
@@ -420,7 +420,7 @@ type ValueOf<ObjectType, ValueType extends keyof ObjectType = keyof ObjectType>
|
|
420
420
|
|
421
421
|
type ToolSet = Record<string, (Tool<never, never> | Tool<any, any> | Tool<any, never> | Tool<never, any>) & Pick<Tool<any, any>, 'execute' | 'onInputAvailable' | 'onInputStart' | 'onInputDelta'>>;
|
422
422
|
|
423
|
-
type
|
423
|
+
type StaticToolCall<TOOLS extends ToolSet> = ValueOf<{
|
424
424
|
[NAME in keyof TOOLS]: {
|
425
425
|
type: 'tool-call';
|
426
426
|
toolCallId: string;
|
@@ -430,7 +430,8 @@ type ToolCallUnion<TOOLS extends ToolSet> = ValueOf<{
|
|
430
430
|
dynamic?: false | undefined;
|
431
431
|
providerMetadata?: ProviderMetadata;
|
432
432
|
};
|
433
|
-
}
|
433
|
+
}>;
|
434
|
+
type DynamicToolCall = {
|
434
435
|
type: 'tool-call';
|
435
436
|
toolCallId: string;
|
436
437
|
toolName: string;
|
@@ -439,49 +440,51 @@ type ToolCallUnion<TOOLS extends ToolSet> = ValueOf<{
|
|
439
440
|
dynamic: true;
|
440
441
|
providerMetadata?: ProviderMetadata;
|
441
442
|
};
|
442
|
-
type
|
443
|
+
type TypedToolCall<TOOLS extends ToolSet> = StaticToolCall<TOOLS> | DynamicToolCall;
|
443
444
|
|
444
|
-
type
|
445
|
+
type StaticToolError<TOOLS extends ToolSet> = ValueOf<{
|
445
446
|
[NAME in keyof TOOLS]: {
|
446
|
-
type: 'tool-
|
447
|
+
type: 'tool-error';
|
447
448
|
toolCallId: string;
|
448
449
|
toolName: NAME & string;
|
449
450
|
input: InferToolInput<TOOLS[NAME]>;
|
450
|
-
|
451
|
+
error: unknown;
|
451
452
|
providerExecuted?: boolean;
|
452
453
|
dynamic?: false | undefined;
|
453
454
|
};
|
454
|
-
}
|
455
|
-
|
455
|
+
}>;
|
456
|
+
type DynamicToolError = {
|
457
|
+
type: 'tool-error';
|
456
458
|
toolCallId: string;
|
457
459
|
toolName: string;
|
458
460
|
input: unknown;
|
459
|
-
|
461
|
+
error: unknown;
|
460
462
|
providerExecuted?: boolean;
|
461
463
|
dynamic: true;
|
462
464
|
};
|
463
|
-
type
|
464
|
-
|
465
|
-
type
|
465
|
+
type TypedToolError<TOOLS extends ToolSet> = StaticToolError<TOOLS> | DynamicToolError;
|
466
|
+
|
467
|
+
type StaticToolResult<TOOLS extends ToolSet> = ValueOf<{
|
466
468
|
[NAME in keyof TOOLS]: {
|
467
|
-
type: 'tool-
|
469
|
+
type: 'tool-result';
|
468
470
|
toolCallId: string;
|
469
471
|
toolName: NAME & string;
|
470
472
|
input: InferToolInput<TOOLS[NAME]>;
|
471
|
-
|
473
|
+
output: InferToolOutput<TOOLS[NAME]>;
|
472
474
|
providerExecuted?: boolean;
|
473
475
|
dynamic?: false | undefined;
|
474
476
|
};
|
475
|
-
}
|
476
|
-
|
477
|
+
}>;
|
478
|
+
type DynamicToolResult = {
|
479
|
+
type: 'tool-result';
|
477
480
|
toolCallId: string;
|
478
481
|
toolName: string;
|
479
482
|
input: unknown;
|
480
|
-
|
483
|
+
output: unknown;
|
481
484
|
providerExecuted?: boolean;
|
482
485
|
dynamic: true;
|
483
486
|
};
|
484
|
-
type
|
487
|
+
type TypedToolResult<TOOLS extends ToolSet> = StaticToolResult<TOOLS> | DynamicToolResult;
|
485
488
|
|
486
489
|
type ContentPart<TOOLS extends ToolSet> = {
|
487
490
|
type: 'text';
|
@@ -499,15 +502,15 @@ type ContentPart<TOOLS extends ToolSet> = {
|
|
499
502
|
providerMetadata?: ProviderMetadata;
|
500
503
|
} | ({
|
501
504
|
type: 'tool-call';
|
502
|
-
} &
|
505
|
+
} & TypedToolCall<TOOLS> & {
|
503
506
|
providerMetadata?: ProviderMetadata;
|
504
507
|
}) | ({
|
505
508
|
type: 'tool-result';
|
506
|
-
} &
|
509
|
+
} & TypedToolResult<TOOLS> & {
|
507
510
|
providerMetadata?: ProviderMetadata;
|
508
511
|
}) | ({
|
509
512
|
type: 'tool-error';
|
510
|
-
} &
|
513
|
+
} & TypedToolError<TOOLS> & {
|
511
514
|
providerMetadata?: ProviderMetadata;
|
512
515
|
});
|
513
516
|
|
@@ -548,11 +551,27 @@ type StepResult<TOOLS extends ToolSet> = {
|
|
548
551
|
/**
|
549
552
|
The tool calls that were made during the generation.
|
550
553
|
*/
|
551
|
-
readonly toolCalls:
|
554
|
+
readonly toolCalls: Array<TypedToolCall<TOOLS>>;
|
555
|
+
/**
|
556
|
+
The static tool calls that were made in the last step.
|
557
|
+
*/
|
558
|
+
readonly staticToolCalls: Array<StaticToolCall<TOOLS>>;
|
559
|
+
/**
|
560
|
+
The dynamic tool calls that were made in the last step.
|
561
|
+
*/
|
562
|
+
readonly dynamicToolCalls: Array<DynamicToolCall>;
|
552
563
|
/**
|
553
564
|
The results of the tool calls.
|
554
565
|
*/
|
555
|
-
readonly toolResults:
|
566
|
+
readonly toolResults: Array<TypedToolResult<TOOLS>>;
|
567
|
+
/**
|
568
|
+
The static tool results that were made in the last step.
|
569
|
+
*/
|
570
|
+
readonly staticToolResults: Array<StaticToolResult<TOOLS>>;
|
571
|
+
/**
|
572
|
+
The dynamic tool results that were made in the last step.
|
573
|
+
*/
|
574
|
+
readonly dynamicToolResults: Array<DynamicToolResult>;
|
556
575
|
/**
|
557
576
|
The reason why the generation finished.
|
558
577
|
*/
|
@@ -626,11 +645,27 @@ interface GenerateTextResult<TOOLS extends ToolSet, OUTPUT> {
|
|
626
645
|
/**
|
627
646
|
The tool calls that were made in the last step.
|
628
647
|
*/
|
629
|
-
readonly toolCalls:
|
648
|
+
readonly toolCalls: Array<TypedToolCall<TOOLS>>;
|
649
|
+
/**
|
650
|
+
The static tool calls that were made in the last step.
|
651
|
+
*/
|
652
|
+
readonly staticToolCalls: Array<StaticToolCall<TOOLS>>;
|
653
|
+
/**
|
654
|
+
The dynamic tool calls that were made in the last step.
|
655
|
+
*/
|
656
|
+
readonly dynamicToolCalls: Array<DynamicToolCall>;
|
630
657
|
/**
|
631
658
|
The results of the tool calls from the last step.
|
632
659
|
*/
|
633
|
-
readonly toolResults:
|
660
|
+
readonly toolResults: Array<TypedToolResult<TOOLS>>;
|
661
|
+
/**
|
662
|
+
The static tool results that were made in the last step.
|
663
|
+
*/
|
664
|
+
readonly staticToolResults: Array<StaticToolResult<TOOLS>>;
|
665
|
+
/**
|
666
|
+
The dynamic tool results that were made in the last step.
|
667
|
+
*/
|
668
|
+
readonly dynamicToolResults: Array<DynamicToolResult>;
|
634
669
|
/**
|
635
670
|
The reason why the generation finished.
|
636
671
|
*/
|
@@ -1442,8 +1477,12 @@ type InferUIMessageTools<T extends UIMessage> = T extends UIMessage<unknown, UID
|
|
1442
1477
|
type InferUIMessageToolCall<UI_MESSAGE extends UIMessage> = ValueOf<{
|
1443
1478
|
[NAME in keyof InferUIMessageTools<UI_MESSAGE>]: ToolCall<NAME & string, InferUIMessageTools<UI_MESSAGE>[NAME] extends {
|
1444
1479
|
input: infer INPUT;
|
1445
|
-
} ? INPUT : never
|
1446
|
-
|
1480
|
+
} ? INPUT : never> & {
|
1481
|
+
dynamic?: false;
|
1482
|
+
};
|
1483
|
+
}> | (ToolCall<string, unknown> & {
|
1484
|
+
dynamic: true;
|
1485
|
+
});
|
1447
1486
|
|
1448
1487
|
type DataUIMessageChunk<DATA_TYPES extends UIDataTypes> = ValueOf<{
|
1449
1488
|
[NAME in keyof DATA_TYPES & string]: {
|
@@ -1623,11 +1662,6 @@ type UIMessageStreamOptions<UI_MESSAGE extends UIMessage> = {
|
|
1623
1662
|
* Set to false if you are using additional streamText calls
|
1624
1663
|
* and the message start event has already been sent.
|
1625
1664
|
* Default to true.
|
1626
|
-
*
|
1627
|
-
* Note: this setting is currently not used, but you should
|
1628
|
-
* already set it to false if you are using additional
|
1629
|
-
* streamText calls that send additional data to prevent
|
1630
|
-
* the message start event from being sent multiple times.
|
1631
1665
|
*/
|
1632
1666
|
sendStart?: boolean;
|
1633
1667
|
/**
|
@@ -1685,13 +1719,37 @@ interface StreamTextResult<TOOLS extends ToolSet, PARTIAL_OUTPUT> {
|
|
1685
1719
|
|
1686
1720
|
Resolved when the response is finished.
|
1687
1721
|
*/
|
1688
|
-
readonly toolCalls: Promise<
|
1722
|
+
readonly toolCalls: Promise<TypedToolCall<TOOLS>[]>;
|
1723
|
+
/**
|
1724
|
+
The static tool calls that have been executed in the last step.
|
1725
|
+
|
1726
|
+
Resolved when the response is finished.
|
1727
|
+
*/
|
1728
|
+
readonly staticToolCalls: Promise<StaticToolCall<TOOLS>[]>;
|
1729
|
+
/**
|
1730
|
+
The dynamic tool calls that have been executed in the last step.
|
1731
|
+
|
1732
|
+
Resolved when the response is finished.
|
1733
|
+
*/
|
1734
|
+
readonly dynamicToolCalls: Promise<DynamicToolCall[]>;
|
1735
|
+
/**
|
1736
|
+
The static tool results that have been generated in the last step.
|
1737
|
+
|
1738
|
+
Resolved when the response is finished.
|
1739
|
+
*/
|
1740
|
+
readonly staticToolResults: Promise<StaticToolResult<TOOLS>[]>;
|
1741
|
+
/**
|
1742
|
+
The dynamic tool results that have been generated in the last step.
|
1743
|
+
|
1744
|
+
Resolved when the response is finished.
|
1745
|
+
*/
|
1746
|
+
readonly dynamicToolResults: Promise<DynamicToolResult[]>;
|
1689
1747
|
/**
|
1690
1748
|
The tool results that have been generated in the last step.
|
1691
1749
|
|
1692
1750
|
Resolved when the all tool executions are finished.
|
1693
1751
|
*/
|
1694
|
-
readonly toolResults: Promise<
|
1752
|
+
readonly toolResults: Promise<TypedToolResult<TOOLS>[]>;
|
1695
1753
|
/**
|
1696
1754
|
The reason why the generation finished. Taken from the last step.
|
1697
1755
|
|
@@ -1872,11 +1930,11 @@ type TextStreamPart<TOOLS extends ToolSet> = {
|
|
1872
1930
|
file: GeneratedFile;
|
1873
1931
|
} | ({
|
1874
1932
|
type: 'tool-call';
|
1875
|
-
} &
|
1933
|
+
} & TypedToolCall<TOOLS>) | ({
|
1876
1934
|
type: 'tool-result';
|
1877
|
-
} &
|
1935
|
+
} & TypedToolResult<TOOLS>) | ({
|
1878
1936
|
type: 'tool-error';
|
1879
|
-
} &
|
1937
|
+
} & TypedToolError<TOOLS>) | {
|
1880
1938
|
type: 'start-step';
|
1881
1939
|
request: LanguageModelRequestMetadata;
|
1882
1940
|
warnings: CallWarning[];
|
@@ -2214,11 +2272,11 @@ type SingleRequestTextStreamPart<TOOLS extends ToolSet> = {
|
|
2214
2272
|
file: GeneratedFile;
|
2215
2273
|
} | ({
|
2216
2274
|
type: 'tool-call';
|
2217
|
-
} &
|
2275
|
+
} & TypedToolCall<TOOLS>) | ({
|
2218
2276
|
type: 'tool-result';
|
2219
|
-
} &
|
2277
|
+
} & TypedToolResult<TOOLS>) | ({
|
2220
2278
|
type: 'tool-error';
|
2221
|
-
} &
|
2279
|
+
} & TypedToolError<TOOLS>) | {
|
2222
2280
|
type: 'file';
|
2223
2281
|
file: GeneratedFile;
|
2224
2282
|
} | {
|
@@ -2828,6 +2886,12 @@ interface StreamObjectResult<PARTIAL, RESULT, ELEMENT_STREAM> {
|
|
2828
2886
|
*/
|
2829
2887
|
readonly response: Promise<LanguageModelResponseMetadata>;
|
2830
2888
|
/**
|
2889
|
+
The reason why the generation finished. Taken from the last step.
|
2890
|
+
|
2891
|
+
Resolved when the response is finished.
|
2892
|
+
*/
|
2893
|
+
readonly finishReason: Promise<FinishReason>;
|
2894
|
+
/**
|
2831
2895
|
The generated object (typed according to the schema). Resolved when the response is finished.
|
2832
2896
|
*/
|
2833
2897
|
readonly object: Promise<RESULT>;
|
@@ -3452,11 +3516,12 @@ type MCPTransportConfig = {
|
|
3452
3516
|
type ToolSchemas = Record<string, {
|
3453
3517
|
inputSchema: FlexibleSchema<JSONObject | unknown>;
|
3454
3518
|
}> | 'automatic' | undefined;
|
3455
|
-
type MappedTool<T extends Tool | JSONObject, OUTPUT extends any> = T extends Tool<infer INPUT> ? Tool<INPUT, OUTPUT> : T extends JSONObject ? Tool<T, OUTPUT> : never;
|
3456
3519
|
type McpToolSet<TOOL_SCHEMAS extends ToolSchemas = 'automatic'> = TOOL_SCHEMAS extends Record<string, {
|
3457
|
-
inputSchema: FlexibleSchema<
|
3520
|
+
inputSchema: FlexibleSchema<any>;
|
3458
3521
|
}> ? {
|
3459
|
-
[K in keyof TOOL_SCHEMAS]:
|
3522
|
+
[K in keyof TOOL_SCHEMAS]: TOOL_SCHEMAS[K] extends {
|
3523
|
+
inputSchema: FlexibleSchema<infer INPUT>;
|
3524
|
+
} ? Tool<INPUT, CallToolResult> & Required<Pick<Tool<INPUT, CallToolResult>, 'execute'>> : never;
|
3460
3525
|
} : McpToolSet<Record<string, {
|
3461
3526
|
inputSchema: FlexibleSchema<unknown>;
|
3462
3527
|
}>>;
|
@@ -3467,7 +3532,7 @@ declare const CallToolResultSchema: z.ZodUnion<[z.ZodObject<{
|
|
3467
3532
|
text: z.ZodString;
|
3468
3533
|
}, z.core.$loose>, z.ZodObject<{
|
3469
3534
|
type: z.ZodLiteral<"image">;
|
3470
|
-
data: z.
|
3535
|
+
data: z.ZodBase64;
|
3471
3536
|
mimeType: z.ZodString;
|
3472
3537
|
}, z.core.$loose>, z.ZodObject<{
|
3473
3538
|
type: z.ZodLiteral<"resource">;
|
@@ -3478,7 +3543,7 @@ declare const CallToolResultSchema: z.ZodUnion<[z.ZodObject<{
|
|
3478
3543
|
}, z.core.$loose>, z.ZodObject<{
|
3479
3544
|
uri: z.ZodString;
|
3480
3545
|
mimeType: z.ZodOptional<z.ZodString>;
|
3481
|
-
blob: z.
|
3546
|
+
blob: z.ZodBase64;
|
3482
3547
|
}, z.core.$loose>]>;
|
3483
3548
|
}, z.core.$loose>]>>;
|
3484
3549
|
isError: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
@@ -3497,49 +3562,11 @@ interface MCPClientConfig {
|
|
3497
3562
|
name?: string;
|
3498
3563
|
}
|
3499
3564
|
declare function createMCPClient(config: MCPClientConfig): Promise<MCPClient>;
|
3500
|
-
|
3501
|
-
|
3502
|
-
*
|
3503
|
-
* The primary purpose of this client is tool conversion between MCP<>AI SDK
|
3504
|
-
* but can later be extended to support other MCP features
|
3505
|
-
*
|
3506
|
-
* Tool parameters are automatically inferred from the server's JSON schema
|
3507
|
-
* if not explicitly provided in the tools configuration
|
3508
|
-
*
|
3509
|
-
* This client is meant to be used to communicate with a single server. To communicate and fetch tools across multiple servers, it's recommended to create a new client instance per server.
|
3510
|
-
*
|
3511
|
-
* Not supported:
|
3512
|
-
* - Client options (e.g. sampling, roots) as they are not needed for tool conversion
|
3513
|
-
* - Accepting notifications
|
3514
|
-
* - Session management (when passing a sessionId to an instance of the Streamable HTTP transport)
|
3515
|
-
* - Resumable SSE streams
|
3516
|
-
*/
|
3517
|
-
declare class MCPClient {
|
3518
|
-
private transport;
|
3519
|
-
private onUncaughtError?;
|
3520
|
-
private clientInfo;
|
3521
|
-
private requestMessageId;
|
3522
|
-
private responseHandlers;
|
3523
|
-
private serverCapabilities;
|
3524
|
-
private isClosed;
|
3525
|
-
constructor({ transport: transportConfig, name, onUncaughtError, }: MCPClientConfig);
|
3526
|
-
init(): Promise<this>;
|
3527
|
-
close(): Promise<void>;
|
3528
|
-
private assertCapability;
|
3529
|
-
private request;
|
3530
|
-
private listTools;
|
3531
|
-
private callTool;
|
3532
|
-
private notification;
|
3533
|
-
/**
|
3534
|
-
* Returns a set of AI SDK tools from the MCP server
|
3535
|
-
* @returns A record of tool names to their implementations
|
3536
|
-
*/
|
3537
|
-
tools<TOOL_SCHEMAS extends ToolSchemas = 'automatic'>({ schemas, }?: {
|
3565
|
+
interface MCPClient {
|
3566
|
+
tools<TOOL_SCHEMAS extends ToolSchemas = 'automatic'>(options?: {
|
3538
3567
|
schemas?: TOOL_SCHEMAS;
|
3539
3568
|
}): Promise<McpToolSet<TOOL_SCHEMAS>>;
|
3540
|
-
|
3541
|
-
private onError;
|
3542
|
-
private onResponse;
|
3569
|
+
close: () => Promise<void>;
|
3543
3570
|
}
|
3544
3571
|
|
3545
3572
|
/**
|
@@ -4140,4 +4167,4 @@ declare global {
|
|
4140
4167
|
var AI_SDK_DEFAULT_PROVIDER: ProviderV2 | undefined;
|
4141
4168
|
}
|
4142
4169
|
|
4143
|
-
export { AbstractChat, AsyncIterableStream, CallSettings, CallWarning, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DownloadError, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, ErrorHandler, Agent as Experimental_Agent, AgentSettings as Experimental_AgentSettings, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputSpecifiedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningUIPart, RepairTextFunction, RetryError, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolCallRepairError, ToolCallRepairFunction,
|
4170
|
+
export { AbstractChat, AsyncIterableStream, CallSettings, CallWarning, 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, Agent as Experimental_Agent, AgentSettings as Experimental_AgentSettings, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputSpecifiedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningUIPart, RepairTextFunction, RetryError, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StaticToolCall, StaticToolError, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, TypedToolCall, TypedToolError, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, 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, hasToolCall, isDeepEqualData, isToolUIPart, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, readUIMessageStream, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, userModelMessageSchema, wrapLanguageModel, wrapProvider };
|