ai 7.0.0-beta.108 → 7.0.0-beta.109

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/index.d.ts +89 -103
  3. package/dist/index.js +75 -79
  4. package/dist/index.js.map +1 -1
  5. package/dist/internal/index.d.ts +64 -63
  6. package/dist/internal/index.js +1 -1
  7. package/docs/03-agents/02-building-agents.mdx +4 -4
  8. package/docs/03-agents/07-workflow-agent.mdx +2 -2
  9. package/docs/03-ai-sdk-core/05-generating-text.mdx +8 -8
  10. package/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +3 -3
  11. package/docs/03-ai-sdk-core/60-telemetry.mdx +18 -5
  12. package/docs/03-ai-sdk-core/65-event-listeners.mdx +10 -10
  13. package/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +7 -7
  14. package/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +6 -6
  15. package/docs/07-reference/01-ai-sdk-core/15-agent.mdx +4 -4
  16. package/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +14 -14
  17. package/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +12 -12
  18. package/docs/08-migration-guides/23-migration-guide-7-0.mdx +32 -0
  19. package/package.json +3 -3
  20. package/src/agent/agent.ts +7 -6
  21. package/src/agent/index.ts +0 -2
  22. package/src/agent/tool-loop-agent-settings.ts +17 -12
  23. package/src/agent/tool-loop-agent.ts +20 -20
  24. package/src/generate-text/core-events.ts +0 -82
  25. package/src/generate-text/create-execute-tools-transformation.ts +11 -15
  26. package/src/generate-text/execute-tool-call.ts +14 -17
  27. package/src/generate-text/generate-text-result.ts +0 -7
  28. package/src/generate-text/generate-text.ts +33 -71
  29. package/src/generate-text/index.ts +7 -7
  30. package/src/generate-text/stream-text.ts +40 -48
  31. package/src/generate-text/tool-execution-events.ts +114 -0
  32. package/src/telemetry/create-unified-telemetry.ts +2 -2
  33. package/src/telemetry/telemetry-integration-registry.ts +3 -3
  34. package/src/telemetry/telemetry-integration.ts +6 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # ai
2
2
 
3
+ ## 7.0.0-beta.109
4
+
5
+ ### Patch Changes
6
+
7
+ - ec98264: feat(ai): allow multiple integrations to be registered at once
8
+ - eea8d98: refactoring: rename tool execution events
9
+ - 75ef93e: remove the deprecated `experimental_output` alias and document the `output` migration for AI SDK 7
10
+ - Updated dependencies [eea8d98]
11
+ - @ai-sdk/provider-utils@5.0.0-beta.25
12
+ - @ai-sdk/gateway@4.0.0-beta.61
13
+
3
14
  ## 7.0.0-beta.108
4
15
 
5
16
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -2594,11 +2594,53 @@ interface OnStepStartEvent<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT exte
2594
2594
  readonly toolsContext: InferToolSetContext<TOOLS>;
2595
2595
  }
2596
2596
  /**
2597
- * Event passed to the `onToolCallStart` callback.
2597
+ * Event passed to the `onChunk` callback.
2598
+ *
2599
+ * Called for each chunk received during streaming (`streamText` only).
2600
+ * The chunk is either a content part (text-delta, tool-call, etc.) or
2601
+ * a stream lifecycle marker (`ai.stream.firstChunk` / `ai.stream.finish`).
2602
+ */
2603
+ interface OnChunkEvent<TOOLS extends ToolSet = ToolSet> {
2604
+ readonly chunk: TextStreamPart<TOOLS> | {
2605
+ readonly type: 'ai.stream.firstChunk' | 'ai.stream.finish';
2606
+ readonly callId: string;
2607
+ readonly stepNumber: number;
2608
+ readonly attributes?: Record<string, unknown>;
2609
+ };
2610
+ }
2611
+ /**
2612
+ * Event passed to the `onStepFinish` callback.
2613
+ *
2614
+ * Called when a step (LLM call) completes.
2615
+ * Includes the StepResult for that step along with the call identifier.
2616
+ */
2617
+ type OnStepFinishEvent<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT extends Context = Context> = StepResult<TOOLS, RUNTIME_CONTEXT>;
2618
+ /**
2619
+ * Event passed to the `onFinish` callback.
2620
+ *
2621
+ * Called when the entire generation completes (all steps finished).
2622
+ * Includes the final step's result along with aggregated data from all steps.
2623
+ */
2624
+ type OnFinishEvent<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT extends Context = Context> = StepResult<TOOLS, RUNTIME_CONTEXT> & {
2625
+ /** Array containing results from all steps in the generation. */
2626
+ readonly steps: StepResult<TOOLS, RUNTIME_CONTEXT>[];
2627
+ /** Aggregated token usage across all steps. */
2628
+ readonly totalUsage: LanguageModelUsage;
2629
+ /** Identifier from telemetry settings for grouping related operations. */
2630
+ readonly functionId: string | undefined;
2631
+ };
2632
+
2633
+ /**
2634
+ * A callback function that can be used with `notify`.
2635
+ */
2636
+ type Callback<EVENT> = (event: EVENT) => PromiseLike<void> | void;
2637
+
2638
+ /**
2639
+ * Event passed to the `onToolExecutionStart` callback.
2598
2640
  *
2599
2641
  * Called when a tool execution begins, before the tool's `execute` function is invoked.
2600
2642
  */
