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/dist/internal/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Arrayable, AssistantModelMessage, AssistantModelMessage as AssistantModelMessage$1, Context, Experimental_SandboxSession, FlexibleSchema, HasRequiredKey, InferToolContext, InferToolInput, InferToolOutput, InferToolSetContext, MaybePromiseLike, ModelMessage, ModelMessage as ModelMessage$1, ProviderOptions, ReasoningFilePart, ReasoningPart, RetryFunction, ShouldRetryFunction, SystemModelMessage, Tool, ToolApprovalRequest, ToolApprovalResponse, ToolExecutionOptions, ToolModelMessage, ToolModelMessage as ToolModelMessage$1, ToolResultOutput, ToolResultPart, ToolSet, convertAsyncIteratorToReadableStream } from "@ai-sdk/provider-utils";
|
|
2
|
-
import { AISDKError, EmbeddingModelV4Embedding, Experimental_DecisionModelV4CallOptions, Experimental_DecisionModelV4Question, Experimental_DecisionModelV4Result, JSONObject, JSONSchema7, LanguageModelV2, LanguageModelV3, LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4Content, LanguageModelV4FunctionTool, LanguageModelV4Prompt, LanguageModelV4ProviderTool, LanguageModelV4Source, LanguageModelV4ToolCall, LanguageModelV4ToolChoice, LanguageModelV4ToolResultOutput, LanguageModelV4Usage, ProviderV2, ProviderV3, ProviderV4, SharedV4AudioFormat, SharedV4ProviderMetadata, SharedV4Warning } from "@ai-sdk/provider";
|
|
1
|
+
import { Arrayable, AssistantModelMessage, AssistantModelMessage as AssistantModelMessage$1, Context, Experimental_SandboxSession, FilePart, FlexibleSchema, HasRequiredKey, InferToolContext, InferToolInput, InferToolOutput, InferToolSetContext, MaybePromiseLike, ModelMessage, ModelMessage as ModelMessage$1, ProviderOptions, ReasoningFilePart, ReasoningPart, RetryFunction, ShouldRetryFunction, SystemModelMessage, TextPart, Tool, ToolApprovalRequest, ToolApprovalResponse, ToolExecutionOptions, ToolModelMessage, ToolModelMessage as ToolModelMessage$1, ToolResultOutput, ToolResultPart, ToolSet, convertAsyncIteratorToReadableStream } from "@ai-sdk/provider-utils";
|
|
2
|
+
import { AISDKError, EmbeddingModelV4Embedding, Experimental_DecisionModelV4CallOptions, Experimental_DecisionModelV4Question, Experimental_DecisionModelV4Result, JSONObject, JSONSchema7, JSONValue, LanguageModelV2, LanguageModelV3, LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4Content, LanguageModelV4FunctionTool, LanguageModelV4Prompt, LanguageModelV4ProviderTool, LanguageModelV4Source, LanguageModelV4ToolCall, LanguageModelV4ToolChoice, LanguageModelV4ToolResultOutput, LanguageModelV4Usage, ProviderV2, ProviderV3, ProviderV4, SharedV4AudioFormat, SharedV4ProviderMetadata, SharedV4Warning } from "@ai-sdk/provider";
|
|
3
3
|
import { 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";
|
|
4
4
|
import { GatewayModelId } from "@ai-sdk/gateway";
|
|
5
5
|
//#region src/types/embedding-model.d.ts
|
|
@@ -399,9 +399,16 @@ type EmbeddingModelCallEndEvent = {
|
|
|
399
399
|
readonly usage: EmbeddingModelUsage;
|
|
400
400
|
};
|
|
401
401
|
//#endregion
|
|
402
|
+
//#region src/decide/decision-state.d.ts
|
|
403
|
+
/** Shared text, JSON data, or ordered multimodal parts for a decision. */
|
|
404
|
+
type DecisionState = string | Readonly<JSONObject> | readonly DecisionStatePart[];
|
|
405
|
+
type DecisionStatePart = TextPart | FilePart | {
|
|
406
|
+
type: 'json';
|
|
407
|
+
value: JSONValue;
|
|
408
|
+
};
|
|
409
|
+
//#endregion
|
|
402
410
|
//#region src/decide/decision-result.d.ts
|
|
403
|
-
type
|
|
404
|
-
type DecisionAnswer<QUESTION extends DecisionQuestion> = QUESTION extends {
|
|
411
|
+
type DecisionAnswer<QUESTION extends Experimental_DecisionModelV4Question> = QUESTION extends {
|
|
405
412
|
type: 'choice';
|
|
406
413
|
criteria: infer CRITERIA;
|
|
407
414
|
} ? {
|
|
@@ -418,7 +425,7 @@ type DecisionAnswer<QUESTION extends DecisionQuestion> = QUESTION extends {
|
|
|
418
425
|
type: 'boolean';
|
|
419
426
|
probability: number;
|
|
420
427
|
};
|
|
421
|
-
type DecisionResult<QUESTIONS extends Record<string,
|
|
428
|
+
type DecisionResult<QUESTIONS extends Record<string, Experimental_DecisionModelV4Question>> = {
|
|
422
429
|
readonly answers: { [ID in keyof QUESTIONS]: DecisionAnswer<QUESTIONS[ID]>; };
|
|
423
430
|
readonly usage: {
|
|
424
431
|
inputTokens: number | undefined;
|
|
@@ -452,9 +459,9 @@ type DecideStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
|
|
|
452
459
|
/** The decision model identifier. */
|
|
453
460
|
readonly modelId: string;
|
|
454
461
|
/** The shared state used to make decisions. */
|
|
455
|
-
readonly state:
|
|
462
|
+
readonly state: DecisionState;
|
|
456
463
|
/** The questions to decide against the shared state. */
|
|
457
|
-
readonly questions: Readonly<Record<string,
|
|
464
|
+
readonly questions: Readonly<Record<string, Experimental_DecisionModelV4Question>>;
|
|
458
465
|
/** Maximum number of retries for the decision model call. */
|
|
459
466
|
readonly maxRetries: number;
|
|
460
467
|
/** Additional HTTP headers sent with the request. */
|
|
@@ -469,17 +476,17 @@ type DecideStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
|
|
|
469
476
|
*/
|
|
470
477
|
type DecideEndEvent<RUNTIME_CONTEXT extends Context = Context> = DecideStartEvent<RUNTIME_CONTEXT> & {
|
|
471
478
|
/** Exactly one typed answer per question ID. */
|
|
472
|
-
readonly answers: DecisionResult<Record<string,
|
|
479
|
+
readonly answers: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['answers'];
|
|
473
480
|
/** Token usage for the decision operation. */
|
|
474
|
-
readonly usage: DecisionResult<Record<string,
|
|
481
|
+
readonly usage: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['usage'];
|
|
475
482
|
/** Warnings from the decision model. */
|
|
476
|
-
readonly warnings: DecisionResult<Record<string,
|
|
483
|
+
readonly warnings: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['warnings'];
|
|
477
484
|
/** Provider-declared decimal precision for probabilities and scores. */
|
|
478
|
-
readonly rounding: DecisionResult<Record<string,
|
|
485
|
+
readonly rounding: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['rounding'];
|
|
479
486
|
/** Optional provider-specific metadata. */
|
|
480
|
-
readonly providerMetadata: DecisionResult<Record<string,
|
|
487
|
+
readonly providerMetadata: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['providerMetadata'];
|
|
481
488
|
/** Response metadata, including the resolved model ID and timestamp. */
|
|
482
|
-
readonly response: DecisionResult<Record<string,
|
|
489
|
+
readonly response: DecisionResult<Record<string, Experimental_DecisionModelV4Question>>['response'];
|
|
483
490
|
};
|
|
484
491
|
/**
|
|
485
492
|
* Event fired when the decision model call begins.
|
|
@@ -498,7 +505,7 @@ type DecisionModelCallStartEvent = {
|
|
|
498
505
|
/** The shared state used to make decisions. */
|
|
499
506
|
readonly state: Experimental_DecisionModelV4CallOptions['state'];
|
|
500
507
|
/** The questions to decide against the shared state. */
|
|
501
|
-
readonly questions:
|
|
508
|
+
readonly questions: Experimental_DecisionModelV4CallOptions['questions'];
|
|
502
509
|
};
|
|
503
510
|
/**
|
|
504
511
|
* Event fired after the decision model response has been validated.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["_0","DecisionModelV4Question","DecisionModelV4Result","DecisionModelV4CallOptions","DecisionModelV4Result","download","originalDownload","symbol","ModelMessage","SandboxSession","SandboxSession","AssistantModelMessage","ToolModelMessage","_$__step_result0.StepResult","_$__content_part0.ContentPart","_$__generated_file0.GeneratedFile","_$__reasoning_output0.ReasoningOutput","_$__reasoning_output0.ReasoningFileOutput","_$__tool_call0.TypedToolCall","_$__tool_call0.StaticToolCall","_$__tool_call0.DynamicToolCall","_$__tool_result0.TypedToolResult","_$__tool_result0.StaticToolResult","_$__tool_result0.DynamicToolResult","_$___types0.FinishReason","_$___types0.LanguageModelResponseMetadata","_$___types0.LanguageModelRequestMetadata"],"sources":["../../src/types/embedding-model.ts","../../src/types/language-model.ts","../../src/types/language-model-request-metadata.ts","../../src/generate-text/response-message.ts","../../src/types/language-model-response-metadata.ts","../../src/types/provider-metadata.ts","../../src/types/speech-model-response-metadata.ts","../../src/types/transcription-model-response-metadata.ts","../../src/types/usage.ts","../../src/types/warning.ts","../../src/logger/log-warnings.ts","../../src/embed/embed-events.ts","../../src/decide/decision-result.ts","../../src/decide/decide-events.ts","../../src/prompt/language-model-call-options.ts","../../src/prompt/request-options.ts","../../src/prompt/prompt.ts","../../src/generate-object/structured-output-events.ts","../../src/prompt/standardize-prompt.ts","../../src/util/callback.ts","../../src/generate-text/active-tools.ts","../../src/telemetry/telemetry-options.ts","../../src/util/download/download.ts","../../src/util/download/download-function.ts","../../src/generate-text/generated-file.ts","../../src/generate-text/reasoning-output.ts","../../src/util/value-of.ts","../../src/generate-text/tool-call.ts","../../src/generate-text/tool-approval-request-output.ts","../../src/generate-text/tool-approval-response-output.ts","../../src/generate-text/tool-error.ts","../../src/generate-text/tool-result.ts","../../src/generate-text/content-part.ts","../../src/generate-text/step-result.ts","../../src/generate-text/language-model-events.ts","../../src/generate-text/output-utils.ts","../../src/generate-text/tool-order.ts","../../src/util/async-iterable-stream.ts","../../src/generate-text/tool-output-denied.ts","../../src/generate-text/stream-text-result.ts","../../src/generate-text/tool-approval-configuration.ts","../../src/generate-text/tool-caller-configuration.ts","../../src/error/invalid-tool-input-error.ts","../../src/error/no-such-tool-error.ts","../../src/generate-text/tool-call-repair-function.ts","../../src/generate-text/tool-output.ts","../../src/generate-text/tool-execution-events.ts","../../src/generate-text/tool-input-refinement.ts","../../src/generate-text/tools-context-parameter.ts","../../src/generate-text/stream-text.ts","../../src/generate-text/output.ts","../../src/generate-text/generate-text-events.ts","../../src/rerank/rerank-events.ts","../../src/generate-speech/speech-events.ts","../../src/transcribe/transcription-events.ts","../../src/telemetry/tracing-channel.ts","../../src/telemetry/tracing-channel-publisher.ts","../../src/telemetry/telemetry.ts","../../src/global.ts","../../src/prompt/convert-to-language-model-prompt.ts","../../src/prompt/create-tool-model-output.ts","../../src/prompt/prepare-tool-choice.ts","../../src/prompt/prepare-tools.ts","../../src/prompt/prepare-language-model-call-options.ts","../../src/util/prepare-retries.ts","../../src/model/resolve-model.ts","../../src/util/merge-abort-signals.ts","../../src/util/merge-callbacks.ts","../../src/telemetry/create-telemetry-dispatcher.ts","../../src/generate-text/restricted-telemetry-dispatcher.ts","../../src/generate-text/parse-tool-call.ts","../../src/generate-text/validate-tool-context.ts","../../src/tool-search/prepare-tool-search.ts","../../src/generate-text/collect-tool-approvals.ts","../../src/generate-text/tool-approval-signature.ts","../../src/generate-text/validate-tool-approvals.ts","../../src/generate-text/to-response-messages.ts","../../src/generate-text/generate-text-result.ts","../../src/generate-text/default-generate-text-result.ts","../../src/generate-text/resolve-generated-file-data.ts","../../src/generate-text/convert-language-model-content.ts","../../src/generate-text/calculate-tokens-per-second.ts"],"mappings":";;;;;;;;KAmBY,YAAY;;;QCVhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA8BI;;;;;;KAOA,+BAA+B,4CAGvC,uBAEU,2BACN,+BAA+B;;;;KAK3B,gBACR,wBACA,kBACA,kBACA;;;;;;;;;;;;KAaQ;;;;;UAYK;EACf,UAAU;;;;;;KAOA,cAAc,0BAA0B;;;;KAKxC,SAAS;;;;;;;;;KAUT,WAAW,cAAc;EAI/B;EAAc,UAAU,cAAc;;;;;;;KC5GhC;;;;WAID,WAAW,MAAM;;;;WAKjB;;;;;;;;KCLC,kBAAkB,wBAAwB;;;;;;KCJ1C;;;;;;WAMD,UAAU,MAAM;;;;WAKhB;;;;WAKA,WAAW;;;;WAKX;;;;WAKA,UAAU;;;;WAKV;;;;;;;;;;KC1BC,mBAAmB;;;KCVnB;;;;EAIV,WAAW;;;;EAKX;;;;EAKA,UAAU;;;;EAKV;;;;KCnBU;;;;EAIV,WAAW;;;;EAKX;;;;EAKA,UAAU;;;;;;;KCLA;;;;EAIV;;;;EAKA;;;;IAIE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iBAAiB;WAClD,YAAY;mBACJ;EAEL,YAAA;IACV,yBAAyB,MAAM;IAC/B,OAAO,mBAAmB,OAAO,iBAAiB;IAClD,QAAQ,oBAAoB;IAC5B,YAAY;;mBAQG;MAEb,aAASC,WAAA,OAAA;MAIT,WAAOC,YAAA;MAIP;MAIA,SAROC;MAYP;MAIA,cARKC,kBAQIC;MAIT,aAASC,cAAA;MAIT,mBAAeC,eAAA;MAIf,oBAJeC;MAQf,eAAWC,gBAAA;MAIX,qBAAiBC,iBAAA;MAIjB,sBAJiBC;MAQjB,sCAAO;MAIP,gBARkBC;MAYlB;MAIA,uCAAQ;MAIR,+CAAgB;MAIhB,YAhBYC;MAoBZ,oBAAgB;MAOhB,WAPgBC;MAWhB,SAAK;MAIL,UAAM,YAAA,oBAAA;;;;KCpHP,oBAAoB,QACvB;EACE;;KAGQ,yBAAyB,QACnC,4BACS;;;wBCOW,4BAA4B,cAAc,WAC9D,SACA,WACA,aACA,sBACA,uBACA,OACA,aACA;EAEA,SAAS,MAAM;EACf,WAAW,MAAM,cAAc;EAC/B,aAAa,MAAM,WAAW;EAC9B,sBAAsB,MAAM,0BAA0B;EACtD,uBAAuB,MAAM,2BAA2B;EACxD,OAAO;EACP,cAAc;EACd,yBAAyB;IACvB,QAAQ,MAAM,YAAY;;;;;;;;;wBC7Bd,2BACd,QACA;EAEA;EACA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["_0","DecisionQuestion","DecisionModelV4Result","DecisionQuestion","DecisionModelV4CallOptions","DecisionModelV4Result","download","originalDownload","symbol","ModelMessage","SandboxSession","SandboxSession","AssistantModelMessage","ToolModelMessage","_$__step_result0.StepResult","_$__content_part0.ContentPart","_$__generated_file0.GeneratedFile","_$__reasoning_output0.ReasoningOutput","_$__reasoning_output0.ReasoningFileOutput","_$__tool_call0.TypedToolCall","_$__tool_call0.StaticToolCall","_$__tool_call0.DynamicToolCall","_$__tool_result0.TypedToolResult","_$__tool_result0.StaticToolResult","_$__tool_result0.DynamicToolResult","_$___types0.FinishReason","_$___types0.LanguageModelResponseMetadata","_$___types0.LanguageModelRequestMetadata"],"sources":["../../src/types/embedding-model.ts","../../src/types/language-model.ts","../../src/types/language-model-request-metadata.ts","../../src/generate-text/response-message.ts","../../src/types/language-model-response-metadata.ts","../../src/types/provider-metadata.ts","../../src/types/speech-model-response-metadata.ts","../../src/types/transcription-model-response-metadata.ts","../../src/types/usage.ts","../../src/types/warning.ts","../../src/logger/log-warnings.ts","../../src/embed/embed-events.ts","../../src/decide/decision-state.ts","../../src/decide/decision-result.ts","../../src/decide/decide-events.ts","../../src/prompt/language-model-call-options.ts","../../src/prompt/request-options.ts","../../src/prompt/prompt.ts","../../src/generate-object/structured-output-events.ts","../../src/prompt/standardize-prompt.ts","../../src/util/callback.ts","../../src/generate-text/active-tools.ts","../../src/telemetry/telemetry-options.ts","../../src/util/download/download.ts","../../src/util/download/download-function.ts","../../src/generate-text/generated-file.ts","../../src/generate-text/reasoning-output.ts","../../src/util/value-of.ts","../../src/generate-text/tool-call.ts","../../src/generate-text/tool-approval-request-output.ts","../../src/generate-text/tool-approval-response-output.ts","../../src/generate-text/tool-error.ts","../../src/generate-text/tool-result.ts","../../src/generate-text/content-part.ts","../../src/generate-text/step-result.ts","../../src/generate-text/language-model-events.ts","../../src/generate-text/output-utils.ts","../../src/generate-text/tool-order.ts","../../src/util/async-iterable-stream.ts","../../src/generate-text/tool-output-denied.ts","../../src/generate-text/stream-text-result.ts","../../src/generate-text/tool-approval-configuration.ts","../../src/generate-text/tool-caller-configuration.ts","../../src/error/invalid-tool-input-error.ts","../../src/error/no-such-tool-error.ts","../../src/generate-text/tool-call-repair-function.ts","../../src/generate-text/tool-output.ts","../../src/generate-text/tool-execution-events.ts","../../src/generate-text/tool-input-refinement.ts","../../src/generate-text/tools-context-parameter.ts","../../src/generate-text/stream-text.ts","../../src/generate-text/output.ts","../../src/generate-text/generate-text-events.ts","../../src/rerank/rerank-events.ts","../../src/generate-speech/speech-events.ts","../../src/transcribe/transcription-events.ts","../../src/telemetry/tracing-channel.ts","../../src/telemetry/tracing-channel-publisher.ts","../../src/telemetry/telemetry.ts","../../src/global.ts","../../src/prompt/convert-to-language-model-prompt.ts","../../src/prompt/create-tool-model-output.ts","../../src/prompt/prepare-tool-choice.ts","../../src/prompt/prepare-tools.ts","../../src/prompt/prepare-language-model-call-options.ts","../../src/util/prepare-retries.ts","../../src/model/resolve-model.ts","../../src/util/merge-abort-signals.ts","../../src/util/merge-callbacks.ts","../../src/telemetry/create-telemetry-dispatcher.ts","../../src/generate-text/restricted-telemetry-dispatcher.ts","../../src/generate-text/parse-tool-call.ts","../../src/generate-text/validate-tool-context.ts","../../src/tool-search/prepare-tool-search.ts","../../src/generate-text/collect-tool-approvals.ts","../../src/generate-text/tool-approval-signature.ts","../../src/generate-text/validate-tool-approvals.ts","../../src/generate-text/to-response-messages.ts","../../src/generate-text/generate-text-result.ts","../../src/generate-text/default-generate-text-result.ts","../../src/generate-text/resolve-generated-file-data.ts","../../src/generate-text/convert-language-model-content.ts","../../src/generate-text/calculate-tokens-per-second.ts"],"mappings":";;;;;;;;KAmBY,YAAY;;;QCVhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA8BI;;;;;;KAOA,+BAA+B,4CAGvC,uBAEU,2BACN,+BAA+B;;;;KAK3B,gBACR,wBACA,kBACA,kBACA;;;;;;;;;;;;KAaQ;;;;;UAYK;EACf,UAAU;;;;;;KAOA,cAAc,0BAA0B;;;;KAKxC,SAAS;;;;;;;;;KAUT,WAAW,cAAc;EAI/B;EAAc,UAAU,cAAc;;;;;;;KC5GhC;;;;WAID,WAAW,MAAM;;;;WAKjB;;;;;;;;KCLC,kBAAkB,wBAAwB;;;;;;KCJ1C;;;;;;WAMD,UAAU,MAAM;;;;WAKhB;;;;WAKA,WAAW;;;;WAKX;;;;WAKA,UAAU;;;;WAKV;;;;;;;;;;KC1BC,mBAAmB;;;KCVnB;;;;EAIV,WAAW;;;;EAKX;;;;EAKA,UA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W,OAAO;;;;;;;;WAS7B,QAAQ,oBAAoB;;;;qBC3K1B,0BACX,cAAc,SACd,wBAAwB,SACxB,eAAe,mBACJ,mBAAmB,OAAO,iBAAiB;WAC7C,OAAO,mBAAmB,OAAO,iBAAiB;WAClD,YAAY;mBACJ;EAEL,YAAA;IACV,yBAAyB,MAAM;IAC/B,OAAO,mBAAmB,OAAO,iBAAiB;IAClD,QAAQ,oBAAoB;IAC5B,YAAY;;mBAQG;MAEb,aAASC,WAAA,OAAA;MAIT,WAAOC,YAAA;MAIP;MAIA,SAROC;MAYP;MAIA,cARKC,kBAQIC;MAIT,aAASC,cAAA;MAIT,mBAAeC,eAAA;MAIf,oBAJeC;MAQf,eAAWC,gBAAA;MAIX,qBAAiBC,iBAAA;MAIjB,sBAJiBC;MAQjB,sCAAO;MAIP,gBARkBC;MAYlB;MAIA,uCAAQ;MAIR,+CAAgB;MAIhB,YAhBYC;MAoBZ,oBAAgB;MAOhB,WAPgBC;MAWhB,SAAK;MAIL,UAAM,YAAA,oBAAA;;;;KCpHP,oBAAoB,QACvB;EACE;;KAGQ,yBAAyB,QACnC,4BACS;;;wBCOW,4BAA4B,cAAc,WAC9D,SACA,WACA,aACA,sBACA,uBACA,OACA,aACA;EAEA,SAAS,MAAM;EACf,WAAW,MAAM,cAAc;EAC/B,aAAa,MAAM,WAAW;EAC9B,sBAAsB,MAAM,0BAA0B;EACtD,uBAAuB,MAAM,2BAA2B;EACxD,OAAO;EACP,cAAc;EACd,yBAAyB;IACvB,QAAQ,MAAM,YAAY;;;;;;;;;wBC7Bd,2BACd,QACA;EAEA;EACA"}
|
package/dist/internal/index.js
CHANGED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MCP Events
|
|
3
|
+
description: Understand the MCP webhook events contract and the AI SDK APIs for subscribing, verifying, and receiving events.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# MCP Events
|
|
7
|
+
|
|
8
|
+
MCP events let a server notify your application when something changes, such as
|
|
9
|
+
a new document comment. Your MCP client manages the subscription; your webhook
|
|
10
|
+
endpoint receives the events.
|
|
11
|
+
|
|
12
|
+
<Note>
|
|
13
|
+
These APIs are experimental and implement the webhook portion of the [MCP
|
|
14
|
+
Events design
|
|
15
|
+
draft](https://github.com/modelcontextprotocol/experimental-ext-triggers-events/blob/main/docs/design-sketch-proposal.md).
|
|
16
|
+
Polling and push-stream delivery are not supported.
|
|
17
|
+
</Note>
|
|
18
|
+
|
|
19
|
+
## Choose who manages subscriptions
|
|
20
|
+
|
|
21
|
+
Use `experimental_events: { adapter }` when a backend manages subscriptions,
|
|
22
|
+
webhook delivery and renewal. The adapter exposes managed watch handles and
|
|
23
|
+
requires no AI SDK event store. See [managed subscriptions](/docs/reference/ai-sdk-core/mcp-events#managed-subscriptions).
|
|
24
|
+
|
|
25
|
+
Use `experimental_events: { store }` when your application directly registers
|
|
26
|
+
MCP webhooks, persists their secrets and schedules renewal. The following flow
|
|
27
|
+
describes this direct mode. Event catalog discovery works in either mode, and
|
|
28
|
+
without either configuration.
|
|
29
|
+
|
|
30
|
+
## How MCP events work
|
|
31
|
+
|
|
32
|
+
1. The client sends `events/subscribe` with the event name, filters, webhook URL,
|
|
33
|
+
and signing secret. Optional `ttlMs` and `cursor` parameters set the requested
|
|
34
|
+
lifetime and replay position.
|
|
35
|
+
2. The server can send a signed challenge to verify the webhook before accepting
|
|
36
|
+
the subscription. After verification, it returns the subscription ID,
|
|
37
|
+
`refreshBefore`, `cursor`, and `truncated`.
|
|
38
|
+
3. As events occur, the server sends signed POST requests to the webhook. The
|
|
39
|
+
webhook verifies each signature, handles the event, and acknowledges delivery.
|
|
40
|
+
4. The client renews the subscription before `refreshBefore` by sending
|
|
41
|
+
`events/subscribe` with the same identity, or stops it with `events/unsubscribe`.
|
|
42
|
+
Subscriptions with a finite lifetime expire if they are not renewed.
|
|
43
|
+
|
|
44
|
+
Your application decides what to do with each event. Deliveries may be duplicated
|
|
45
|
+
or reordered, so use the subscription ID and event ID to deduplicate processing.
|
|
46
|
+
|
|
47
|
+
## Using MCP Events
|
|
48
|
+
|
|
49
|
+
Create an MCP client with `createMCPClient` and manage subscriptions through
|
|
50
|
+
`client.experimental_events`. The following methods are experimental:
|
|
51
|
+
|
|
52
|
+
| Method | Description |
|
|
53
|
+
| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
54
|
+
| [`list()`](/docs/reference/ai-sdk-core/mcp-events#listing-events) | List event names, schemas, and delivery modes with `events/list`. |
|
|
55
|
+
| [`subscribe(options)`](/docs/reference/ai-sdk-core/mcp-events#subscribing-to-events) | Save the signing secret, send `events/subscribe`, and return the subscription result. |
|
|
56
|
+
| [`refresh({ id })`](/docs/reference/ai-sdk-core/mcp-events#refreshing-a-subscription) | Renew an existing subscription with `events/subscribe`. |
|
|
57
|
+
| [`unsubscribe({ id })`](/docs/reference/ai-sdk-core/mcp-events#unsubscribing-from-events) | Send `events/unsubscribe` and remove the saved subscription after success. |
|
|
58
|
+
|
|
59
|
+
Refresh reuses the saved callback URL, arguments, signing secret, and latest
|
|
60
|
+
cursor. Your application schedules renewal before `refreshBefore`.
|
|
61
|
+
|
|
62
|
+
To receive events, use
|
|
63
|
+
[`experimental_createMCPEventWebhook({ store, onEvent })`](/docs/reference/ai-sdk-core/mcp-events#webhook-handler)
|
|
64
|
+
as your webhook handler. It handles signed verification challenges, verifies
|
|
65
|
+
incoming event signatures, and passes each event directly to your `onEvent`
|
|
66
|
+
callback.
|
|
67
|
+
|
|
68
|
+
## Connect the webhook and client
|
|
69
|
+
|
|
70
|
+
Both use an application-provided `eventStore` implementing
|
|
71
|
+
[`Experimental_MCPEventStore`](/docs/reference/ai-sdk-core/mcp-events#event-store). This is an AI SDK storage adapter, not an MCP
|
|
72
|
+
protocol primitive. It privately persists subscription identities, callback URLs,
|
|
73
|
+
signing secrets, and cursors so both sides can access them. See the
|
|
74
|
+
[file-store example](https://github.com/vercel/ai/blob/main/examples/mcp/src/events/event-store.ts)
|
|
75
|
+
for the five methods: `get`, `getById`, `set`, `update`, and `delete`. Use shared
|
|
76
|
+
durable storage scoped to one MCP server and authenticated principal;
|
|
77
|
+
`update` must atomically merge the supplied fields.
|
|
78
|
+
|
|
79
|
+
**First, expose the webhook route.** It must be reachable before subscribing.
|
|
80
|
+
|
|
81
|
+
```ts filename="app/api/mcp-events/route.ts"
|
|
82
|
+
import { experimental_createMCPEventWebhook } from '@ai-sdk/mcp';
|
|
83
|
+
import { eventStore } from '@/lib/event-store';
|
|
84
|
+
|
|
85
|
+
export const POST = experimental_createMCPEventWebhook({
|
|
86
|
+
store: eventStore,
|
|
87
|
+
async onEvent({ subscription, event }) {
|
|
88
|
+
console.log(subscription.id, event.name, event.data);
|
|
89
|
+
},
|
|
90
|
+
async onGap({ subscription, gap }) {
|
|
91
|
+
// Some events cannot be replayed; reconcile state or notify the agent.
|
|
92
|
+
console.log('Replay gap:', subscription.id, gap.cursor, gap.truncated);
|
|
93
|
+
},
|
|
94
|
+
async onTerminated({ subscription, termination }) {
|
|
95
|
+
// The server ended the subscription; notify the agent of the reason.
|
|
96
|
+
console.log('Subscription terminated:', subscription.id, termination.error);
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The helper verifies signatures and echoes challenges automatically. It invokes
|
|
102
|
+
`onEvent` without exposing the secret, then returns `204` after successful
|
|
103
|
+
processing. Processing failures return `503` so the server can retry. In your
|
|
104
|
+
app, resolve `onEvent` only after processing or durably accepting the event.
|
|
105
|
+
|
|
106
|
+
Two optional callbacks handle signed subscription lifecycle messages:
|
|
107
|
+
|
|
108
|
+
- `onGap({ subscription, messageId, gap })`: some events are no longer available
|
|
109
|
+
for replay. Reconcile application state or notify the agent. After the callback
|
|
110
|
+
succeeds, the helper saves `gap.cursor` and `truncated: true`; the subscription
|
|
111
|
+
stays active and event delivery continues.
|
|
112
|
+
- `onTerminated({ subscription, messageId, termination })`: the server has ended
|
|
113
|
+
the subscription. Inspect `termination.error` for the reason and notify the
|
|
114
|
+
agent. After the callback succeeds, the helper removes the saved subscription.
|
|
115
|
+
|
|
116
|
+
State updates also occur when the corresponding callback is omitted. Callback or
|
|
117
|
+
storage failures return `503` for retry. Resolve callbacks only after processing
|
|
118
|
+
or durable acceptance, and deduplicate by subscription ID and `messageId` (the
|
|
119
|
+
signed `webhook-id`). The helper does not run or notify an agent automatically.
|
|
120
|
+
|
|
121
|
+
**Then subscribe using the same store.**
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
import { createMCPClient } from '@ai-sdk/mcp';
|
|
125
|
+
import { eventStore } from '@/lib/event-store';
|
|
126
|
+
|
|
127
|
+
const client = await createMCPClient({
|
|
128
|
+
transport: { type: 'http', url: 'https://service.example/mcp' },
|
|
129
|
+
experimental_events: { store: eventStore },
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
try {
|
|
133
|
+
const { events } = await client.experimental_events.list();
|
|
134
|
+
console.log(events.map(event => event.name));
|
|
135
|
+
|
|
136
|
+
const subscription = await client.experimental_events.subscribe({
|
|
137
|
+
name: 'comment.created',
|
|
138
|
+
arguments: { document_id: 'doc_123' },
|
|
139
|
+
delivery: {
|
|
140
|
+
mode: 'webhook',
|
|
141
|
+
url: 'https://my-app.example/api/mcp-events',
|
|
142
|
+
},
|
|
143
|
+
ttlMs: 60 * 60 * 1000,
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// Save the ID and schedule renewal before the server's granted deadline.
|
|
147
|
+
console.log(subscription.id, subscription.refreshBefore);
|
|
148
|
+
} finally {
|
|
149
|
+
await client.close(); // Webhook delivery continues until unsubscribe or expiry.
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Before sending the subscription request, the SDK generates and saves
|
|
154
|
+
`delivery.secret`. It appends a `mcp_event_subscription` query parameter to the
|
|
155
|
+
callback URL so the webhook can find that secret even while verification is
|
|
156
|
+
pending. Preserve this parameter and pass the raw request body to the handler.
|
|
157
|
+
|
|
158
|
+
## Runnable example
|
|
159
|
+
|
|
160
|
+
The [local example](https://github.com/vercel/ai/tree/main/examples/mcp/src/events)
|
|
161
|
+
uses `@modelcontextprotocol/server` to emit a comment and the AI SDK to subscribe,
|
|
162
|
+
verify, and receive it. It needs no model API key. Local HTTP callbacks require
|
|
163
|
+
`delivery.allowInsecureLocalhost: true`; production callbacks use HTTPS.
|
|
164
|
+
|
|
165
|
+
## API Reference
|
|
166
|
+
|
|
167
|
+
- [Event discovery and subscription methods](/docs/reference/ai-sdk-core/mcp-events)
|
|
168
|
+
- [Webhook handler](/docs/reference/ai-sdk-core/mcp-events#webhook-handler)
|
|
169
|
+
- [Event types and store interface](/docs/reference/ai-sdk-core/mcp-events#event-types)
|
|
@@ -6,8 +6,8 @@ description: Decide answers to Choice, Score, and Boolean questions against shar
|
|
|
6
6
|
# Decisions
|
|
7
7
|
|
|
8
8
|
`experimental_decide` decides answers to named questions against one shared state using
|
|
9
|
-
a decision model. State can be a string, JSON object, or
|
|
10
|
-
|
|
9
|
+
a decision model. State can be a string, JSON object, or an array of ordered
|
|
10
|
+
text, file, and JSON parts.
|
|
11
11
|
|
|
12
12
|
This API and the decision model specification are experimental and may change
|
|
13
13
|
in patch releases. Pass a decision model instance, resolve a model through a
|
|
@@ -44,6 +44,52 @@ async function triage(model: Experimental_DecisionModel, message: string) {
|
|
|
44
44
|
}
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
## Multimodal state
|
|
48
|
+
|
|
49
|
+
Combine text, structured data, and images in one state:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import { openai } from '@ai-sdk/openai';
|
|
53
|
+
import { experimental_decide } from 'ai';
|
|
54
|
+
|
|
55
|
+
const result = await experimental_decide({
|
|
56
|
+
model: openai.decisionModel('gpt-6-luna'),
|
|
57
|
+
state: [
|
|
58
|
+
{ type: 'text', text: 'Inspect this package for damage.' },
|
|
59
|
+
{ type: 'json', value: { product: 'glass vase', packaging: 'cardboard' } },
|
|
60
|
+
{
|
|
61
|
+
type: 'file',
|
|
62
|
+
mediaType: 'image/png',
|
|
63
|
+
data: new URL('https://example.com/package.png'),
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
questions: {
|
|
67
|
+
damaged: {
|
|
68
|
+
type: 'boolean',
|
|
69
|
+
instructions: 'Is the product visibly damaged?',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`Experimental_DecisionState` and `Experimental_DecisionStatePart` are exported
|
|
76
|
+
from `ai`. A part has one of these shapes:
|
|
77
|
+
|
|
78
|
+
- `TextPart`: `{ type: 'text', text: string }`.
|
|
79
|
+
- `FilePart`: `{ type: 'file', mediaType: string, data: ... }`, using the SDK's
|
|
80
|
+
file conventions. For images, use bytes, a base64 string, or a URL. Tagged file
|
|
81
|
+
data is also supported. URLs are downloaded before the model call.
|
|
82
|
+
- JSON: `{ type: 'json', value: JSONValue }`.
|
|
83
|
+
|
|
84
|
+
Language-model decision adapters accept image files only. The underlying model
|
|
85
|
+
must support the file data form. Gateway and TypeSafe AI accept text and JSON
|
|
86
|
+
state only.
|
|
87
|
+
|
|
88
|
+
Arrays passed directly as `state` contain parts. To send a JSON array, put it
|
|
89
|
+
inside an object (`state: { records }`) or a JSON part
|
|
90
|
+
(`state: [{ type: 'json', value: records }]`). An empty `state: []` contains zero
|
|
91
|
+
parts. Question instructions and criteria still accept JSON arrays directly.
|
|
92
|
+
|
|
47
93
|
## Provider models
|
|
48
94
|
|
|
49
95
|
Use a provider's `decisionModel` factory:
|
|
@@ -185,10 +231,12 @@ to retain its experimental `decisionModel` method.
|
|
|
185
231
|
| `score` | At least two ordered level descriptions | Fractional `score` in `[0, levels.length - 1]`; optional `probabilities` |
|
|
186
232
|
| `boolean` | Optional `true` and `false` descriptions | Required `probability`, the model-estimated probability of true |
|
|
187
233
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
234
|
+
`Experimental_DecisionQuestion` is exported from `ai`. Instructions and
|
|
235
|
+
descriptions can be strings, JSON objects, or JSON arrays. Descriptions can also
|
|
236
|
+
be `null`.
|
|
237
|
+
|
|
238
|
+
Functions, class instances, cycles, undefined values, and nonfinite numbers are
|
|
239
|
+
not JSON-compatible.
|
|
192
240
|
|
|
193
241
|
Answers retain question IDs and have the same `type` as their question. When a
|
|
194
242
|
Choice distribution is supplied, it includes every option and the selected
|
|
@@ -4082,6 +4082,19 @@ To see `streamText` in action, check out [these examples](#examples).
|
|
|
4082
4082
|
isOptional: true,
|
|
4083
4083
|
description: 'The original messages.',
|
|
4084
4084
|
},
|
|
4085
|
+
{
|
|
4086
|
+
name: 'onStepEnd',
|
|
4087
|
+
type: '(event: { messages: UIMessage[]; isContinuation: boolean; responseMessage: UIMessage; }) => PromiseLike<void> | void',
|
|
4088
|
+
isOptional: true,
|
|
4089
|
+
description:
|
|
4090
|
+
'Called after each step is converted to UI message parts. Receives the accumulated response message, including step metadata, for inspection or persistence. This UI conversion callback is separate from the generation callback passed to streamText.',
|
|
4091
|
+
},
|
|
4092
|
+
{
|
|
4093
|
+
name: 'onStepFinish',
|
|
4094
|
+
type: '(event: { messages: UIMessage[]; isContinuation: boolean; responseMessage: UIMessage; }) => PromiseLike<void> | void',
|
|
4095
|
+
isOptional: true,
|
|
4096
|
+
description: 'Deprecated alias for onStepEnd.',
|
|
4097
|
+
},
|
|
4085
4098
|
{
|
|
4086
4099
|
name: 'onEnd',
|
|
4087
4100
|
type: '(options: { messages: UIMessage[]; isContinuation: boolean; responseMessage: UIMessage; isAborted: boolean; isCancelled?: true; outcome: UIMessageStreamOutcome; finishReason?: FinishReason; }) => PromiseLike<void> | void',
|
|
@@ -17,7 +17,7 @@ state. See [Decisions](/docs/ai-sdk-core/decisions) for examples and semantics.
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| ----------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
19
|
| `model` | `Experimental_DecisionModel` | Required experimental v4 model instance or a string ID resolved by Gateway or an explicitly configured decision-capable default provider. |
|
|
20
|
-
| `state` | `string
|
|
20
|
+
| `state` | `Experimental_DecisionState` | Required string, JSON object, or ordered array of text, file, and JSON parts. |
|
|
21
21
|
| `questions` | `Record<string, Experimental_DecisionQuestion>` | Required nonempty question map. |
|
|
22
22
|
| `maxRetries` | `number` | Nonnegative integer; defaults to 2. |
|
|
23
23
|
| `abortSignal` | `AbortSignal` | Cancels the decisions request. |
|
|
@@ -49,7 +49,9 @@ Returns `Promise<Experimental_DecisionResult<QUESTIONS>>`:
|
|
|
49
49
|
`doDecide(options)`. Decision models are isolated from stable `ProviderV4`.
|
|
50
50
|
|
|
51
51
|
The public core types are `Experimental_DecisionModel`,
|
|
52
|
-
`
|
|
52
|
+
`Experimental_DecisionState`, `Experimental_DecisionStatePart`,
|
|
53
|
+
`Experimental_DecisionQuestion`,
|
|
54
|
+
`Experimental_DecisionAnswer`, and
|
|
53
55
|
`Experimental_DecisionResult`. All decision-specific classes use the
|
|
54
56
|
`Decision` prefix, with `Experimental_` aliases at package boundaries.
|
|
55
57
|
|
|
@@ -115,12 +115,19 @@ export async function* streamAgent(
|
|
|
115
115
|
description:
|
|
116
116
|
'Deprecated. Use `onStepEnd` instead. This alias is only used as a fallback when `onStepEnd` is not provided.',
|
|
117
117
|
},
|
|
118
|
+
{
|
|
119
|
+
name: 'onUIMessageStepEnd',
|
|
120
|
+
type: 'UIMessageStreamOnStepEndCallback',
|
|
121
|
+
isRequired: false,
|
|
122
|
+
description:
|
|
123
|
+
'Callback invoked after each UI message step is assembled. It receives `messages`, `isContinuation`, and the accumulated `responseMessage`, making it suitable for persisting intermediate UI message state.',
|
|
124
|
+
},
|
|
118
125
|
{
|
|
119
126
|
name: '...UIMessageStreamOptions',
|
|
120
127
|
type: 'UIMessageStreamOptions',
|
|
121
128
|
isRequired: false,
|
|
122
129
|
description:
|
|
123
|
-
'Additional options to control the
|
|
130
|
+
'Additional options to control the UI message stream, including message IDs, metadata, final callbacks, sources, and reasoning.',
|
|
124
131
|
},
|
|
125
132
|
]}
|
|
126
133
|
/>
|
|
@@ -153,6 +160,37 @@ for await (const chunk of stream) {
|
|
|
153
160
|
// Call controller.abort() to cancel the agent operation early.
|
|
154
161
|
```
|
|
155
162
|
|
|
163
|
+
## Persisting the UI Message After Each Step
|
|
164
|
+
|
|
165
|
+
Use `onUIMessageStepEnd` when you need the accumulated [`UIMessage`](/docs/reference/ai-sdk-core/ui-message) after each agent step:
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
const stream = await createAgentUIStream({
|
|
169
|
+
agent,
|
|
170
|
+
uiMessages,
|
|
171
|
+
generateMessageId: () => crypto.randomUUID(),
|
|
172
|
+
onUIMessageStepEnd: async ({ messages, responseMessage, isContinuation }) => {
|
|
173
|
+
await upsertConversation({
|
|
174
|
+
messages,
|
|
175
|
+
responseMessage,
|
|
176
|
+
isContinuation,
|
|
177
|
+
});
|
|
178
|
+
},
|
|
179
|
+
onEnd: async ({ responseMessage }) => {
|
|
180
|
+
// Save final metadata and any partial message when the stream ends.
|
|
181
|
+
await upsertMessage(responseMessage);
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
for await (const chunk of stream) {
|
|
186
|
+
// Consume or forward the stream so the callback can run.
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
`onStepEnd` and `onUIMessageStepEnd` serve different layers. `onStepEnd` receives the low-level generation step result, including usage, finish reason, and tool call details. `onUIMessageStepEnd` runs after that step has been converted to UI message parts and receives the response message accumulated so far.
|
|
191
|
+
|
|
192
|
+
The callback runs as the UI stream is consumed and is awaited before the `finish-step` chunk continues through the stream. This delays UI stream delivery; it does not guarantee that the next model call has not started. If it throws, the error is passed to `onError` and streaming continues. Use idempotent writes because each callback contains a growing snapshot of the same response message. UI messages can contain model output, reasoning, tool inputs, and tool outputs, so apply the same access controls and sensitive-data handling that you use for final conversation persistence.
|
|
193
|
+
|
|
156
194
|
## How It Works
|
|
157
195
|
|
|
158
196
|
1. **UI Message Validation:** The input `uiMessages` array is validated and normalized using the agent's `tools` definition. Any invalid messages cause an error.
|
|
@@ -165,7 +203,8 @@ for await (const chunk of stream) {
|
|
|
165
203
|
- The agent **must** implement the `.stream({ prompt, ... })` method and define its supported `tools` property.
|
|
166
204
|
- This utility returns an async iterable for maximal streaming flexibility. For HTTP responses, see [`createAgentUIStreamResponse`](/docs/reference/ai-sdk-core/create-agent-ui-stream-response) (Web) or [`pipeAgentUIStreamToResponse`](/docs/reference/ai-sdk-core/pipe-agent-ui-stream-to-response) (Node.js).
|
|
167
205
|
- The `uiMessages` parameter is named `uiMessages`, **not** just `messages`.
|
|
168
|
-
- You can provide advanced options via `UIMessageStreamOptions` (for example, to include sources or
|
|
206
|
+
- You can provide advanced options via `UIMessageStreamOptions` (for example, to include sources or message metadata).
|
|
207
|
+
- Use `onUIMessageStepEnd` for per-step UI message persistence. Use `onStepEnd` for low-level generation telemetry and step details.
|
|
169
208
|
- To cancel the stream, pass an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) via the `abortSignal` parameter.
|
|
170
209
|
- Pass `experimental_sandbox` when your agent tools need an experimental sandbox environment during execution.
|
|
171
210
|
|
|
@@ -113,12 +113,19 @@ export async function POST(request: Request) {
|
|
|
113
113
|
description:
|
|
114
114
|
'Deprecated. Use `onStepEnd` instead. This alias is only used as a fallback when `onStepEnd` is not provided.',
|
|
115
115
|
},
|
|
116
|
+
{
|
|
117
|
+
name: 'onUIMessageStepEnd',
|
|
118
|
+
type: 'UIMessageStreamOnStepEndCallback',
|
|
119
|
+
isRequired: false,
|
|
120
|
+
description:
|
|
121
|
+
'Callback invoked after each UI message step is assembled. It receives `messages`, `isContinuation`, and the accumulated `responseMessage` for intermediate persistence.',
|
|
122
|
+
},
|
|
116
123
|
{
|
|
117
124
|
name: '...UIMessageStreamOptions',
|
|
118
125
|
type: 'UIMessageStreamOptions',
|
|
119
126
|
isRequired: false,
|
|
120
127
|
description:
|
|
121
|
-
'Other UI message output options
|
|
128
|
+
'Other UI message output options, including message IDs, metadata, final callbacks, sources, and reasoning.',
|
|
122
129
|
},
|
|
123
130
|
{
|
|
124
131
|
name: 'headers',
|
|
@@ -152,6 +159,8 @@ export async function POST(request: Request) {
|
|
|
152
159
|
|
|
153
160
|
A `Promise<Response>` whose `body` is a streaming UI message output from the agent. Use this as the return value of API/server handlers in serverless, Next.js, Express, Hono, or edge runtime contexts.
|
|
154
161
|
|
|
162
|
+
Use `onUIMessageStepEnd` to persist the accumulated UI response after every agent step. The callback is awaited before the corresponding `finish-step` chunk continues. Use idempotent writes and protect model output, reasoning, tool inputs, and tool outputs as sensitive conversation data. The existing `onStepEnd` callback remains the low-level generation callback for usage, finish reasons, and raw step details.
|
|
163
|
+
|
|
155
164
|
## Example: Next.js API Route Handler
|
|
156
165
|
|
|
157
166
|
```ts
|
|
@@ -118,7 +118,14 @@ export async function handler(req, res) {
|
|
|
118
118
|
'Deprecated. Use `onStepEnd` instead. This alias is only used as a fallback when `onStepEnd` is not provided.',
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
|
-
name: '
|
|
121
|
+
name: 'onUIMessageStepEnd',
|
|
122
|
+
type: 'UIMessageStreamOnStepEndCallback',
|
|
123
|
+
isRequired: false,
|
|
124
|
+
description:
|
|
125
|
+
'Callback invoked after each UI message step is assembled. It receives `messages`, `isContinuation`, and the accumulated `responseMessage` for intermediate persistence.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: '...UIMessageStreamResponseInit & AgentUIMessageStreamOptions',
|
|
122
129
|
type: 'object',
|
|
123
130
|
isRequired: false,
|
|
124
131
|
description:
|
|
@@ -131,6 +138,8 @@ export async function handler(req, res) {
|
|
|
131
138
|
|
|
132
139
|
A `Promise<void>`. The function completes when the UI message stream has been fully sent to the provided ServerResponse.
|
|
133
140
|
|
|
141
|
+
Use `onUIMessageStepEnd` to persist the accumulated UI response after every agent step. It is awaited before the corresponding `finish-step` chunk is piped. Use idempotent writes and protect model output, reasoning, tool inputs, and tool outputs as sensitive conversation data. Use the existing `onStepEnd` callback when you need low-level generation usage, finish reasons, or raw step details instead.
|
|
142
|
+
|
|
134
143
|
## Example: Express Route Handler
|
|
135
144
|
|
|
136
145
|
```ts
|