ai 7.0.131 → 7.0.133
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 +25 -0
- package/dist/index.d.ts +122 -101
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +60 -11
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +21 -14
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +1 -1
- package/docs/03-ai-sdk-core/17-mcp-events.mdx +169 -0
- package/docs/03-ai-sdk-core/32-decisions.mdx +54 -6
- package/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +13 -0
- package/docs/07-reference/01-ai-sdk-core/14-decide.mdx +4 -2
- package/docs/07-reference/01-ai-sdk-core/17-create-agent-ui-stream.mdx +41 -2
- package/docs/07-reference/01-ai-sdk-core/18-create-agent-ui-stream-response.mdx +10 -1
- package/docs/07-reference/01-ai-sdk-core/18-pipe-agent-ui-stream-to-response.mdx +10 -1
- package/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +46 -1
- package/docs/07-reference/01-ai-sdk-core/24-mcp-events.mdx +797 -0
- package/docs/07-reference/01-ai-sdk-core/index.mdx +6 -0
- package/docs/07-reference/02-ai-sdk-ui/50-direct-chat-transport.mdx +13 -0
- package/package.json +12 -12
- package/src/agent/create-agent-ui-stream-response.ts +6 -10
- package/src/agent/create-agent-ui-stream.ts +22 -4
- package/src/agent/pipe-agent-ui-stream-to-response.ts +6 -10
- package/src/decide/decide-events.ts +5 -3
- package/src/decide/decide.ts +7 -9
- package/src/decide/decision-result.ts +1 -2
- package/src/decide/decision-state.ts +61 -0
- package/src/decide/index.ts +8 -2
- package/src/decide/validate-decision.ts +25 -5
- package/src/generate-text/stream-text-result.ts +11 -0
- package/src/generate-text/stream-text.ts +9 -0
- package/src/ui-message-stream/to-ui-message-stream.ts +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 7.0.133
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9184a35: Add ordered text, file, and JSON parts to experimental decision state. Support image input in OpenAI Decisions and language model adapters. Gateway retains its existing string and JSON request format and rejects files, as does TypeSafe AI.
|
|
8
|
+
|
|
9
|
+
Arrays passed directly as state now contain decision state parts. Wrap JSON arrays in an object or a json part.
|
|
10
|
+
|
|
11
|
+
Normalize all public state forms into an array of parts before calling decision providers. Providers receive text and JSON objects as text and json parts.
|
|
12
|
+
|
|
13
|
+
Serialize decision file bytes as base64 in OpenTelemetry state attributes. Model-call spans record normalized state parts, while outer spans retain public state inputs.
|
|
14
|
+
|
|
15
|
+
Preserve native JSON state in TypeSafe AI when state contains one JSON part. Label shared state in language-model decision prompts.
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [9184a35]
|
|
18
|
+
- @ai-sdk/provider@4.0.25
|
|
19
|
+
- @ai-sdk/provider-utils@5.0.57
|
|
20
|
+
- @ai-sdk/gateway@4.0.108
|
|
21
|
+
|
|
22
|
+
## 7.0.132
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 3ebefff: feat(ai): introduce 'onUIMessageStepEnd' callback to persist messages
|
|
27
|
+
|
|
3
28
|
## 7.0.131
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GatewayAsyncJobMetadata, GatewayModelId, GatewayModelId as GatewayModelId$1, GatewayProviderMetadata, createGateway, gateway } from "@ai-sdk/gateway";
|
|
2
2
|
import { Arrayable, AssistantContent, AssistantModelMessage, AssistantModelMessage as AssistantModelMessage$1, Context, DataContent, DataContent as DataContent$1, DownloadError, Experimental_SandboxProcess, Experimental_SandboxSession, Experimental_SandboxSession as Experimental_SandboxSession$1, Experimental_ToolCallerTool, Experimental_ToolCallerTool as Experimental_ToolCallerTool$1, FetchFunction, FilePart, FilePart as FilePart$1, FlexibleSchema, FlexibleSchema as FlexibleSchema$1, HasRequiredKey, IdGenerator, IdGenerator as IdGenerator$1, ImagePart, InferSchema, InferSchema as InferSchema$1, InferToolContext, InferToolInput, InferToolInput as InferToolInput$1, InferToolOutput, InferToolOutput as InferToolOutput$1, InferToolSetContext, MaybePromiseLike, ModelMessage, ModelMessage as ModelMessage$1, ProviderOptions, ReasoningFilePart, ReasoningPart, Resolvable, Schema, SystemModelMessage, SystemModelMessage as SystemModelMessage$1, TextPart, TextPart as TextPart$1, Tool, Tool as Tool$1, ToolApprovalRequest, ToolApprovalResponse, ToolCall, ToolCallPart, ToolContent, ToolExecuteFunction, ToolExecutionOptions, ToolExecutionOptions as ToolExecutionOptions$1, ToolModelMessage, ToolModelMessage as ToolModelMessage$1, ToolResultPart, ToolSet, ToolSet as ToolSet$1, UserContent, UserModelMessage, UserModelMessage as UserModelMessage$1, asSchema, createIdGenerator, dynamicTool, experimental_toolCaller, generateId as generateId$1, jsonSchema, parseJsonEventStream, tool as tool$1, zodSchema } from "@ai-sdk/provider-utils";
|
|
3
|
-
import { AISDKError, AISDKError as AISDKError$1, APICallError, EmbeddingModelV2, EmbeddingModelV3, EmbeddingModelV4, EmbeddingModelV4CallOptions, EmbeddingModelV4Embedding, EmbeddingModelV4Middleware, EmptyResponseBodyError, Experimental_BatchV4, Experimental_BatchV4Error, Experimental_BatchV4ModelIds, Experimental_BatchV4StartResult, Experimental_BatchV4Status, Experimental_DecisionModelV4, Experimental_DecisionModelV4CallOptions, Experimental_DecisionModelV4Question, Experimental_DecisionModelV4Result, Experimental_DecisionRefusalError, Experimental_DecisionUnsupportedQuestionTypeError, Experimental_DecisionUnsupportedQuestionTypeError as Experimental_DecisionUnsupportedQuestionTypeError$1, Experimental_EvaluationModelV4, Experimental_RealtimeFactoryV4, Experimental_RealtimeFactoryV4GetTokenOptions, Experimental_RealtimeFactoryV4GetTokenResult, Experimental_RealtimeModelV4, Experimental_RealtimeModelV4ClientEvent, Experimental_RealtimeModelV4ServerEvent, Experimental_RealtimeModelV4SessionConfig, Experimental_RealtimeModelV4ToolDefinition, Experimental_SpeechTranslationModelV4, Experimental_SpeechTranslationModelV4Usage, Experimental_VideoModelV3, Experimental_VideoModelV4, Experimental_VideoModelV4FrameType, Experimental_VideoModelV4OperationStatusResult, Experimental_VideoModelV4OperationWebhook, FilesV4, FilesV4UploadFileCallOptions, ImageModelV2, ImageModelV2ProviderMetadata, ImageModelV3, ImageModelV4, ImageModelV4Middleware, ImageModelV4ProviderMetadata, ImageModelV4Usage, InvalidPromptError, InvalidResponseDataError, JSONObject, JSONParseError, JSONParseError as JSONParseError$1, JSONSchema7, JSONSchema7 as JSONSchema7$1, JSONValue as JSONValue$1, LanguageModelV2, LanguageModelV3, LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4Content, LanguageModelV4Middleware, LanguageModelV4Prompt, LanguageModelV4Source, LanguageModelV4ToolCall, LanguageModelV4ToolChoice, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, NoSuchModelError as NoSuchModelError$1, NoSuchProviderReferenceError, ProviderV2, ProviderV3, ProviderV4, RerankingModelV3, RerankingModelV4, SharedV4AudioFormat, SharedV4Headers, SharedV4ProviderMetadata, SharedV4ProviderReference, SharedV4Warning, SkillsV4, SkillsV4File, SkillsV4UploadSkillCallOptions, SkillsV4UploadSkillResult, SpeechModelV2, SpeechModelV3, SpeechModelV4, TooManyEmbeddingValuesForCallError, TranscriptionModelV2, TranscriptionModelV3, TranscriptionModelV4, TypeValidationError, TypeValidationError as TypeValidationError$1, UnsupportedFunctionalityError } from "@ai-sdk/provider";
|
|
3
|
+
import { AISDKError, AISDKError as AISDKError$1, APICallError, EmbeddingModelV2, EmbeddingModelV3, EmbeddingModelV4, EmbeddingModelV4CallOptions, EmbeddingModelV4Embedding, EmbeddingModelV4Middleware, EmptyResponseBodyError, Experimental_BatchV4, Experimental_BatchV4Error, Experimental_BatchV4ModelIds, Experimental_BatchV4StartResult, Experimental_BatchV4Status, Experimental_DecisionModelV4, Experimental_DecisionModelV4CallOptions, Experimental_DecisionModelV4Question, Experimental_DecisionModelV4Question as Experimental_DecisionQuestion, Experimental_DecisionModelV4Result, Experimental_DecisionRefusalError, Experimental_DecisionUnsupportedQuestionTypeError, Experimental_DecisionUnsupportedQuestionTypeError as Experimental_DecisionUnsupportedQuestionTypeError$1, Experimental_EvaluationModelV4, Experimental_RealtimeFactoryV4, Experimental_RealtimeFactoryV4GetTokenOptions, Experimental_RealtimeFactoryV4GetTokenResult, Experimental_RealtimeModelV4, Experimental_RealtimeModelV4ClientEvent, Experimental_RealtimeModelV4ServerEvent, Experimental_RealtimeModelV4SessionConfig, Experimental_RealtimeModelV4ToolDefinition, Experimental_SpeechTranslationModelV4, Experimental_SpeechTranslationModelV4Usage, Experimental_VideoModelV3, Experimental_VideoModelV4, Experimental_VideoModelV4FrameType, Experimental_VideoModelV4OperationStatusResult, Experimental_VideoModelV4OperationWebhook, FilesV4, FilesV4UploadFileCallOptions, ImageModelV2, ImageModelV2ProviderMetadata, ImageModelV3, ImageModelV4, ImageModelV4Middleware, ImageModelV4ProviderMetadata, ImageModelV4Usage, InvalidPromptError, InvalidResponseDataError, JSONObject, JSONParseError, JSONParseError as JSONParseError$1, JSONSchema7, JSONSchema7 as JSONSchema7$1, JSONValue as JSONValue$1, LanguageModelV2, LanguageModelV3, LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4Content, LanguageModelV4Middleware, LanguageModelV4Prompt, LanguageModelV4Source, LanguageModelV4ToolCall, LanguageModelV4ToolChoice, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, NoSuchModelError as NoSuchModelError$1, NoSuchProviderReferenceError, ProviderV2, ProviderV3, ProviderV4, RerankingModelV3, RerankingModelV4, SharedV4AudioFormat, SharedV4Headers, SharedV4ProviderMetadata, SharedV4ProviderReference, SharedV4Warning, SkillsV4, SkillsV4File, SkillsV4UploadSkillCallOptions, SkillsV4UploadSkillResult, SpeechModelV2, SpeechModelV3, SpeechModelV4, TooManyEmbeddingValuesForCallError, TranscriptionModelV2, TranscriptionModelV3, TranscriptionModelV4, TypeValidationError, TypeValidationError as TypeValidationError$1, UnsupportedFunctionalityError } from "@ai-sdk/provider";
|
|
4
4
|
import { ZodType, array, boolean, custom, discriminatedUnion, enum as enum$1, instanceof as instanceof$1, lazy, literal, looseObject, never, null as null$1, number, object, record, string, union, unknown } from "zod/v4";
|
|
5
5
|
import { ServerResponse } from "node:http";
|
|
6
6
|
import { ServerResponse as ServerResponse$1 } from "http";
|
|
@@ -541,10 +541,17 @@ export type EmbeddingModelCallEndEvent = {
|
|
|
541
541
|
readonly usage: EmbeddingModelUsage;
|
|
542
542
|
};
|
|
543
543
|
//#endregion
|
|
544
|
+
//#region src/decide/decision-state.d.ts
|
|
545
|
+
/** Shared text, JSON data, or ordered multimodal parts for a decision. */
|
|
546
|
+
type DecisionState = string | Readonly<JSONObject> | readonly DecisionStatePart[];
|
|
547
|
+
type DecisionStatePart = TextPart$1 | FilePart$1 | {
|
|
548
|
+
type: 'json';
|
|
549
|
+
value: JSONValue$1;
|
|
550
|
+
};
|
|
551
|
+
//#endregion
|
|
544
552
|
//#region src/decide/decision-result.d.ts
|
|
545
553
|
type DecisionModel = string | Experimental_DecisionModelV4 | Experimental_EvaluationModelV4;
|
|
546
|
-
type
|
|
547
|
-
type DecisionAnswer<QUESTION extends DecisionQuestion> = QUESTION extends {
|
|
554
|
+
type DecisionAnswer<QUESTION extends Experimental_DecisionModelV4Question> = QUESTION extends {
|
|
548
555
|
type: 'choice';
|
|
549
556
|
criteria: infer CRITERIA;
|
|
550
557
|
} ? {
|
|
@@ -561,7 +568,7 @@ type DecisionAnswer<QUESTION extends DecisionQuestion> = QUESTION extends {
|
|
|
561
568
|
type: 'boolean';
|
|
562
569
|
probability: number;
|
|
563
570
|
};
|
|
564
|
-
type DecisionResult<QUESTIONS extends Record<string,
|
|
571
|
+
type DecisionResult<QUESTIONS extends Record<string, Experimental_DecisionModelV4Question>> = {
|
|
565
572
|
readonly answers: { [ID in keyof QUESTIONS]: DecisionAnswer<QUESTIONS[ID]>; };
|
|
566
573
|
readonly usage: {
|
|
567
574
|
inputTokens: number | undefined;
|
|
@@ -595,9 +602,9 @@ type DecideStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
|
|
|
595
602
|
/** The decision model identifier. */
|
|
596
603
|
readonly modelId: string;
|
|
597
604
|
/** The shared state used to make decisions. */
|
|
598
|
-
readonly state:
|
|
605
|
+
readonly state: DecisionState;
|
|
599
606
|
/** The questions to decide against the shared state. */
|
|
600
|
-
readonly questions: Readonly<Record<string,
|
|
607
|
+
readonly questions: Readonly<Record<string, Experimental_DecisionModelV4Question>>;
|
|
601
608
|
/** Maximum number of retries for the decision model call. */
|
|
602
609
|
readonly maxRetries: number;
|
|
603
610
|
/** Additional HTTP headers sent with the request. */
|
|
@@ -612,17 +619,17 @@ type DecideStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
|
|
|
612
619
|
*/
|
|
613
620
|
type DecideEndEvent<RUNTIME_CONTEXT extends Context = Context> = DecideStartEvent<RUNTIME_CONTEXT> & {
|
|
614
621
|
/** Exactly one typed answer per question ID. */
|
|
615
|
-
readonly answers: DecisionResult<Record<string,
|
|
622
|
+
readonly answers: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['answers'];
|
|
616
623
|
/** Token usage for the decision operation. */
|
|
617
|
-
readonly usage: DecisionResult<Record<string,
|
|
624
|
+
readonly usage: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['usage'];
|
|
618
625
|
/** Warnings from the decision model. */
|
|
619
|
-
readonly warnings: DecisionResult<Record<string,
|
|
626
|
+
readonly warnings: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['warnings'];
|
|
620
627
|
/** Provider-declared decimal precision for probabilities and scores. */
|
|
621
|
-
readonly rounding: DecisionResult<Record<string,
|
|
628
|
+
readonly rounding: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['rounding'];
|
|
622
629
|
/** Optional provider-specific metadata. */
|
|
623
|
-
readonly providerMetadata: DecisionResult<Record<string,
|
|
630
|
+
readonly providerMetadata: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['providerMetadata'];
|
|
624
631
|
/** Response metadata, including the resolved model ID and timestamp. */
|
|
625
|
-
readonly response: DecisionResult<Record<string,
|
|
632
|
+
readonly response: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['response'];
|
|
626
633
|
};
|
|
627
634
|
/**
|
|
628
635
|
* Event fired when the decision model call begins.
|
|
@@ -641,7 +648,7 @@ type DecisionModelCallStartEvent = {
|
|
|
641
648
|
/** The shared state used to make decisions. */
|
|
642
649
|
readonly state: Experimental_DecisionModelV4CallOptions['state'];
|
|
643
650
|
/** The questions to decide against the shared state. */
|
|
644
|
-
readonly questions:
|
|
651
|
+
readonly questions: Experimental_DecisionModelV4CallOptions['questions'];
|
|
645
652
|
};
|
|
646
653
|
/**
|
|
647
654
|
* Event fired after the decision model response has been validated.
|
|
@@ -2738,6 +2745,37 @@ type UIMessageStreamOnEndCallback<UI_MESSAGE extends UIMessage> = (event: {
|
|
|
2738
2745
|
finishReason?: FinishReason;
|
|
2739
2746
|
}) => PromiseLike<void> | void;
|
|
2740
2747
|
//#endregion
|
|
2748
|
+
//#region src/ui-message-stream/ui-message-stream-on-step-end-callback.d.ts
|
|
2749
|
+
/**
|
|
2750
|
+
* Callback that is called when a step ends during streaming.
|
|
2751
|
+
* This is useful for persisting intermediate UI messages during multi-step agent runs.
|
|
2752
|
+
*/
|
|
2753
|
+
type UIMessageStreamOnStepEndCallback<UI_MESSAGE extends UIMessage> = (event: {
|
|
2754
|
+
/**
|
|
2755
|
+
* The updated list of UI messages at the end of this step.
|
|
2756
|
+
*/
|
|
2757
|
+
messages: UI_MESSAGE[];
|
|
2758
|
+
/**
|
|
2759
|
+
* Indicates whether the response message is a continuation of the last original message,
|
|
2760
|
+
* or if a new message was created.
|
|
2761
|
+
*/
|
|
2762
|
+
isContinuation: boolean;
|
|
2763
|
+
/**
|
|
2764
|
+
* The message that was sent to the client as a response
|
|
2765
|
+
* (including the original message if it was extended).
|
|
2766
|
+
*/
|
|
2767
|
+
responseMessage: UI_MESSAGE;
|
|
2768
|
+
}) => PromiseLike<void> | void;
|
|
2769
|
+
//#endregion
|
|
2770
|
+
//#region src/ui-message-stream/ui-message-stream-on-step-finish-callback.d.ts
|
|
2771
|
+
/**
|
|
2772
|
+
* Callback that is called when a step finishes during streaming.
|
|
2773
|
+
* This is useful for persisting intermediate UI messages during multi-step agent runs.
|
|
2774
|
+
*
|
|
2775
|
+
* @deprecated Use `UIMessageStreamOnStepEndCallback` instead.
|
|
2776
|
+
*/
|
|
2777
|
+
type UIMessageStreamOnStepFinishCallback<UI_MESSAGE extends UIMessage> = UIMessageStreamOnStepEndCallback<UI_MESSAGE>;
|
|
2778
|
+
//#endregion
|
|
2741
2779
|
//#region src/ui-message-stream/ui-message-stream-response-init.d.ts
|
|
2742
2780
|
/**
|
|
2743
2781
|
* Options for creating a UI message stream response.
|
|
@@ -2800,6 +2838,13 @@ type UIMessageStreamOptions<UI_MESSAGE extends UIMessage> = {
|
|
|
2800
2838
|
* the original messages are provided and the last message is an assistant message).
|
|
2801
2839
|
*/
|
|
2802
2840
|
generateMessageId?: IdGenerator$1;
|
|
2841
|
+
/**
|
|
2842
|
+
* Called after each step is converted to UI message parts.
|
|
2843
|
+
* Receives the accumulated UI message for inspection or persistence.
|
|
2844
|
+
*/
|
|
2845
|
+
onStepEnd?: UIMessageStreamOnStepEndCallback<UI_MESSAGE>;
|
|
2846
|
+
/** @deprecated Use `onStepEnd` instead. */
|
|
2847
|
+
onStepFinish?: UIMessageStreamOnStepFinishCallback<UI_MESSAGE>;
|
|
2803
2848
|
onEnd?: UIMessageStreamOnEndCallback<UI_MESSAGE>;
|
|
2804
2849
|
/**
|
|
2805
2850
|
* @deprecated Use `onEnd` instead.
|
|
@@ -5742,77 +5787,6 @@ export declare function convertToModelMessages<UI_MESSAGE extends UIMessage>(mes
|
|
|
5742
5787
|
convertDataPart?: (part: DataUIPart<InferUIMessageData<UI_MESSAGE>>) => TextPart$1 | FilePart$1 | undefined;
|
|
5743
5788
|
}): Promise<ModelMessage$1[]>;
|
|
5744
5789
|
//#endregion
|
|
5745
|
-
//#region src/agent/create-agent-ui-stream-response.d.ts
|
|
5746
|
-
/**
|
|
5747
|
-
* Runs the agent and returns a response object with a UI message stream.
|
|
5748
|
-
*
|
|
5749
|
-
* @param agent - The agent to run.
|
|
5750
|
-
* @param uiMessages - The input UI messages.
|
|
5751
|
-
* @param convertDataPart - Optional function to convert custom data parts to text or file model message parts.
|
|
5752
|
-
* @param abortSignal - Abort signal. Optional.
|
|
5753
|
-
* @param timeout - Timeout in milliseconds. Optional.
|
|
5754
|
-
* @param experimental_sandbox - The sandbox environment that is passed through to tool execution. Optional.
|
|
5755
|
-
* @param options - The options for the agent. Optional.
|
|
5756
|
-
* @param experimental_transform - Stream transformations. Optional.
|
|
5757
|
-
* @param onStepEnd - Callback that is called when each step ends. Optional.
|
|
5758
|
-
* @param onStepFinish - Deprecated alias for `onStepEnd`. Optional.
|
|
5759
|
-
* @param headers - Additional headers for the response. Optional.
|
|
5760
|
-
* @param status - The status code for the response. Optional.
|
|
5761
|
-
* @param statusText - The status text for the response. Optional.
|
|
5762
|
-
* @param keepAliveMs - Optional interval for sending SSE keep-alive comments.
|
|
5763
|
-
* @param consumeSseStream - Whether to consume the SSE stream. Optional.
|
|
5764
|
-
*
|
|
5765
|
-
* @returns The response object.
|
|
5766
|
-
*/
|
|
5767
|
-
export declare function createAgentUIStreamResponse<CALL_OPTIONS = never, TOOLS extends ToolSet$1 = {}, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = never, MESSAGE_METADATA = unknown, UI_MESSAGE extends UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>> = UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>>>({ headers, status, statusText, keepAliveMs, consumeSseStream, ...options }: {
|
|
5768
|
-
agent: Agent<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT, OUTPUT>;
|
|
5769
|
-
uiMessages: unknown[];
|
|
5770
|
-
/**
|
|
5771
|
-
* Converts custom UI data parts to text or file model message parts.
|
|
5772
|
-
* Data parts are ignored when omitted or when the callback returns undefined.
|
|
5773
|
-
*/
|
|
5774
|
-
convertDataPart?: NonNullable<Parameters<typeof convertToModelMessages<UI_MESSAGE>>[1]>['convertDataPart'];
|
|
5775
|
-
abortSignal?: AbortSignal;
|
|
5776
|
-
timeout?: TimeoutConfiguration<TOOLS>;
|
|
5777
|
-
experimental_sandbox?: Experimental_SandboxSession$1;
|
|
5778
|
-
options?: CALL_OPTIONS;
|
|
5779
|
-
experimental_transform?: Arrayable<StreamTextTransform<TOOLS>>;
|
|
5780
|
-
onStepEnd?: GenerateTextOnStepEndCallback<TOOLS>;
|
|
5781
|
-
/** @deprecated Use `onStepEnd` instead. */
|
|
5782
|
-
onStepFinish?: GenerateTextOnStepFinishCallback<TOOLS>;
|
|
5783
|
-
} & UIMessageStreamResponseInit & UIMessageStreamOptions<UI_MESSAGE>): Promise<Response>;
|
|
5784
|
-
//#endregion
|
|
5785
|
-
//#region src/ui-message-stream/ui-message-stream-on-step-end-callback.d.ts
|
|
5786
|
-
/**
|
|
5787
|
-
* Callback that is called when a step ends during streaming.
|
|
5788
|
-
* This is useful for persisting intermediate UI messages during multi-step agent runs.
|
|
5789
|
-
*/
|
|
5790
|
-
type UIMessageStreamOnStepEndCallback<UI_MESSAGE extends UIMessage> = (event: {
|
|
5791
|
-
/**
|
|
5792
|
-
* The updated list of UI messages at the end of this step.
|
|
5793
|
-
*/
|
|
5794
|
-
messages: UI_MESSAGE[];
|
|
5795
|
-
/**
|
|
5796
|
-
* Indicates whether the response message is a continuation of the last original message,
|
|
5797
|
-
* or if a new message was created.
|
|
5798
|
-
*/
|
|
5799
|
-
isContinuation: boolean;
|
|
5800
|
-
/**
|
|
5801
|
-
* The message that was sent to the client as a response
|
|
5802
|
-
* (including the original message if it was extended).
|
|
5803
|
-
*/
|
|
5804
|
-
responseMessage: UI_MESSAGE;
|
|
5805
|
-
}) => PromiseLike<void> | void;
|
|
5806
|
-
//#endregion
|
|
5807
|
-
//#region src/ui-message-stream/ui-message-stream-on-step-finish-callback.d.ts
|
|
5808
|
-
/**
|
|
5809
|
-
* Callback that is called when a step finishes during streaming.
|
|
5810
|
-
* This is useful for persisting intermediate UI messages during multi-step agent runs.
|
|
5811
|
-
*
|
|
5812
|
-
* @deprecated Use `UIMessageStreamOnStepEndCallback` instead.
|
|
5813
|
-
*/
|
|
5814
|
-
type UIMessageStreamOnStepFinishCallback<UI_MESSAGE extends UIMessage> = UIMessageStreamOnStepEndCallback<UI_MESSAGE>;
|
|
5815
|
-
//#endregion
|
|
5816
5790
|
//#region src/ui/call-completion-api.d.ts
|
|
5817
5791
|
declare const getOriginalFetch: () => typeof fetch;
|
|
5818
5792
|
export declare function callCompletionApi({ api, prompt, credentials, headers, body, streamProtocol, setCompletion, setLoading, setError, setAbortController, getAbortController, onFinish, onError, fetch }: {
|
|
@@ -6603,9 +6577,9 @@ export declare function toUIMessageChunk<TOOLS extends ToolSet$1 = ToolSet$1, UI
|
|
|
6603
6577
|
* Converts a stream of `TextStreamPart<TOOLS>` chunks (as emitted by
|
|
6604
6578
|
* `streamText`'s `stream`) into a stream of `UIMessageChunk`s suitable for
|
|
6605
6579
|
* UI message streaming, including response message ID injection and
|
|
6606
|
-
*
|
|
6580
|
+
* step and stream end callbacks.
|
|
6607
6581
|
*/
|
|
6608
|
-
export declare function toUIMessageStream<TOOLS extends ToolSet$1 = ToolSet$1, UI_MESSAGE extends UIMessage = UIMessage>({ stream, tools, sendReasoning, sendSources, sendStart, sendFinish, onError, messageMetadata, originalMessages, generateMessageId, onEnd, onFinish }: {
|
|
6582
|
+
export declare function toUIMessageStream<TOOLS extends ToolSet$1 = ToolSet$1, UI_MESSAGE extends UIMessage = UIMessage>({ stream, tools, sendReasoning, sendSources, sendStart, sendFinish, onError, messageMetadata, originalMessages, generateMessageId, onStepEnd, onStepFinish, onEnd, onFinish }: {
|
|
6609
6583
|
stream: ReadableStream<TextStreamPart<TOOLS>>;
|
|
6610
6584
|
tools?: TOOLS;
|
|
6611
6585
|
} & UIMessageStreamOptions<UI_MESSAGE>): ReadableStream<InferUIMessageChunk<UI_MESSAGE>>;
|
|
@@ -6626,6 +6600,19 @@ export declare const UI_MESSAGE_STREAM_HEADERS: {
|
|
|
6626
6600
|
type UIMessageStreamOnFinishCallback<UI_MESSAGE extends UIMessage> = UIMessageStreamOnEndCallback<UI_MESSAGE>;
|
|
6627
6601
|
//#endregion
|
|
6628
6602
|
//#region src/agent/create-agent-ui-stream.d.ts
|
|
6603
|
+
/**
|
|
6604
|
+
* UI stream options with separate generation and UI message step callbacks.
|
|
6605
|
+
*/
|
|
6606
|
+
type AgentUIMessageStreamOptions<TOOLS extends ToolSet$1, UI_MESSAGE extends UIMessage> = Omit<UIMessageStreamOptions<UI_MESSAGE>, 'onStepEnd' | 'onStepFinish'> & {
|
|
6607
|
+
onStepEnd?: GenerateTextOnStepEndCallback<TOOLS>;
|
|
6608
|
+
/** @deprecated Use `onStepEnd` instead. */
|
|
6609
|
+
onStepFinish?: GenerateTextOnStepFinishCallback<TOOLS>;
|
|
6610
|
+
/**
|
|
6611
|
+
* Called after each step is converted to UI message parts.
|
|
6612
|
+
* Receives the accumulated UI message for inspection or persistence.
|
|
6613
|
+
*/
|
|
6614
|
+
onUIMessageStepEnd?: UIMessageStreamOnStepEndCallback<UI_MESSAGE>;
|
|
6615
|
+
};
|
|
6629
6616
|
/**
|
|
6630
6617
|
* Runs the agent and stream the output as a UI message stream.
|
|
6631
6618
|
*
|
|
@@ -6639,10 +6626,11 @@ type UIMessageStreamOnFinishCallback<UI_MESSAGE extends UIMessage> = UIMessageSt
|
|
|
6639
6626
|
* @param experimental_transform - The stream transformations. Optional.
|
|
6640
6627
|
* @param onStepEnd - Callback that is called when each step ends. Optional.
|
|
6641
6628
|
* @param onStepFinish - Deprecated alias for `onStepEnd`. Optional.
|
|
6629
|
+
* @param onUIMessageStepEnd - Callback with the accumulated UI message after each step. Optional.
|
|
6642
6630
|
*
|
|
6643
6631
|
* @returns The UI message stream.
|
|
6644
6632
|
*/
|
|
6645
|
-
export declare function createAgentUIStream<CALL_OPTIONS = never, TOOLS extends ToolSet$1 = {}, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = never, MESSAGE_METADATA = unknown, UI_MESSAGE extends UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>> = UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>>>({ agent, uiMessages, convertDataPart, options, abortSignal, timeout, experimental_sandbox: sandbox, experimental_transform, onStepEnd, onStepFinish, ...uiMessageStreamOptions }: {
|
|
6633
|
+
export declare function createAgentUIStream<CALL_OPTIONS = never, TOOLS extends ToolSet$1 = {}, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = never, MESSAGE_METADATA = unknown, UI_MESSAGE extends UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>> = UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>>>({ agent, uiMessages, convertDataPart, options, abortSignal, timeout, experimental_sandbox: sandbox, experimental_transform, onStepEnd, onStepFinish, onUIMessageStepEnd, ...uiMessageStreamOptions }: {
|
|
6646
6634
|
agent: Agent<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT, OUTPUT>;
|
|
6647
6635
|
uiMessages: unknown[];
|
|
6648
6636
|
/**
|
|
@@ -6655,10 +6643,45 @@ export declare function createAgentUIStream<CALL_OPTIONS = never, TOOLS extends
|
|
|
6655
6643
|
experimental_sandbox?: Experimental_SandboxSession$1;
|
|
6656
6644
|
options?: CALL_OPTIONS;
|
|
6657
6645
|
experimental_transform?: Arrayable<StreamTextTransform<TOOLS>>;
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6646
|
+
} & AgentUIMessageStreamOptions<TOOLS, UI_MESSAGE>): Promise<AsyncIterableStream<InferUIMessageChunk<UI_MESSAGE>>>;
|
|
6647
|
+
//#endregion
|
|
6648
|
+
//#region src/agent/create-agent-ui-stream-response.d.ts
|
|
6649
|
+
/**
|
|
6650
|
+
* Runs the agent and returns a response object with a UI message stream.
|
|
6651
|
+
*
|
|
6652
|
+
* @param agent - The agent to run.
|
|
6653
|
+
* @param uiMessages - The input UI messages.
|
|
6654
|
+
* @param convertDataPart - Optional function to convert custom data parts to text or file model message parts.
|
|
6655
|
+
* @param abortSignal - Abort signal. Optional.
|
|
6656
|
+
* @param timeout - Timeout in milliseconds. Optional.
|
|
6657
|
+
* @param experimental_sandbox - The sandbox environment that is passed through to tool execution. Optional.
|
|
6658
|
+
* @param options - The options for the agent. Optional.
|
|
6659
|
+
* @param experimental_transform - Stream transformations. Optional.
|
|
6660
|
+
* @param onStepEnd - Callback that is called when each step ends. Optional.
|
|
6661
|
+
* @param onStepFinish - Deprecated alias for `onStepEnd`. Optional.
|
|
6662
|
+
* @param onUIMessageStepEnd - Callback with the accumulated UI message after each step. Optional.
|
|
6663
|
+
* @param headers - Additional headers for the response. Optional.
|
|
6664
|
+
* @param status - The status code for the response. Optional.
|
|
6665
|
+
* @param statusText - The status text for the response. Optional.
|
|
6666
|
+
* @param keepAliveMs - Optional interval for sending SSE keep-alive comments.
|
|
6667
|
+
* @param consumeSseStream - Whether to consume the SSE stream. Optional.
|
|
6668
|
+
*
|
|
6669
|
+
* @returns The response object.
|
|
6670
|
+
*/
|
|
6671
|
+
export declare function createAgentUIStreamResponse<CALL_OPTIONS = never, TOOLS extends ToolSet$1 = {}, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = never, MESSAGE_METADATA = unknown, UI_MESSAGE extends UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>> = UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>>>({ headers, status, statusText, keepAliveMs, consumeSseStream, ...options }: {
|
|
6672
|
+
agent: Agent<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT, OUTPUT>;
|
|
6673
|
+
uiMessages: unknown[];
|
|
6674
|
+
/**
|
|
6675
|
+
* Converts custom UI data parts to text or file model message parts.
|
|
6676
|
+
* Data parts are ignored when omitted or when the callback returns undefined.
|
|
6677
|
+
*/
|
|
6678
|
+
convertDataPart?: NonNullable<Parameters<typeof convertToModelMessages<UI_MESSAGE>>[1]>['convertDataPart'];
|
|
6679
|
+
abortSignal?: AbortSignal;
|
|
6680
|
+
timeout?: TimeoutConfiguration<TOOLS>;
|
|
6681
|
+
experimental_sandbox?: Experimental_SandboxSession$1;
|
|
6682
|
+
options?: CALL_OPTIONS;
|
|
6683
|
+
experimental_transform?: Arrayable<StreamTextTransform<TOOLS>>;
|
|
6684
|
+
} & UIMessageStreamResponseInit & AgentUIMessageStreamOptions<TOOLS, UI_MESSAGE>): Promise<Response>;
|
|
6662
6685
|
//#endregion
|
|
6663
6686
|
//#region src/agent/pipe-agent-ui-stream-to-response.d.ts
|
|
6664
6687
|
/**
|
|
@@ -6675,6 +6698,7 @@ export declare function createAgentUIStream<CALL_OPTIONS = never, TOOLS extends
|
|
|
6675
6698
|
* @param experimental_transform - Stream transformations. Optional.
|
|
6676
6699
|
* @param onStepEnd - Callback that is called when each step ends. Optional.
|
|
6677
6700
|
* @param onStepFinish - Deprecated alias for `onStepEnd`. Optional.
|
|
6701
|
+
* @param onUIMessageStepEnd - Callback with the accumulated UI message after each step. Optional.
|
|
6678
6702
|
* @param headers - Additional headers for the response. Optional.
|
|
6679
6703
|
* @param status - The status code for the response. Optional.
|
|
6680
6704
|
* @param statusText - The status text for the response. Optional.
|
|
@@ -6695,10 +6719,7 @@ export declare function pipeAgentUIStreamToResponse<CALL_OPTIONS = never, TOOLS
|
|
|
6695
6719
|
experimental_sandbox?: Experimental_SandboxSession$1;
|
|
6696
6720
|
options?: CALL_OPTIONS;
|
|
6697
6721
|
experimental_transform?: Arrayable<StreamTextTransform<TOOLS>>;
|
|
6698
|
-
|
|
6699
|
-
/** @deprecated Use `onStepEnd` instead. */
|
|
6700
|
-
onStepFinish?: GenerateTextOnStepFinishCallback<TOOLS>;
|
|
6701
|
-
} & UIMessageStreamResponseInit & UIMessageStreamOptions<UI_MESSAGE>): Promise<void>;
|
|
6722
|
+
} & UIMessageStreamResponseInit & AgentUIMessageStreamOptions<TOOLS, UI_MESSAGE>): Promise<void>;
|
|
6702
6723
|
//#endregion
|
|
6703
6724
|
//#region src/generate-text/filter-active-tools.d.ts
|
|
6704
6725
|
type ActiveToolSubset<TOOLS extends ToolSet$1 | undefined, ACTIVE_TOOL_NAMES extends ActiveTools<NonNullable<TOOLS>>> = TOOLS extends undefined ? undefined : [ACTIVE_TOOL_NAMES] extends [NonNullable<ActiveTools<NonNullable<TOOLS>>>] ? Pick<NonNullable<TOOLS>, ACTIVE_TOOL_NAMES[number]> : TOOLS;
|
|
@@ -8088,10 +8109,10 @@ export type Experimental_EvaluationUnsupportedQuestionTypeError = Experimental_D
|
|
|
8088
8109
|
//#endregion
|
|
8089
8110
|
//#region src/decide/decide.d.ts
|
|
8090
8111
|
/** Decide answers to typed questions against one shared state. Experimental. */
|
|
8091
|
-
declare function decide<const QUESTIONS extends Record<string,
|
|
8112
|
+
declare function decide<const QUESTIONS extends Record<string, Experimental_DecisionModelV4Question>, RUNTIME_CONTEXT extends Context = Context>({ model: modelArg, state, questions, maxRetries, abortSignal, headers, providerOptions, telemetry, runtimeContext, onStart, onEnd, _internal: { generateCallId } }: {
|
|
8092
8113
|
/** A decision model instance or an ID resolved by the configured default provider. */
|
|
8093
8114
|
model: DecisionModel;
|
|
8094
|
-
state:
|
|
8115
|
+
state: DecisionState;
|
|
8095
8116
|
questions: QUESTIONS;
|
|
8096
8117
|
/** Maximum retries for transient provider failures. Defaults to 2. */
|
|
8097
8118
|
maxRetries?: number;
|
|
@@ -8126,11 +8147,11 @@ export type Experimental_EvaluationModelCallEndEvent = DecisionModelCallEndEvent
|
|
|
8126
8147
|
/** @deprecated Use `Experimental_DecisionModel` instead. */
|
|
8127
8148
|
export type Experimental_EvaluationModel = DecisionModel;
|
|
8128
8149
|
/** @deprecated Use `Experimental_DecisionQuestion` instead. */
|
|
8129
|
-
export type Experimental_EvaluationQuestion =
|
|
8150
|
+
export type Experimental_EvaluationQuestion = Experimental_DecisionModelV4Question;
|
|
8130
8151
|
/** @deprecated Use `Experimental_DecisionAnswer` instead. */
|
|
8131
|
-
export type Experimental_EvaluationAnswer<QUESTION extends
|
|
8152
|
+
export type Experimental_EvaluationAnswer<QUESTION extends Experimental_DecisionModelV4Question> = DecisionAnswer<QUESTION>;
|
|
8132
8153
|
/** @deprecated Use `Experimental_DecisionResult` instead. */
|
|
8133
|
-
export type Experimental_EvaluationResult<QUESTIONS extends Record<string,
|
|
8154
|
+
export type Experimental_EvaluationResult<QUESTIONS extends Record<string, Experimental_DecisionModelV4Question>> = DecisionResult<QUESTIONS>;
|
|
8134
8155
|
//#endregion
|
|
8135
8156
|
//#region src/generate-object/generate-object-result.d.ts
|
|
8136
8157
|
/**
|
|
@@ -10636,5 +10657,5 @@ export declare function uploadSkill({ api, files, displayTitle, providerOptions
|
|
|
10636
10657
|
files: UploadSkillFile[];
|
|
10637
10658
|
}): Promise<UploadSkillResult>;
|
|
10638
10659
|
//#endregion
|
|
10639
|
-
export { AISDKError, APICallError, type ActiveTools, type Agent, type AgentCallParameters, type AgentStreamParameters, type AssistantContent, type AssistantModelMessage, type AsyncIterableStream, type CallWarning, type CallWarningRegistry, type ChatAddToolApproveResponseFunction, type ChatAddToolOutputFunction, type ChatInit, type ChatOnDataCallback, type ChatOnErrorCallback, type ChatOnFinishCallback, type ChatOnToolCallCallback, type ChatRequestOptions, type ChatState, type ChatStatus, type ChatTransport, type ChunkDetector, type CompletionRequestOptions, type ContentPart, type CreateUIMessage, type CustomContentUIPart, type DataContent, type DataUIPart, type DeepPartial, type DirectChatTransportOptions, DownloadError, type DynamicToolCall, type DynamicToolError, type DynamicToolResult, type DynamicToolUIPart, type Embedding, type EmbeddingModel, type EmbeddingModelMiddleware, type EmbeddingModelUsage, EmptyResponseBodyError, type ErrorHandler, AbstractRealtimeSession as Experimental_AbstractRealtimeSession, ToolLoopAgent as Experimental_Agent, type ToolLoopAgentSettings as Experimental_AgentSettings, type ToolLoopAgentSettings, type Batch as Experimental_Batch, type BatchError as Experimental_BatchError, type BatchItemResult as Experimental_BatchItemResult, type BatchProvider as Experimental_BatchProvider, type BatchReference as Experimental_BatchReference, type BatchRequest as Experimental_BatchRequest, type BatchStatus as Experimental_BatchStatus, type CancelBatchOptions as Experimental_CancelBatchOptions, type CancelBatchResult as Experimental_CancelBatchResult, type DecideEndEvent as Experimental_DecideEndEvent, type DecideStartEvent as Experimental_DecideStartEvent, type DecisionAnswer as Experimental_DecisionAnswer, type DecisionModel as Experimental_DecisionModel, type DecisionModelCallEndEvent as Experimental_DecisionModelCallEndEvent, type DecisionModelCallStartEvent as Experimental_DecisionModelCallStartEvent, type DecisionProviderRegistry as Experimental_DecisionProviderRegistry, type DecisionQuestion as Experimental_DecisionQuestion, Experimental_DecisionRefusalError, type DecisionResult as Experimental_DecisionResult, Experimental_DecisionUnsupportedQuestionTypeError, type DownloadFunction as Experimental_DownloadFunction, type Experimental_GeneratedImage, type GetBatchResultsOptions as Experimental_GetBatchResultsOptions, type GetBatchStatusOptions as Experimental_GetBatchStatusOptions, type ImageBatchGenerationResult as Experimental_ImageBatchGenerationResult, type ImageBatchItemResult as Experimental_ImageBatchItemResult, type ImageBatchRequest as Experimental_ImageBatchRequest, type InferAgentUIMessage as Experimental_InferAgentUIMessage, type InferAgentUIMessage, type LanguageModelStreamPart as Experimental_LanguageModelStreamPart, type ListBatchesOptions as Experimental_ListBatchesOptions, type ListBatchesResult as Experimental_ListBatchesResult, type LogWarningsFunction as Experimental_LogWarningsFunction, type LogWarningsFunction, type RealtimeClientEvent as Experimental_RealtimeClientEvent, type RealtimeFactory as Experimental_RealtimeFactory, type RealtimeFactoryGetTokenOptions as Experimental_RealtimeFactoryGetTokenOptions, type RealtimeFactoryGetTokenResult as Experimental_RealtimeFactoryGetTokenResult, type RealtimeModel as Experimental_RealtimeModel, type RealtimeServerEvent as Experimental_RealtimeServerEvent, type RealtimeSessionConfig as Experimental_RealtimeSessionConfig, type RealtimeSessionOptions as Experimental_RealtimeSessionOptions, type RealtimeSessionState as Experimental_RealtimeSessionState, type RealtimeSetupResponse as Experimental_RealtimeSetupResponse, type RealtimeState as Experimental_RealtimeState, type RealtimeStatus as Experimental_RealtimeStatus, type RealtimeToolDefinition as Experimental_RealtimeToolDefinition, type Experimental_SandboxProcess, type Experimental_SandboxSession, type Experimental_SpeechResult, type StartBatchOptions as Experimental_StartBatchOptions, type StartBatchResult as Experimental_StartBatchResult, type StreamTranscriptionEndEvent as Experimental_StreamTranscriptionEndEvent, type StreamTranscriptionStartEvent as Experimental_StreamTranscriptionStartEvent, type StreamTranslationResult as Experimental_StreamTranslationResult, type TextBatchGenerationResult as Experimental_TextBatchGenerationResult, type TextBatchItemResult as Experimental_TextBatchItemResult, type TextBatchRequest as Experimental_TextBatchRequest, type Experimental_ToolCallerTool, type Experimental_ToolCallers, type Experimental_TranscriptionResult, type TranslationStreamPart as Experimental_TranslationStreamPart, type FilePart, type FileUIPart, type FinishReason, type FlexibleSchema, type GatewayAsyncJobMetadata, type GatewayModelId, type GatewayProviderMetadata, type GenerateImageCall, type GenerateImageResult, type GenerateObjectEndEvent, type GenerateObjectResult, type GenerateObjectStartEvent, type GenerateObjectStepEndEvent, type GenerateObjectStepStartEvent, type GenerateSpeechEndEvent, type GenerateSpeechStartEvent, type GenerateTextAbortEvent, type GenerateTextEndEvent, type GenerateTextInclude, type GenerateTextOnAbortCallback, type GenerateTextOnEndCallback, type GenerateTextOnFinishCallback, type GenerateTextOnStartCallback, type GenerateTextOnStepEndCallback, type GenerateTextOnStepFinishCallback, type GenerateTextOnStepStartCallback, type GenerateTextResult, type GenerateTextStartEvent, type GenerateTextStepEndEvent, type GenerateTextStepStartEvent, type GenerateVideoPrompt, type GenerateVideoResult, type GeneratedAudioFile, type GeneratedFile, type GenericToolApprovalFunction, type GetVideoStatusResult, type HttpChatTransportInitOptions, type IdGenerator, type ImageModel, type ImageModelMiddleware, type ImageModelProviderMetadata, type ImageModelResponseMetadata, type ImageModelUsage, type ImagePart, type InferCompleteOutput as InferGenerateOutput, type InferSchema, type InferPartialOutput as InferStreamOutput, type InferTelemetryEvent, type InferToolInput, type InferToolOutput, type InferUIDataParts, type InferUIMessageChunk, type InferUITool, type InferUITools, type Instructions, InvalidPromptError, InvalidResponseDataError, JSONParseError, type JSONSchema7, type JSONValue, type LanguageModel, type LanguageModelCallEndEvent, type LanguageModelCallOptions, type LanguageModelCallStartEvent, type LanguageModelMiddleware, type LanguageModelRequestMetadata, type LanguageModelResponseMetadata, type LanguageModelUsage, LoadAPIKeyError, LoadSettingError, type ModelInfo, type ModelMessage, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, type ObjectStreamPart, type OnFinishEvent, type OnLanguageModelCallEndCallback, type OnLanguageModelCallStartCallback, type OnStartEvent, type OnStepFinishEvent, type OnStepStartEvent, type OnToolCallFinishEvent, type OnToolCallStartEvent, type OnToolExecutionEndCallback, type OnToolExecutionStartCallback, output_d_exports as Output, type OutputChunkTimingStats, type Output as OutputInterface, type PrepareReconnectToStreamRequest, type PrepareSendMessagesRequest, type PrepareStepFunction, type PrepareStepResult, type Prompt, type Provider, type ProviderMetadata, type ProviderReference, type ProviderRegistryProvider, type ReasoningFileOutput, type ReasoningFileUIPart, type ReasoningOutput, type ReasoningUIPart, type RepairTextFunction, type RequestOptions, type RerankEndEvent, type RerankResult, type RerankStartEvent, type RerankingModel, type RerankingModelCallEndEvent, type RerankingModelCallStartEvent, type SafeValidateUIMessagesResult, type Schema, type SingleToolApprovalFunction, type SourceDocumentUIPart, type SourceUrlUIPart, type SpeechModel, type SpeechModelResponseMetadata, type SpeechResult, type StartVideoResult, type StaticToolCall, type StaticToolError, type StaticToolOutputDenied, type StaticToolResult, type StepResult, type StepResultPerformance, type StepStartUIPart, type StopCondition, type StreamObjectOnFinishCallback, type StreamObjectResult, type StreamTextEndEvent, type StreamTextInclude, type StreamTextOnChunkCallback, type StreamTextOnEndCallback, type StreamTextOnErrorCallback, type StreamTextOnErrorResult, type StreamTextOnErrorRetryCallback, type StreamTextResult, type StreamTextTransform, type StreamTranscriptionResult, type SystemModelMessage, type Telemetry, type TelemetryOptions, type TelemetryTracingChannelMessage, type TelemetryTracingEventType, type TextPart, type TextStreamPart, type TextUIPart, type TimeoutConfiguration, type ToUIMessageChunkOptions, TooManyEmbeddingValuesForCallError, type Tool, type ToolApprovalConfiguration, type ToolApprovalRequest, type ToolApprovalRequestOutput, type ToolApprovalResponse, type ToolApprovalResponseOutput, type ToolApprovalStatus, type ToolCallPart, type ToolCallRepairFunction, type ToolChoice, type ToolContent, type ToolExecuteFunction, type ToolExecutionEndEvent, type ToolExecutionOptions, type ToolExecutionStartEvent, type ToolInputRefinement, type ToolModelMessage, type ToolOrder, type ToolOutputErrorUIPart, type ToolResultPart, type ToolSet, type ToolUIPart, type TranscriptionEndEvent, type TranscriptionModel, type TranscriptionModelResponseMetadata, type TranscriptionResult, type TranscriptionStartEvent, type TranscriptionStreamPart, TypeValidationError, type TypedToolCall, type TypedToolError, type TypedToolOutputDenied, type TypedToolResult, type UIDataPartSchemas, type UIDataTypes, type UIMessage, type UIMessageChunk, type UIMessagePart, type UIMessageStreamOnEndCallback, type UIMessageStreamOnFinishCallback, type UIMessageStreamOnStepEndCallback, type UIMessageStreamOnStepFinishCallback, type UIMessageStreamOptions, type UIMessageStreamOutcome, type UIMessageStreamWriter, type UIMessageStreamWriterWithOutcome, type UITool, type UIToolInvocation, type UITools, UnsupportedFunctionalityError, type UploadFileResult, type UploadSkillResult, type UseCompletionOptions, type UserContent, type UserModelMessage, type Warning, asSchema, createGateway, createIdGenerator, dynamicTool, cancelBatch as experimental_cancelBatch, decide as experimental_decide, decodeRealtimeAudio as experimental_decodeRealtimeAudio, encodeRealtimeAudio as experimental_encodeRealtimeAudio, filterActiveTools as experimental_filterActiveTools, experimental_generateSpeech, getBatchResults as experimental_getBatchResults, getBatchStatus as experimental_getBatchStatus, getRealtimeToolDefinitions as experimental_getRealtimeToolDefinitions, listBatches as experimental_listBatches, resampleAudio as experimental_resampleAudio, startBatch as experimental_startBatch, streamLanguageModelCall as experimental_streamLanguageModelCall, streamTranscribe as experimental_streamTranscribe, streamTranslate as experimental_streamTranslate, experimental_toolCaller, experimental_transcribe, gateway, generateId$1 as generateId, isStepCount as stepCountIs, jsonSchema, parseJsonEventStream, tool$1 as tool, zodSchema };
|
|
10660
|
+
export { AISDKError, APICallError, type ActiveTools, type Agent, type AgentCallParameters, type AgentStreamParameters, type AssistantContent, type AssistantModelMessage, type AsyncIterableStream, type CallWarning, type CallWarningRegistry, type ChatAddToolApproveResponseFunction, type ChatAddToolOutputFunction, type ChatInit, type ChatOnDataCallback, type ChatOnErrorCallback, type ChatOnFinishCallback, type ChatOnToolCallCallback, type ChatRequestOptions, type ChatState, type ChatStatus, type ChatTransport, type ChunkDetector, type CompletionRequestOptions, type ContentPart, type CreateUIMessage, type CustomContentUIPart, type DataContent, type DataUIPart, type DeepPartial, type DirectChatTransportOptions, DownloadError, type DynamicToolCall, type DynamicToolError, type DynamicToolResult, type DynamicToolUIPart, type Embedding, type EmbeddingModel, type EmbeddingModelMiddleware, type EmbeddingModelUsage, EmptyResponseBodyError, type ErrorHandler, AbstractRealtimeSession as Experimental_AbstractRealtimeSession, ToolLoopAgent as Experimental_Agent, type ToolLoopAgentSettings as Experimental_AgentSettings, type ToolLoopAgentSettings, type Batch as Experimental_Batch, type BatchError as Experimental_BatchError, type BatchItemResult as Experimental_BatchItemResult, type BatchProvider as Experimental_BatchProvider, type BatchReference as Experimental_BatchReference, type BatchRequest as Experimental_BatchRequest, type BatchStatus as Experimental_BatchStatus, type CancelBatchOptions as Experimental_CancelBatchOptions, type CancelBatchResult as Experimental_CancelBatchResult, type DecideEndEvent as Experimental_DecideEndEvent, type DecideStartEvent as Experimental_DecideStartEvent, type DecisionAnswer as Experimental_DecisionAnswer, type DecisionModel as Experimental_DecisionModel, type DecisionModelCallEndEvent as Experimental_DecisionModelCallEndEvent, type DecisionModelCallStartEvent as Experimental_DecisionModelCallStartEvent, type DecisionProviderRegistry as Experimental_DecisionProviderRegistry, type Experimental_DecisionQuestion, Experimental_DecisionRefusalError, type DecisionResult as Experimental_DecisionResult, type DecisionState as Experimental_DecisionState, type DecisionStatePart as Experimental_DecisionStatePart, Experimental_DecisionUnsupportedQuestionTypeError, type DownloadFunction as Experimental_DownloadFunction, type Experimental_GeneratedImage, type GetBatchResultsOptions as Experimental_GetBatchResultsOptions, type GetBatchStatusOptions as Experimental_GetBatchStatusOptions, type ImageBatchGenerationResult as Experimental_ImageBatchGenerationResult, type ImageBatchItemResult as Experimental_ImageBatchItemResult, type ImageBatchRequest as Experimental_ImageBatchRequest, type InferAgentUIMessage as Experimental_InferAgentUIMessage, type InferAgentUIMessage, type LanguageModelStreamPart as Experimental_LanguageModelStreamPart, type ListBatchesOptions as Experimental_ListBatchesOptions, type ListBatchesResult as Experimental_ListBatchesResult, type LogWarningsFunction as Experimental_LogWarningsFunction, type LogWarningsFunction, type RealtimeClientEvent as Experimental_RealtimeClientEvent, type RealtimeFactory as Experimental_RealtimeFactory, type RealtimeFactoryGetTokenOptions as Experimental_RealtimeFactoryGetTokenOptions, type RealtimeFactoryGetTokenResult as Experimental_RealtimeFactoryGetTokenResult, type RealtimeModel as Experimental_RealtimeModel, type RealtimeServerEvent as Experimental_RealtimeServerEvent, type RealtimeSessionConfig as Experimental_RealtimeSessionConfig, type RealtimeSessionOptions as Experimental_RealtimeSessionOptions, type RealtimeSessionState as Experimental_RealtimeSessionState, type RealtimeSetupResponse as Experimental_RealtimeSetupResponse, type RealtimeState as Experimental_RealtimeState, type RealtimeStatus as Experimental_RealtimeStatus, type RealtimeToolDefinition as Experimental_RealtimeToolDefinition, type Experimental_SandboxProcess, type Experimental_SandboxSession, type Experimental_SpeechResult, type StartBatchOptions as Experimental_StartBatchOptions, type StartBatchResult as Experimental_StartBatchResult, type StreamTranscriptionEndEvent as Experimental_StreamTranscriptionEndEvent, type StreamTranscriptionStartEvent as Experimental_StreamTranscriptionStartEvent, type StreamTranslationResult as Experimental_StreamTranslationResult, type TextBatchGenerationResult as Experimental_TextBatchGenerationResult, type TextBatchItemResult as Experimental_TextBatchItemResult, type TextBatchRequest as Experimental_TextBatchRequest, type Experimental_ToolCallerTool, type Experimental_ToolCallers, type Experimental_TranscriptionResult, type TranslationStreamPart as Experimental_TranslationStreamPart, type FilePart, type FileUIPart, type FinishReason, type FlexibleSchema, type GatewayAsyncJobMetadata, type GatewayModelId, type GatewayProviderMetadata, type GenerateImageCall, type GenerateImageResult, type GenerateObjectEndEvent, type GenerateObjectResult, type GenerateObjectStartEvent, type GenerateObjectStepEndEvent, type GenerateObjectStepStartEvent, type GenerateSpeechEndEvent, type GenerateSpeechStartEvent, type GenerateTextAbortEvent, type GenerateTextEndEvent, type GenerateTextInclude, type GenerateTextOnAbortCallback, type GenerateTextOnEndCallback, type GenerateTextOnFinishCallback, type GenerateTextOnStartCallback, type GenerateTextOnStepEndCallback, type GenerateTextOnStepFinishCallback, type GenerateTextOnStepStartCallback, type GenerateTextResult, type GenerateTextStartEvent, type GenerateTextStepEndEvent, type GenerateTextStepStartEvent, type GenerateVideoPrompt, type GenerateVideoResult, type GeneratedAudioFile, type GeneratedFile, type GenericToolApprovalFunction, type GetVideoStatusResult, type HttpChatTransportInitOptions, type IdGenerator, type ImageModel, type ImageModelMiddleware, type ImageModelProviderMetadata, type ImageModelResponseMetadata, type ImageModelUsage, type ImagePart, type InferCompleteOutput as InferGenerateOutput, type InferSchema, type InferPartialOutput as InferStreamOutput, type InferTelemetryEvent, type InferToolInput, type InferToolOutput, type InferUIDataParts, type InferUIMessageChunk, type InferUITool, type InferUITools, type Instructions, InvalidPromptError, InvalidResponseDataError, JSONParseError, type JSONSchema7, type JSONValue, type LanguageModel, type LanguageModelCallEndEvent, type LanguageModelCallOptions, type LanguageModelCallStartEvent, type LanguageModelMiddleware, type LanguageModelRequestMetadata, type LanguageModelResponseMetadata, type LanguageModelUsage, LoadAPIKeyError, LoadSettingError, type ModelInfo, type ModelMessage, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, type ObjectStreamPart, type OnFinishEvent, type OnLanguageModelCallEndCallback, type OnLanguageModelCallStartCallback, type OnStartEvent, type OnStepFinishEvent, type OnStepStartEvent, type OnToolCallFinishEvent, type OnToolCallStartEvent, type OnToolExecutionEndCallback, type OnToolExecutionStartCallback, output_d_exports as Output, type OutputChunkTimingStats, type Output as OutputInterface, type PrepareReconnectToStreamRequest, type PrepareSendMessagesRequest, type PrepareStepFunction, type PrepareStepResult, type Prompt, type Provider, type ProviderMetadata, type ProviderReference, type ProviderRegistryProvider, type ReasoningFileOutput, type ReasoningFileUIPart, type ReasoningOutput, type ReasoningUIPart, type RepairTextFunction, type RequestOptions, type RerankEndEvent, type RerankResult, type RerankStartEvent, type RerankingModel, type RerankingModelCallEndEvent, type RerankingModelCallStartEvent, type SafeValidateUIMessagesResult, type Schema, type SingleToolApprovalFunction, type SourceDocumentUIPart, type SourceUrlUIPart, type SpeechModel, type SpeechModelResponseMetadata, type SpeechResult, type StartVideoResult, type StaticToolCall, type StaticToolError, type StaticToolOutputDenied, type StaticToolResult, type StepResult, type StepResultPerformance, type StepStartUIPart, type StopCondition, type StreamObjectOnFinishCallback, type StreamObjectResult, type StreamTextEndEvent, type StreamTextInclude, type StreamTextOnChunkCallback, type StreamTextOnEndCallback, type StreamTextOnErrorCallback, type StreamTextOnErrorResult, type StreamTextOnErrorRetryCallback, type StreamTextResult, type StreamTextTransform, type StreamTranscriptionResult, type SystemModelMessage, type Telemetry, type TelemetryOptions, type TelemetryTracingChannelMessage, type TelemetryTracingEventType, type TextPart, type TextStreamPart, type TextUIPart, type TimeoutConfiguration, type ToUIMessageChunkOptions, TooManyEmbeddingValuesForCallError, type Tool, type ToolApprovalConfiguration, type ToolApprovalRequest, type ToolApprovalRequestOutput, type ToolApprovalResponse, type ToolApprovalResponseOutput, type ToolApprovalStatus, type ToolCallPart, type ToolCallRepairFunction, type ToolChoice, type ToolContent, type ToolExecuteFunction, type ToolExecutionEndEvent, type ToolExecutionOptions, type ToolExecutionStartEvent, type ToolInputRefinement, type ToolModelMessage, type ToolOrder, type ToolOutputErrorUIPart, type ToolResultPart, type ToolSet, type ToolUIPart, type TranscriptionEndEvent, type TranscriptionModel, type TranscriptionModelResponseMetadata, type TranscriptionResult, type TranscriptionStartEvent, type TranscriptionStreamPart, TypeValidationError, type TypedToolCall, type TypedToolError, type TypedToolOutputDenied, type TypedToolResult, type UIDataPartSchemas, type UIDataTypes, type UIMessage, type UIMessageChunk, type UIMessagePart, type UIMessageStreamOnEndCallback, type UIMessageStreamOnFinishCallback, type UIMessageStreamOnStepEndCallback, type UIMessageStreamOnStepFinishCallback, type UIMessageStreamOptions, type UIMessageStreamOutcome, type UIMessageStreamWriter, type UIMessageStreamWriterWithOutcome, type UITool, type UIToolInvocation, type UITools, UnsupportedFunctionalityError, type UploadFileResult, type UploadSkillResult, type UseCompletionOptions, type UserContent, type UserModelMessage, type Warning, asSchema, createGateway, createIdGenerator, dynamicTool, cancelBatch as experimental_cancelBatch, decide as experimental_decide, decodeRealtimeAudio as experimental_decodeRealtimeAudio, encodeRealtimeAudio as experimental_encodeRealtimeAudio, filterActiveTools as experimental_filterActiveTools, experimental_generateSpeech, getBatchResults as experimental_getBatchResults, getBatchStatus as experimental_getBatchStatus, getRealtimeToolDefinitions as experimental_getRealtimeToolDefinitions, listBatches as experimental_listBatches, resampleAudio as experimental_resampleAudio, startBatch as experimental_startBatch, streamLanguageModelCall as experimental_streamLanguageModelCall, streamTranscribe as experimental_streamTranscribe, streamTranslate as experimental_streamTranslate, experimental_toolCaller, experimental_transcribe, gateway, generateId$1 as generateId, isStepCount as stepCountIs, jsonSchema, parseJsonEventStream, tool$1 as tool, zodSchema };
|
|
10640
10661
|
//# sourceMappingURL=index.d.ts.map
|