2601
- interface OnToolCallStartEvent<TOOLS extends ToolSet = ToolSet> {
2643
+ interface ToolExecutionStartEvent<TOOLS extends ToolSet = ToolSet> {
2602
2644
  /** Unique identifier for this generation call, used to correlate events. */
2603
2645
  readonly callId: string;
2604
2646
  /** Zero-based index of the current step where this tool call occurs. */
@@ -2617,12 +2659,12 @@ interface OnToolCallStartEvent<TOOLS extends ToolSet = ToolSet> {
2617
2659
  readonly context: InferToolSetContext<TOOLS>;
2618
2660
  }
2619
2661
  /**
2620
- * Event passed to the `onToolCallFinish` callback.
2662
+ * Event passed to the `onToolExecutionEnd` callback.
2621
2663
  *
2622
2664
  * Called when a tool execution completes, either successfully or with an error.
2623
2665
  * Uses a discriminated union on the `success` field.
2624
2666
  */
2625
- type OnToolCallFinishEvent<TOOLS extends ToolSet = ToolSet> = {
2667
+ type ToolExecutionEndEvent<TOOLS extends ToolSet = ToolSet> = {
2626
2668
  /** Unique identifier for this generation call, used to correlate events. */
2627
2669
  readonly callId: string;
2628
2670
  /** Zero-based index of the current step where this tool call occurred. */
@@ -2655,41 +2697,27 @@ type OnToolCallFinishEvent<TOOLS extends ToolSet = ToolSet> = {
2655
2697
  readonly error: unknown;
2656
2698
  });
2657
2699
  /**
2658
- * Event passed to the `onChunk` callback.
2700
+ * Callback that is set using the `experimental_onToolExecutionStart` option.
2659
2701
  *
2660
- * Called for each chunk received during streaming (`streamText` only).
2661
- * The chunk is either a content part (text-delta, tool-call, etc.) or
2662
- * a stream lifecycle marker (`ai.stream.firstChunk` / `ai.stream.finish`).
2663
- */
2664
- interface OnChunkEvent<TOOLS extends ToolSet = ToolSet> {
2665
- readonly chunk: TextStreamPart<TOOLS> | {
2666
- readonly type: 'ai.stream.firstChunk' | 'ai.stream.finish';
2667
- readonly callId: string;
2668
- readonly stepNumber: number;
2669
- readonly attributes?: Record<string, unknown>;
2670
- };
2671
- }
2672
- /**
2673
- * Event passed to the `onStepFinish` callback.
2702
+ * Called when a tool execution begins, before the tool's `execute` function is invoked.
2703
+ * Use this for logging tool invocations, tracking tool usage, or pre-execution validation.
2674
2704
  *
2675
- * Called when a step (LLM call) completes.
2676
- * Includes the StepResult for that step along with the call identifier.
2705
+ * @param event - The event object containing tool call information.
2677
2706
  */
2678
- type OnStepFinishEvent<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT extends Context = Context> = StepResult<TOOLS, RUNTIME_CONTEXT>;
2707
+ type OnToolExecutionStartCallback<TOOLS extends ToolSet = ToolSet> = Callback<ToolExecutionStartEvent<TOOLS>>;
2679
2708
  /**
2680
- * Event passed to the `onFinish` callback.
2709
+ * Callback that is set using the `experimental_onToolExecutionEnd` option.
2681
2710
  *
2682
- * Called when the entire generation completes (all steps finished).
2683
- * Includes the final step's result along with aggregated data from all steps.
2711
+ * Called when a tool execution completes, either successfully or with an error.
2712
+ * Use this for logging tool results, tracking execution time, or error handling.
2713
+ *
2714
+ * The event uses a discriminated union on the `success` field:
2715
+ * - When `success: true`: `output` contains the tool result, `error` is never present.
2716
+ * - When `success: false`: `error` contains the error, `output` is never present.
2717
+ *
2718
+ * @param event - The event object containing tool call result information.
2684
2719
  */
2685
- type OnFinishEvent<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT extends Context = Context> = StepResult<TOOLS, RUNTIME_CONTEXT> & {
2686
- /** Array containing results from all steps in the generation. */
2687
- readonly steps: StepResult<TOOLS, RUNTIME_CONTEXT>[];
2688
- /** Aggregated token usage across all steps. */
2689
- readonly totalUsage: LanguageModelUsage;
2690
- /** Identifier from telemetry settings for grouping related operations. */
2691
- readonly functionId: string | undefined;
2692
- };
2720
+ type OnToolExecutionEndCallback<TOOLS extends ToolSet = ToolSet> = Callback<ToolExecutionEndEvent<TOOLS>>;
2693
2721
 
2694
2722
  /**
2695
2723
  * Event passed to the `onStart` callback for rerank operations.
@@ -2821,11 +2849,6 @@ interface RerankFinishEvent {
2821
2849
  }>;
2822
2850
  }
2823
2851
 
2824
- /**
2825
- * A callback function that can be used with `notify`.
2826
- */
2827
- type Callback<EVENT> = (event: EVENT) => PromiseLike<void> | void;
2828
-
2829
2852
  /**
2830
2853
  * Implement this interface to create custom telemetry integrations.
2831
2854
  * Methods can be sync or return a PromiseLike.
@@ -2853,7 +2876,7 @@ interface TelemetryIntegration {
2853
2876
  * Called when a tool execution begins, before the tool's `execute` function
2854
2877
  * is invoked. Use this to create tool-level spans or log tool invocations.
2855
2878
  */
2856
- onToolCallStart?: Callback<OnToolCallStartEvent>;
2879
+ onToolExecutionStart?: Callback<ToolExecutionStartEvent>;
2857
2880
  /**
2858
2881
  * Called when a tool execution completes, either successfully or with an error.
2859
2882
  * The event uses a discriminated union on the `success` field — check
@@ -2861,7 +2884,7 @@ interface TelemetryIntegration {
2861
2884
  *
2862
2885
  * The event includes execution duration (`durationMs`) for performance tracking.
2863
2886
  */
2864
- onToolCallFinish?: Callback<OnToolCallFinishEvent>;
2887
+ onToolExecutionEnd?: Callback<ToolExecutionEndEvent>;
2865
2888
  /**
2866
2889
  * Called for each chunk received during streaming.
2867
2890
  * Only relevant for `streamText` — not called during `generateText`.
@@ -3253,8 +3276,6 @@ type StreamTextOnStartCallback<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT
3253
3276
  * @param event - The event object containing step configuration.
3254
3277
  */
3255
3278
  type StreamTextOnStepStartCallback<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output> = Callback<OnStepStartEvent<TOOLS, RUNTIME_CONTEXT, OUTPUT>>;
3256
- type StreamTextOnToolCallStartCallback<TOOLS extends ToolSet = ToolSet> = Callback<OnToolCallStartEvent<TOOLS>>;
3257
- type StreamTextOnToolCallFinishCallback<TOOLS extends ToolSet = ToolSet> = Callback<OnToolCallFinishEvent<TOOLS>>;
3258
3279
  /**
3259
3280
  * Generate a text and call tools for a given prompt using a language model.
3260
3281
  *
@@ -3303,7 +3324,7 @@ type StreamTextOnToolCallFinishCallback<TOOLS extends ToolSet = ToolSet> = Callb
3303
3324
  * @returns
3304
3325
  * A result object for accessing different stream types and additional information.
3305
3326
  */
3306
- declare function streamText<TOOLS extends ToolSet, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output<string, string, never>>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, timeout, headers, stopWhen, experimental_output, output, toolNeedsApproval, experimental_telemetry: telemetry, prepareStep, providerOptions, activeTools, experimental_repairToolCall: repairToolCall, experimental_transform: transform, experimental_download: download, includeRawChunks, onChunk, onError, onFinish, onAbort, onStepFinish, experimental_onStart: onStart, experimental_onStepStart: onStepStart, experimental_onToolCallStart: onToolCallStart, experimental_onToolCallFinish: onToolCallFinish, runtimeContext, toolsContext, experimental_include: include, _internal: { now, generateId, generateCallId, }, ...settings }: LanguageModelCallOptions & RequestOptions<TOOLS> & Prompt & ToolsContextParameter<TOOLS> & {
3327
+ declare function streamText<TOOLS extends ToolSet, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output<string, string, never>>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, timeout, headers, stopWhen, output, toolNeedsApproval, experimental_telemetry: telemetry, prepareStep, providerOptions, activeTools, experimental_repairToolCall: repairToolCall, experimental_transform: transform, experimental_download: download, includeRawChunks, onChunk, onError, onFinish, onAbort, onStepFinish, experimental_onStart: onStart, experimental_onStepStart: onStepStart, experimental_onToolExecutionStart: onToolExecutionStart, experimental_onToolExecutionEnd: onToolExecutionEnd, runtimeContext, toolsContext, experimental_include: include, _internal: { now, generateId, generateCallId, }, ...settings }: LanguageModelCallOptions & RequestOptions<TOOLS> & Prompt & ToolsContextParameter<TOOLS> & {
3307
3328
  /**
3308
3329
  * The language model to use.
3309
3330
  */
@@ -3343,12 +3364,6 @@ declare function streamText<TOOLS extends ToolSet, RUNTIME_CONTEXT extends Conte
3343
3364
  * Optional specification for parsing structured outputs from the LLM response.
3344
3365
  */
3345
3366
  output?: OUTPUT;
3346
- /**
3347
- * Optional specification for parsing structured outputs from the LLM response.
3348
- *
3349
- * @deprecated Use `output` instead.
3350
- */
3351
- experimental_output?: OUTPUT;
3352
3367
  /**
3353
3368
  * Optional tool approval configuration.
3354
3369
  *
@@ -3426,11 +3441,11 @@ declare function streamText<TOOLS extends ToolSet, RUNTIME_CONTEXT extends Conte
3426
3441
  /**
3427
3442
  * Callback that is called right before a tool's execute function runs.
3428
3443
  */
3429
- experimental_onToolCallStart?: StreamTextOnToolCallStartCallback<NoInfer<TOOLS>>;
3444
+ experimental_onToolExecutionStart?: OnToolExecutionStartCallback<NoInfer<TOOLS>>;
3430
3445
  /**
3431
3446
  * Callback that is called right after a tool's execute function completes (or errors).
3432
3447
  */
3433
- experimental_onToolCallFinish?: StreamTextOnToolCallFinishCallback<NoInfer<TOOLS>>;
3448
+ experimental_onToolExecutionEnd?: OnToolExecutionEndCallback<NoInfer<TOOLS>>;
3434
3449
  /**
3435
3450
  * Settings for controlling what data is included in step results.
3436
3451
  * Disabling inclusion can help reduce memory usage when processing
@@ -3717,12 +3732,6 @@ interface GenerateTextResult<TOOLS extends ToolSet, RUNTIME_CONTEXT extends Cont
3717
3732
  * such as the tool calls or the response headers.
3718
3733
  */
3719
3734
  readonly steps: Array<StepResult<TOOLS, RUNTIME_CONTEXT>>;
3720
- /**
3721
- * The generated structured output. It uses the `output` specification.
3722
- *
3723
- * @deprecated Use `output` instead.
3724
- */
3725
- readonly experimental_output: InferCompleteOutput<OUTPUT>;
3726
3735
  /**
3727
3736
  * The generated structured output. It uses the `output` specification.
3728
3737
  *
@@ -3732,8 +3741,6 @@ interface GenerateTextResult<TOOLS extends ToolSet, RUNTIME_CONTEXT extends Cont
3732
3741
 
3733
3742
  type ToolLoopAgentOnStartCallback<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output> = Callback<OnStartEvent<TOOLS, RUNTIME_CONTEXT, OUTPUT>>;
3734
3743
  type ToolLoopAgentOnStepStartCallback<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output> = Callback<OnStepStartEvent<TOOLS, RUNTIME_CONTEXT, OUTPUT>>;
3735
- type ToolLoopAgentOnToolCallStartCallback<TOOLS extends ToolSet = ToolSet> = Callback<OnToolCallStartEvent<TOOLS>>;
3736
- type ToolLoopAgentOnToolCallFinishCallback<TOOLS extends ToolSet = ToolSet> = Callback<OnToolCallFinishEvent<TOOLS>>;
3737
3744
  type ToolLoopAgentOnStepFinishCallback<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT extends Context = Context> = Callback<OnStepFinishEvent<TOOLS, RUNTIME_CONTEXT>>;
3738
3745
  type ToolLoopAgentOnFinishCallback<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT extends Context = Context> = Callback<OnFinishEvent<TOOLS, RUNTIME_CONTEXT>>;
3739
3746
  /**
@@ -3808,11 +3815,11 @@ type ToolLoopAgentSettings<CALL_OPTIONS = never, TOOLS extends ToolSet = {}, RUN
3808
3815
  /**
3809
3816
  * Callback that is called before each tool execution begins.
3810
3817
  */
3811
- experimental_onToolCallStart?: ToolLoopAgentOnToolCallStartCallback<NoInfer<TOOLS>>;
3818
+ experimental_onToolExecutionStart?: OnToolExecutionStartCallback<NoInfer<TOOLS>>;
3812
3819
  /**
3813
3820
  * Callback that is called after each tool execution completes.
3814
3821
  */
3815
- experimental_onToolCallFinish?: ToolLoopAgentOnToolCallFinishCallback<NoInfer<TOOLS>>;
3822
+ experimental_onToolExecutionEnd?: OnToolExecutionEndCallback<NoInfer<TOOLS>>;
3816
3823
  /**
3817
3824
  * Callback that is called when each step (LLM call) is finished, including intermediate steps.
3818
3825
  */
@@ -3833,6 +3840,13 @@ type ToolLoopAgentSettings<CALL_OPTIONS = never, TOOLS extends ToolSet = {}, RUN
3833
3840
  * By default, files are downloaded if the model does not support the URL for the given media type.
3834
3841
  */
3835
3842
  experimental_download?: DownloadFunction | undefined;
3843
+ /**
3844
+ * Internal. For test use only. May change without notice.
3845
+ */
3846
+ _internal?: {
3847
+ generateId?: IdGenerator;
3848
+ generateCallId?: IdGenerator;
3849
+ };
3836
3850
  /**
3837
3851
  * The schema for the call options.
3838
3852
  */
@@ -3842,9 +3856,9 @@ type ToolLoopAgentSettings<CALL_OPTIONS = never, TOOLS extends ToolSet = {}, RUN
3842
3856
  *
3843
3857
  * You can use this to have templates based on call options.
3844
3858
  */
3845
- prepareCall?: (options: Omit<AgentCallParameters<CALL_OPTIONS, NoInfer<TOOLS>, NoInfer<RUNTIME_CONTEXT>>, 'onStepFinish'> & Pick<ToolLoopAgentSettings<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT, NoInfer<OUTPUT>>, 'model' | 'tools' | 'maxOutputTokens' | 'temperature' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'stopSequences' | 'seed' | 'headers' | 'instructions' | 'stopWhen' | 'experimental_telemetry' | 'activeTools' | 'toolNeedsApproval' | 'providerOptions' | 'experimental_download' | 'runtimeContext'> & {
3859
+ prepareCall?: (options: Omit<AgentCallParameters<CALL_OPTIONS, NoInfer<TOOLS>, NoInfer<RUNTIME_CONTEXT>>, 'onStepFinish'> & Pick<ToolLoopAgentSettings<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT, NoInfer<OUTPUT>>, 'model' | 'tools' | 'maxOutputTokens' | 'temperature' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'stopSequences' | 'seed' | 'headers' | 'instructions' | 'stopWhen' | 'experimental_telemetry' | 'activeTools' | 'toolNeedsApproval' | 'providerOptions' | 'experimental_download' | 'runtimeContext' | '_internal'> & {
3846
3860
  toolsContext: InferToolSetContext<TOOLS>;
3847
- }) => MaybePromiseLike<Pick<ToolLoopAgentSettings<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT, NoInfer<OUTPUT>>, 'model' | 'tools' | 'maxOutputTokens' | 'temperature' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'stopSequences' | 'seed' | 'headers' | 'instructions' | 'stopWhen' | 'experimental_telemetry' | 'activeTools' | 'toolNeedsApproval' | 'providerOptions' | 'experimental_download' | 'runtimeContext'> & Omit<Prompt, 'system'> & {
3861
+ }) => MaybePromiseLike<Pick<ToolLoopAgentSettings<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT, NoInfer<OUTPUT>>, 'model' | 'tools' | 'maxOutputTokens' | 'temperature' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'stopSequences' | 'seed' | 'headers' | 'instructions' | 'stopWhen' | 'experimental_telemetry' | 'activeTools' | 'toolNeedsApproval' | 'providerOptions' | 'experimental_download' | 'runtimeContext' | '_internal'> & Omit<Prompt, 'system'> & {
3848
3862
  toolsContext: InferToolSetContext<TOOLS>;
3849
3863
  }>;
3850
3864
  };
@@ -3902,11 +3916,11 @@ type AgentCallParameters<CALL_OPTIONS, TOOLS extends ToolSet = {}, RUNTIME_CONTE
3902
3916
  /**
3903
3917
  * Callback that is called before each tool execution begins.
3904
3918
  */
3905
- experimental_onToolCallStart?: ToolLoopAgentOnToolCallStartCallback<TOOLS>;
3919
+ experimental_onToolExecutionStart?: OnToolExecutionStartCallback<TOOLS>;
3906
3920
  /**
3907
3921
  * Callback that is called after each tool execution completes.
3908
3922
  */
3909
- experimental_onToolCallFinish?: ToolLoopAgentOnToolCallFinishCallback<TOOLS>;
3923
+ experimental_onToolExecutionEnd?: OnToolExecutionEndCallback<TOOLS>;
3910
3924
  /**
3911
3925
  * Callback that is called when each step (LLM call) is finished, including intermediate steps.
3912
3926
  */
@@ -3985,11 +3999,11 @@ declare class ToolLoopAgent<CALL_OPTIONS = never, TOOLS extends ToolSet = {}, RU
3985
3999
  /**
3986
4000
  * Generates an output from the agent (non-streaming).
3987
4001
  */
3988
- generate({ abortSignal, timeout, experimental_onStart, experimental_onStepStart, experimental_onToolCallStart, experimental_onToolCallFinish, onStepFinish, onFinish, ...options }: AgentCallParameters<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT>): Promise<GenerateTextResult<TOOLS, RUNTIME_CONTEXT, OUTPUT>>;
4002
+ generate({ abortSignal, timeout, experimental_onStart, experimental_onStepStart, experimental_onToolExecutionStart, experimental_onToolExecutionEnd, onStepFinish, onFinish, ...options }: AgentCallParameters<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT>): Promise<GenerateTextResult<TOOLS, RUNTIME_CONTEXT, OUTPUT>>;
3989
4003
  /**
3990
4004
  * Streams an output from the agent (streaming).
3991
4005
  */
3992
- stream({ abortSignal, timeout, experimental_transform, experimental_onStart, experimental_onStepStart, experimental_onToolCallStart, experimental_onToolCallFinish, onStepFinish, onFinish, ...options }: AgentStreamParameters<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT>): Promise<StreamTextResult<TOOLS, RUNTIME_CONTEXT, OUTPUT>>;
4006
+ stream({ abortSignal, timeout, experimental_transform, experimental_onStart, experimental_onStepStart, experimental_onToolExecutionStart, experimental_onToolExecutionEnd, onStepFinish, onFinish, ...options }: AgentStreamParameters<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT>): Promise<StreamTextResult<TOOLS, RUNTIME_CONTEXT, OUTPUT>>;
3993
4007
  }
3994
4008
 
3995
4009
  /**
@@ -4036,28 +4050,6 @@ type GenerateTextOnStartCallback<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEX
4036
4050
  * @param event - The event object containing step configuration.
4037
4051
  */
4038
4052
  type GenerateTextOnStepStartCallback<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output> = Callback<OnStepStartEvent<TOOLS, RUNTIME_CONTEXT, OUTPUT>>;
4039
- /**
4040
- * Callback that is set using the `experimental_onToolCallStart` option.
4041
- *
4042
- * Called when a tool execution begins, before the tool's `execute` function is invoked.
4043
- * Use this for logging tool invocations, tracking tool usage, or pre-execution validation.
4044
- *
4045
- * @param event - The event object containing tool call information.
4046
- */
4047
- type GenerateTextOnToolCallStartCallback<TOOLS extends ToolSet = ToolSet> = Callback<OnToolCallStartEvent<TOOLS>>;
4048
- /**
4049
- * Callback that is set using the `experimental_onToolCallFinish` option.
4050
- *
4051
- * Called when a tool execution completes, either successfully or with an error.
4052
- * Use this for logging tool results, tracking execution time, or error handling.
4053
- *
4054
- * The event uses a discriminated union on the `success` field:
4055
- * - When `success: true`: `output` contains the tool result, `error` is never present.
4056
- * - When `success: false`: `error` contains the error, `output` is never present.
4057
- *
4058
- * @param event - The event object containing tool call result information.
4059
- */
4060
- type GenerateTextOnToolCallFinishCallback<TOOLS extends ToolSet = ToolSet> = Callback<OnToolCallFinishEvent<TOOLS>>;
4061
4053
  /**
4062
4054
  * Callback that is set using the `onStepFinish` option.
4063
4055
  *
@@ -4122,9 +4114,9 @@ type GenerateTextOnFinishCallback<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTE
4122
4114
  * @param experimental_onStart - Callback invoked when generation begins, before any LLM calls.
4123
4115
  * @param experimental_onStepStart - Callback invoked when each step begins, before the provider is called.
4124
4116
  * Receives step number, messages (in ModelMessage format), tools, and runtimeContext.
4125
- * @param experimental_onToolCallStart - Callback invoked before each tool execution begins.
4117
+ * @param experimental_onToolExecutionStart - Callback invoked before each tool execution begins.
4126
4118
  * Receives tool name, call ID, input, and context.
4127
- * @param experimental_onToolCallFinish - Callback invoked after each tool execution completes.
4119
+ * @param experimental_onToolExecutionEnd - Callback invoked after each tool execution completes.
4128
4120
  * Uses a discriminated union: check `success` to determine if `output` or `error` is present.
4129
4121
  * @param onStepFinish - Callback that is called when each step (LLM call) is finished, including intermediate steps.
4130
4122
  * @param onFinish - Callback that is called when all steps are finished and the response is complete.
@@ -4132,7 +4124,7 @@ type GenerateTextOnFinishCallback<TOOLS extends ToolSet = ToolSet, RUNTIME_CONTE
4132
4124
  * @returns
4133
4125
  * A result object that contains the generated text, the results of the tool calls, and additional information.
4134
4126
  */
4135
- declare function generateText<TOOLS extends ToolSet, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output<string, string>>({ model: modelArg, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, timeout, headers, stopWhen, experimental_output, output, toolNeedsApproval, experimental_telemetry: telemetry, providerOptions, activeTools, prepareStep, experimental_repairToolCall: repairToolCall, experimental_download: download, runtimeContext, toolsContext, experimental_include: include, _internal: { generateId, generateCallId, }, experimental_onStart: onStart, experimental_onStepStart: onStepStart, experimental_onToolCallStart: onToolCallStart, experimental_onToolCallFinish: onToolCallFinish, onStepFinish, onFinish, ...settings }: LanguageModelCallOptions & RequestOptions<TOOLS> & Prompt & ToolsContextParameter<TOOLS> & {
4127
+ declare function generateText<TOOLS extends ToolSet, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output<string, string>>({ model: modelArg, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, timeout, headers, stopWhen, output, toolNeedsApproval, experimental_telemetry: telemetry, providerOptions, activeTools, prepareStep, experimental_repairToolCall: repairToolCall, experimental_download: download, runtimeContext, toolsContext, experimental_include: include, _internal: { generateId, generateCallId, }, experimental_onStart: onStart, experimental_onStepStart: onStepStart, experimental_onToolExecutionStart: onToolExecutionStart, experimental_onToolExecutionEnd: onToolExecutionEnd, onStepFinish, onFinish, ...settings }: LanguageModelCallOptions & RequestOptions<TOOLS> & Prompt & ToolsContextParameter<TOOLS> & {
4136
4128
  /**
4137
4129
  * The language model to use.
4138
4130
  */
@@ -4172,12 +4164,6 @@ declare function generateText<TOOLS extends ToolSet, RUNTIME_CONTEXT extends Con
4172
4164
  * Optional specification for parsing structured outputs from the LLM response.
4173
4165
  */
4174
4166
  output?: OUTPUT;
4175
- /**
4176
- * Optional specification for parsing structured outputs from the LLM response.
4177
- *
4178
- * @deprecated Use `output` instead.
4179
- */
4180
- experimental_output?: OUTPUT;
4181
4167
  /**
4182
4168
  * Optional tool approval configuration.
4183
4169
  *
@@ -4211,11 +4197,11 @@ declare function generateText<TOOLS extends ToolSet, RUNTIME_CONTEXT extends Con
4211
4197
  /**
4212
4198
  * Callback that is called right before a tool's execute function runs.
4213
4199
  */
4214
- experimental_onToolCallStart?: GenerateTextOnToolCallStartCallback<NoInfer<TOOLS>>;
4200
+ experimental_onToolExecutionStart?: OnToolExecutionStartCallback<NoInfer<TOOLS>>;
4215
4201
  /**
4216
4202
  * Callback that is called right after a tool's execute function completes (or errors).
4217
4203
  */
4218
- experimental_onToolCallFinish?: GenerateTextOnToolCallFinishCallback<NoInfer<TOOLS>>;
4204
+ experimental_onToolExecutionEnd?: OnToolExecutionEndCallback<NoInfer<TOOLS>>;
4219
4205
  /**
4220
4206
  * Callback that is called when each step (LLM call) is finished, including intermediate steps.
4221
4207
  */
@@ -7181,9 +7167,9 @@ declare function rerank<VALUE extends JSONObject | string>({ model: modelArg, do
7181
7167
  }): Promise<RerankResult<VALUE>>;
7182
7168
 
7183
7169
  /**
7184
- * Registers a telemetry integration globally.
7170
+ * Registers one or more telemetry integrations globally.
7185
7171
  */
7186
- declare function registerTelemetryIntegration(integration: TelemetryIntegration): void;
7172
+ declare function registerTelemetryIntegration(...integrations: TelemetryIntegration[]): void;
7187
7173
 
7188
7174
  /**
7189
7175
  * Creates a Response object from a text stream.
@@ -7409,4 +7395,4 @@ declare global {
7409
7395
  var AI_SDK_TELEMETRY_INTEGRATIONS: TelemetryIntegration[] | undefined;
7410
7396
  }
7411
7397
 
7412
- export { AbstractChat, Agent, AgentCallParameters, AgentStreamParameters, AsyncIterableStream, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatAddToolOutputFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, ContentPart, CreateUIMessage, CustomContentUIPart, DataUIPart, DeepPartial, DefaultChatTransport, DefaultGeneratedFile, DirectChatTransport, DirectChatTransportOptions, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedFinishEvent, EmbedManyResult, EmbedOnFinishEvent, EmbedOnStartEvent, EmbedResult, EmbedStartEvent, Embedding, EmbeddingModel, EmbeddingModelMiddleware, EmbeddingModelUsage, ErrorHandler, ToolLoopAgent as Experimental_Agent, ToolLoopAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LanguageModelStreamPart as Experimental_LanguageModelStreamPart, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FileUIPart, FinishReason, GenerateImageResult, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStartCallback, GenerateTextOnStepFinishCallback, GenerateTextOnStepStartCallback, GenerateTextOnToolCallFinishCallback, GenerateTextOnToolCallStartCallback, GenerateTextResult, GenerateVideoPrompt, GenerateVideoResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageModelMiddleware, ImageModelProviderMetadata, ImageModelResponseMetadata, ImageModelUsage, InferAgentUIMessage, InferCompleteOutput as InferGenerateOutput, InferPartialOutput as InferStreamOutput, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolApprovalError, InvalidToolInputError, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelCallOptions, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, LogWarningsFunction, MessageConversionError, MissingToolResultsError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, NoTranscriptGeneratedError, NoVideoGeneratedError, ObjectOnFinishEvent, ObjectOnStartEvent, ObjectOnStepFinishEvent, ObjectOnStepStartEvent, ObjectStreamPart, OnChunkEvent, OnFinishEvent, OnStartEvent, OnStepFinishEvent, OnStepStartEvent, OnToolCallFinishEvent, OnToolCallStartEvent, output as Output, Output as OutputInterface, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderReference, ProviderRegistryProvider, ReasoningFileOutput, ReasoningFileUIPart, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RequestOptions, RerankFinishEvent, RerankOnFinishEvent, RerankOnStartEvent, RerankResult, RerankStartEvent, RerankingModel, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStartCallback, StreamTextOnStepFinishCallback, StreamTextOnStepStartCallback, StreamTextOnToolCallFinishCallback, StreamTextOnToolCallStartCallback, StreamTextResult, StreamTextTransform, TelemetryIntegration, TelemetryOptions, TextStreamChatTransport, TextStreamPart, TextUIPart, TimeoutConfiguration, ToolApprovalRequestOutput, ToolCallNotFoundForApprovalError, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolLoopAgent, ToolLoopAgentOnFinishCallback, ToolLoopAgentOnStartCallback, ToolLoopAgentOnStepFinishCallback, ToolLoopAgentOnStepStartCallback, ToolLoopAgentOnToolCallFinishCallback, ToolLoopAgentOnToolCallStartCallback, ToolLoopAgentSettings, ToolNeedsApprovalConfiguration, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamError, UIMessageStreamOnFinishCallback, UIMessageStreamOnStepFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UploadFileResult, UploadSkillResult, UseCompletionOptions, Warning, addToolInputExamplesMiddleware, assistantModelMessageSchema, callCompletionApi, consumeStream, convertDataContentToBase64String, convertFileListToFileUIParts, convertToModelMessages, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createDownload, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultEmbeddingSettingsMiddleware, defaultSettingsMiddleware, embed, embedMany, experimental_createProviderRegistry, experimental_customProvider, filterActiveTools as experimental_filterActiveTools, experimental_generateImage, generateSpeech as experimental_generateSpeech, experimental_generateVideo, streamLanguageModelCall as experimental_streamLanguageModelCall, transcribe as experimental_transcribe, extractJsonMiddleware, extractReasoningMiddleware, generateImage, generateObject, generateText, getChunkTimeoutMs, getStaticToolName, getStepTimeoutMs, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, getToolTimeoutMs, getTotalTimeoutMs, hasToolCall, isCustomContentUIPart, isDataUIPart, isDeepEqualData, isDynamicToolUIPart, isFileUIPart, isLoopFinished, isReasoningFileUIPart, isReasoningUIPart, isStaticToolUIPart, isStepCount, isTextUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, registerTelemetryIntegration, rerank, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, isStepCount as stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, uploadFile, uploadSkill, userModelMessageSchema, validateUIMessages, wrapEmbeddingModel, wrapImageModel, wrapLanguageModel, wrapProvider };
7398
+ export { AbstractChat, Agent, AgentCallParameters, AgentStreamParameters, AsyncIterableStream, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatAddToolOutputFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, ContentPart, CreateUIMessage, CustomContentUIPart, DataUIPart, DeepPartial, DefaultChatTransport, DefaultGeneratedFile, DirectChatTransport, DirectChatTransportOptions, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedFinishEvent, EmbedManyResult, EmbedOnFinishEvent, EmbedOnStartEvent, EmbedResult, EmbedStartEvent, Embedding, EmbeddingModel, EmbeddingModelMiddleware, EmbeddingModelUsage, ErrorHandler, ToolLoopAgent as Experimental_Agent, ToolLoopAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LanguageModelStreamPart as Experimental_LanguageModelStreamPart, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FileUIPart, FinishReason, GenerateImageResult, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStartCallback, GenerateTextOnStepFinishCallback, GenerateTextOnStepStartCallback, GenerateTextResult, GenerateVideoPrompt, GenerateVideoResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageModelMiddleware, ImageModelProviderMetadata, ImageModelResponseMetadata, ImageModelUsage, InferAgentUIMessage, InferCompleteOutput as InferGenerateOutput, InferPartialOutput as InferStreamOutput, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolApprovalError, InvalidToolInputError, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelCallOptions, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, LogWarningsFunction, MessageConversionError, MissingToolResultsError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, NoTranscriptGeneratedError, NoVideoGeneratedError, ObjectOnFinishEvent, ObjectOnStartEvent, ObjectOnStepFinishEvent, ObjectOnStepStartEvent, ObjectStreamPart, OnChunkEvent, OnFinishEvent, OnStartEvent, OnStepFinishEvent, OnStepStartEvent, OnToolExecutionEndCallback, OnToolExecutionStartCallback, output as Output, Output as OutputInterface, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderReference, ProviderRegistryProvider, ReasoningFileOutput, ReasoningFileUIPart, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RequestOptions, RerankFinishEvent, RerankOnFinishEvent, RerankOnStartEvent, RerankResult, RerankStartEvent, RerankingModel, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStartCallback, StreamTextOnStepFinishCallback, StreamTextOnStepStartCallback, StreamTextResult, StreamTextTransform, TelemetryIntegration, TelemetryOptions, TextStreamChatTransport, TextStreamPart, TextUIPart, TimeoutConfiguration, ToolApprovalRequestOutput, ToolCallNotFoundForApprovalError, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolExecutionEndEvent, ToolExecutionStartEvent, ToolLoopAgent, ToolLoopAgentOnFinishCallback, ToolLoopAgentOnStartCallback, ToolLoopAgentOnStepFinishCallback, ToolLoopAgentOnStepStartCallback, ToolLoopAgentSettings, ToolNeedsApprovalConfiguration, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamError, UIMessageStreamOnFinishCallback, UIMessageStreamOnStepFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UploadFileResult, UploadSkillResult, UseCompletionOptions, Warning, addToolInputExamplesMiddleware, assistantModelMessageSchema, callCompletionApi, consumeStream, convertDataContentToBase64String, convertFileListToFileUIParts, convertToModelMessages, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createDownload, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultEmbeddingSettingsMiddleware, defaultSettingsMiddleware, embed, embedMany, experimental_createProviderRegistry, experimental_customProvider, filterActiveTools as experimental_filterActiveTools, experimental_generateImage, generateSpeech as experimental_generateSpeech, experimental_generateVideo, streamLanguageModelCall as experimental_streamLanguageModelCall, transcribe as experimental_transcribe, extractJsonMiddleware, extractReasoningMiddleware, generateImage, generateObject, generateText, getChunkTimeoutMs, getStaticToolName, getStepTimeoutMs, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, getToolTimeoutMs, getTotalTimeoutMs, hasToolCall, isCustomContentUIPart, isDataUIPart, isDeepEqualData, isDynamicToolUIPart, isFileUIPart, isLoopFinished, isReasoningFileUIPart, isReasoningUIPart, isStaticToolUIPart, isStepCount, isTextUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, registerTelemetryIntegration, rerank, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, isStepCount as stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, uploadFile, uploadSkill, userModelMessageSchema, validateUIMessages, wrapEmbeddingModel, wrapImageModel, wrapLanguageModel, wrapProvider };