ai 7.0.142 → 7.0.144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # ai
2
2
 
3
+ ## 7.0.144
4
+
5
+ ### Patch Changes
6
+
7
+ - 60cc252: feat(perplexity): add decisions api support
8
+ - 0ed59e2: Fix `streamText` return types for reusable options and `ReturnType` by moving low-memory streaming to `experimental_streamTextLowMemory`. Replace experimental `streamText({ experimental_lowMemory: true, ...options })` calls with `experimental_streamTextLowMemory(options)`.
9
+ - Updated dependencies [60cc252]
10
+ - Updated dependencies [6b7fb8f]
11
+ - @ai-sdk/provider@4.0.30
12
+ - @ai-sdk/gateway@4.0.117
13
+ - @ai-sdk/provider-utils@5.0.63
14
+
15
+ ## 7.0.143
16
+
17
+ ### Patch Changes
18
+
19
+ - 8a5233b: Generate default chat IDs on first access so `useChat()` can prerender without reading a random value when the ID is not used during rendering.
20
+ - 894e130: fix(ai): add `experimental_lowMemory: true` to `streamText` for single-consumer streaming without a replay buffer or retained final-content results, reducing memory retention.
21
+ - 0957554: Add `box` decision question type with image bounds for TypeSafe AI.
22
+ - Updated dependencies [0957554]
23
+ - @ai-sdk/provider@4.0.29
24
+ - @ai-sdk/provider-utils@5.0.62
25
+ - @ai-sdk/gateway@4.0.116
26
+
3
27
  ## 7.0.142
4
28
 
5
29
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -572,6 +572,16 @@ type DecisionAnswer<QUESTION extends Experimental_DecisionModelV4Question> = QUE
572
572
  type: 'score';
573
573
  score: number;
574
574
  probabilities?: Record<string, number>;
575
+ } : QUESTION extends {
576
+ type: 'box';
577
+ } ? {
578
+ type: 'box';
579
+ box: {
580
+ top: number;
581
+ bottom: number;
582
+ left: number;
583
+ right: number;
584
+ };
575
585
  } : {
576
586
  type: 'boolean';
577
587
  probability: number;
@@ -1794,205 +1804,6 @@ type OnLanguageModelCallStartCallback = Callback<LanguageModelCallStartEvent>;
1794
1804
  */
1795
1805
  type OnLanguageModelCallEndCallback<TOOLS extends ToolSet$1 = ToolSet$1> = Callback<LanguageModelCallEndEvent<TOOLS>>;
1796
1806
  //#endregion
1797
- //#region src/generate-text/output-utils.d.ts
1798
- /**
1799
- * Infers the complete output type from the output specification.
1800
- */
1801
- type InferCompleteOutput<OUTPUT extends Output> = OUTPUT extends Output<infer COMPLETE_OUTPUT, any, any> ? COMPLETE_OUTPUT : never;
1802
- /**
1803
- * Infers the partial output type from the output specification.
1804
- */
1805
- type InferPartialOutput<OUTPUT extends Output> = OUTPUT extends Output<any, infer PARTIAL_OUTPUT, any> ? PARTIAL_OUTPUT : never;
1806
- /**
1807
- * Infers the element type from an array output specification.
1808
- */
1809
- type InferElementOutput<OUTPUT extends Output> = OUTPUT extends Output<any, any, infer ELEMENT> ? ELEMENT : never;
1810
- //#endregion
1811
- //#region src/generate-text/tool-order.d.ts
1812
- /**
1813
- * Tool names that define the order in which tools are sent to the provider.
1814
- *
1815
- * Tool names are object keys at runtime, so the type is restricted to the
1816
- * string keys of the configured tool set. The list can be partial; tools not
1817
- * listed in `toolOrder` are sent after the listed tools, sorted alphabetically.
1818
- */
1819
- type ToolOrder<TOOLS extends ToolSet$1> = ReadonlyArray<keyof TOOLS & string> | undefined;
1820
- //#endregion
1821
- //#region src/generate-text/prepare-step.d.ts
1822
- /**
1823
- * Function that you can use to provide different settings for a step.
1824
- *
1825
- * @param options - The options for the step.
1826
- * @param options.steps - The steps that have been executed so far.
1827
- * @param options.stepNumber - The number of the step that is being executed.
1828
- * @param options.model - The model that is being used.
1829
- * @param options.instructions - The instructions that will be sent to the model for the current step.
1830
- * @param options.initialInstructions - The initial instructions that were passed into generateText or streamText.
1831
- * @param options.messages - The messages that will be sent to the model for the current step. If you return a `messages` override, those messages carry forward to later steps.
1832
- * @param options.initialMessages - The initial messages that were passed into generateText or streamText.
1833
- * @param options.responseMessages - The response messages that have been accumulated from previous steps.
1834
- * @param options.runtimeContext - The user-defined runtime context.
1835
- *
1836
- * @returns An object that contains the settings for the step.
1837
- * If you return undefined (or for undefined settings), the settings from the outer level will be used.
1838
- */
1839
- type PrepareStepFunction<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context = Context> = (options: {
1840
- /**
1841
- * The steps that have been executed so far.
1842
- */
1843
- steps: Array<StepResult<NoInfer<TOOLS>, NoInfer<RUNTIME_CONTEXT>>>;
1844
- /**
1845
- * The number of the step that is being executed.
1846
- */
1847
- stepNumber: number;
1848
- /**
1849
- * The model instance that is being used for this step.
1850
- */
1851
- model: LanguageModel;
1852
- /**
1853
- * The instructions that will be sent to the model for the current step.
1854
- */
1855
- instructions: Instructions | undefined;
1856
- /**
1857
- * The initial instructions that were passed into generateText or streamText.
1858
- */
1859
- initialInstructions: Instructions | undefined;
1860
- /**
1861
- * The messages that will be sent to the model for the current step.
1862
- * If you return a `messages` override, those messages carry forward to later steps.
1863
- */
1864
- messages: Array<ModelMessage$1>;
1865
- /**
1866
- * The initial messages that were passed into generateText or streamText.
1867
- */
1868
- initialMessages: Array<ModelMessage$1>;
1869
- /**
1870
- * The response messages that have been accumulated from all previous steps.
1871
- */
1872
- responseMessages: Array<ResponseMessage>;
1873
- /**
1874
- * Tool context.
1875
- */
1876
- toolsContext: InferToolSetContext<TOOLS>;
1877
- /**
1878
- * User-defined runtime context.
1879
- */
1880
- runtimeContext: RUNTIME_CONTEXT;
1881
- /**
1882
- * The sandbox environment that the step is operating in.
1883
- */
1884
- experimental_sandbox?: Experimental_SandboxSession$1;
1885
- }) => PromiseLike<PrepareStepResult<TOOLS, RUNTIME_CONTEXT>> | PrepareStepResult<TOOLS, RUNTIME_CONTEXT>;
1886
- /**
1887
- * The result type returned by a {@link PrepareStepFunction},
1888
- * allowing per-step overrides of model call settings, model, tools,
1889
- * instructions, or messages.
1890
- *
1891
- * Model call setting overrides apply only to the current step. Undefined
1892
- * settings fall back to the outer call settings.
1893
- */
1894
- type PrepareStepResult<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context = Context> = ({
1895
- /**
1896
- * Optionally override which LanguageModel instance is used for this step.
1897
- */
1898
- model?: LanguageModel;
1899
- /**
1900
- * Optionally set which tool the model must call, or provide tool call configuration
1901
- * for this step.
1902
- */
1903
- toolChoice?: ToolChoice<NoInfer<TOOLS>>;
1904
- /**
1905
- * If provided, only these tools are enabled/available for this step.
1906
- */
1907
- activeTools?: ActiveTools<NoInfer<TOOLS>>;
1908
- /**
1909
- * Optionally override the order in which tools are sent to the provider
1910
- * for this step.
1911
- */
1912
- toolOrder?: ToolOrder<NoInfer<TOOLS>>;
1913
- /**
1914
- * Optionally override the instructions sent to the model for this step.
1915
- * The override carries forward to later steps.
1916
- */
1917
- instructions?: Instructions;
1918
- /**
1919
- * Optionally override the instructions sent to the model for this step.
1920
- *
1921
- * @deprecated Use `instructions` instead.
1922
- */
1923
- system?: Instructions;
1924
- /**
1925
- * Optionally override the full set of messages sent to the model
1926
- * for this step. The override carries forward to later steps.
1927
- */
1928
- messages?: Array<ModelMessage$1>;
1929
- /**
1930
- * Tool context.
1931
- *
1932
- * Changing the toolsContext will affect the toolsContext in this step
1933
- * and all subsequent steps.
1934
- *
1935
- * The toolsContext is passed into tool execution.
1936
- */
1937
- toolsContext?: InferToolSetContext<TOOLS>;
1938
- /**
1939
- * Runtime context.
1940
- *
1941
- * Changing the runtimeContext will affect the runtimeContext in this step
1942
- * and all subsequent steps.
1943
- */
1944
- runtimeContext?: RUNTIME_CONTEXT;
1945
- /**
1946
- * The sandbox environment that the step is operating in.
1947
- *
1948
- * Changing the sandbox will affect tool execution in this step only.
1949
- */
1950
- experimental_sandbox?: Experimental_SandboxSession$1;
1951
- /**
1952
- * Additional provider-specific options for this step.
1953
- *
1954
- * Can be used to pass provider-specific configuration such as
1955
- * container IDs for Anthropic's code execution.
1956
- */
1957
- providerOptions?: ProviderOptions;
1958
- } & LanguageModelCallOptions) | undefined;
1959
- //#endregion
1960
- //#region src/generate-text/stop-condition.d.ts
1961
- /**
1962
- * A predicate that decides whether a tool-calling loop should stop after the
1963
- * current step.
1964
- *
1965
- * A tool calling loop continues until one of the following conditions is met:
1966
- * - The model returns a finish reason other than `tool-calls`
1967
- * - A tool without an execute function is called
1968
- * - A tool call needs approval
1969
- * - One of the provided stop conditions returns `true`
1970
- */
1971
- type StopCondition<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context = Context> = (options: {
1972
- steps: Array<StepResult<TOOLS, RUNTIME_CONTEXT>>;
1973
- }) => PromiseLike<boolean> | boolean;
1974
- /**
1975
- * Creates a stop condition that returns `true` when the number of completed
1976
- * steps equals `stepCount`.
1977
- *
1978
- * @param stepCount - The number of steps to allow before stopping.
1979
- */
1980
- export declare function isStepCount(stepCount: number): StopCondition<any, any>;
1981
- /**
1982
- * Creates a stop condition that never returns `true`.
1983
- *
1984
- * This lets the tool-calling loop continue until it reaches one of its
1985
- * natural termination conditions.
1986
- */
1987
- export declare function isLoopFinished(): StopCondition<any, any>;
1988
- /**
1989
- * Creates a stop condition that returns `true` when the most recent step
1990
- * contains a tool call with any of the specified names.
1991
- *
1992
- * @param toolName - The names of the tools that should stop the loop.
1993
- */
1994
- export declare function hasToolCall<TOOLS extends ToolSet$1>(...toolName: Array<keyof TOOLS | (string & {})>): StopCondition<TOOLS, any>;
1995
- //#endregion
1996
1807
  //#region src/ui/ui-messages.d.ts
1997
1808
  /**
1998
1809
  * The data types that can be used in the UI message for the UI message data parts.
@@ -2826,6 +2637,20 @@ type AsyncIterableStream<T> = AsyncIterable<T> & ReadableStream<T>;
2826
2637
  //#region src/util/error-handler.d.ts
2827
2638
  type ErrorHandler = (error: unknown) => void;
2828
2639
  //#endregion
2640
+ //#region src/generate-text/output-utils.d.ts
2641
+ /**
2642
+ * Infers the complete output type from the output specification.
2643
+ */
2644
+ type InferCompleteOutput<OUTPUT extends Output> = OUTPUT extends Output<infer COMPLETE_OUTPUT, any, any> ? COMPLETE_OUTPUT : never;
2645
+ /**
2646
+ * Infers the partial output type from the output specification.
2647
+ */
2648
+ type InferPartialOutput<OUTPUT extends Output> = OUTPUT extends Output<any, infer PARTIAL_OUTPUT, any> ? PARTIAL_OUTPUT : never;
2649
+ /**
2650
+ * Infers the element type from an array output specification.
2651
+ */
2652
+ type InferElementOutput<OUTPUT extends Output> = OUTPUT extends Output<any, any, infer ELEMENT> ? ELEMENT : never;
2653
+ //#endregion
2829
2654
  //#region src/generate-text/tool-output-denied.d.ts
2830
2655
  /**
2831
2656
  * Tool output when the tool execution has been denied (for static tools).
@@ -3302,6 +3127,195 @@ type TextStreamRawPart = {
3302
3127
  };
3303
3128
  type TextStreamPart<TOOLS extends ToolSet$1> = TextStreamTextStartPart | TextStreamTextEndPart | TextStreamTextDeltaPart | TextStreamReasoningStartPart | TextStreamReasoningEndPart | TextStreamReasoningDeltaPart | TextStreamCustomPart | TextStreamToolInputStartPart | TextStreamToolInputEndPart | TextStreamToolInputDeltaPart | TextStreamSourcePart | TextStreamFilePart | TextStreamReasoningFilePart | TextStreamToolCallPart<TOOLS> | TextStreamToolResultPart<TOOLS> | TextStreamToolErrorPart<TOOLS> | TextStreamToolOutputDeniedPart<TOOLS> | TextStreamToolApprovalRequestPart<TOOLS> | TextStreamToolApprovalResponsePart<TOOLS> | TextStreamStartStepPart | TextStreamFinishStepPart | TextStreamStartPart | TextStreamFinishPart | TextStreamAbortPart | TextStreamErrorPart | TextStreamRawPart;
3304
3129
  //#endregion
3130
+ //#region src/generate-text/stream-text-single-consumer-result.d.ts
3131
+ /** A single-consumer view of a text generation, without replay or final content getters. */
3132
+ type StreamTextSingleConsumerResult<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context, OUTPUT extends Output> = Pick<StreamTextResult<TOOLS, RUNTIME_CONTEXT, OUTPUT>, 'textStream' | 'stream' | 'fullStream' | 'partialOutputStream' | 'elementStream' | 'totalUsage' | 'usage' | 'finishReason' | 'rawFinishReason' | 'consumeStream' | 'toUIMessageStream' | 'toUIMessageStreamResponse' | 'toTextStreamResponse' | 'pipeUIMessageStreamToResponse' | 'pipeTextStreamToResponse'>;
3133
+ //#endregion
3134
+ //#region src/generate-text/tool-order.d.ts
3135
+ /**
3136
+ * Tool names that define the order in which tools are sent to the provider.
3137
+ *
3138
+ * Tool names are object keys at runtime, so the type is restricted to the
3139
+ * string keys of the configured tool set. The list can be partial; tools not
3140
+ * listed in `toolOrder` are sent after the listed tools, sorted alphabetically.
3141
+ */
3142
+ type ToolOrder<TOOLS extends ToolSet$1> = ReadonlyArray<keyof TOOLS & string> | undefined;
3143
+ //#endregion
3144
+ //#region src/generate-text/prepare-step.d.ts
3145
+ /**
3146
+ * Function that you can use to provide different settings for a step.
3147
+ *
3148
+ * @param options - The options for the step.
3149
+ * @param options.steps - The steps that have been executed so far.
3150
+ * @param options.stepNumber - The number of the step that is being executed.
3151
+ * @param options.model - The model that is being used.
3152
+ * @param options.instructions - The instructions that will be sent to the model for the current step.
3153
+ * @param options.initialInstructions - The initial instructions that were passed into generateText or streamText.
3154
+ * @param options.messages - The messages that will be sent to the model for the current step. If you return a `messages` override, those messages carry forward to later steps.
3155
+ * @param options.initialMessages - The initial messages that were passed into generateText or streamText.
3156
+ * @param options.responseMessages - The response messages that have been accumulated from previous steps.
3157
+ * @param options.runtimeContext - The user-defined runtime context.
3158
+ *
3159
+ * @returns An object that contains the settings for the step.
3160
+ * If you return undefined (or for undefined settings), the settings from the outer level will be used.
3161
+ */
3162
+ type PrepareStepFunction<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context = Context> = (options: {
3163
+ /**
3164
+ * The steps that have been executed so far.
3165
+ */
3166
+ steps: Array<StepResult<NoInfer<TOOLS>, NoInfer<RUNTIME_CONTEXT>>>;
3167
+ /**
3168
+ * The number of the step that is being executed.
3169
+ */
3170
+ stepNumber: number;
3171
+ /**
3172
+ * The model instance that is being used for this step.
3173
+ */
3174
+ model: LanguageModel;
3175
+ /**
3176
+ * The instructions that will be sent to the model for the current step.
3177
+ */
3178
+ instructions: Instructions | undefined;
3179
+ /**
3180
+ * The initial instructions that were passed into generateText or streamText.
3181
+ */
3182
+ initialInstructions: Instructions | undefined;
3183
+ /**
3184
+ * The messages that will be sent to the model for the current step.
3185
+ * If you return a `messages` override, those messages carry forward to later steps.
3186
+ */
3187
+ messages: Array<ModelMessage$1>;
3188
+ /**
3189
+ * The initial messages that were passed into generateText or streamText.
3190
+ */
3191
+ initialMessages: Array<ModelMessage$1>;
3192
+ /**
3193
+ * The response messages that have been accumulated from all previous steps.
3194
+ */
3195
+ responseMessages: Array<ResponseMessage>;
3196
+ /**
3197
+ * Tool context.
3198
+ */
3199
+ toolsContext: InferToolSetContext<TOOLS>;
3200
+ /**
3201
+ * User-defined runtime context.
3202
+ */
3203
+ runtimeContext: RUNTIME_CONTEXT;
3204
+ /**
3205
+ * The sandbox environment that the step is operating in.
3206
+ */
3207
+ experimental_sandbox?: Experimental_SandboxSession$1;
3208
+ }) => PromiseLike<PrepareStepResult<TOOLS, RUNTIME_CONTEXT>> | PrepareStepResult<TOOLS, RUNTIME_CONTEXT>;
3209
+ /**
3210
+ * The result type returned by a {@link PrepareStepFunction},
3211
+ * allowing per-step overrides of model call settings, model, tools,
3212
+ * instructions, or messages.
3213
+ *
3214
+ * Model call setting overrides apply only to the current step. Undefined
3215
+ * settings fall back to the outer call settings.
3216
+ */
3217
+ type PrepareStepResult<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context = Context> = ({
3218
+ /**
3219
+ * Optionally override which LanguageModel instance is used for this step.
3220
+ */
3221
+ model?: LanguageModel;
3222
+ /**
3223
+ * Optionally set which tool the model must call, or provide tool call configuration
3224
+ * for this step.
3225
+ */
3226
+ toolChoice?: ToolChoice<NoInfer<TOOLS>>;
3227
+ /**
3228
+ * If provided, only these tools are enabled/available for this step.
3229
+ */
3230
+ activeTools?: ActiveTools<NoInfer<TOOLS>>;
3231
+ /**
3232
+ * Optionally override the order in which tools are sent to the provider
3233
+ * for this step.
3234
+ */
3235
+ toolOrder?: ToolOrder<NoInfer<TOOLS>>;
3236
+ /**
3237
+ * Optionally override the instructions sent to the model for this step.
3238
+ * The override carries forward to later steps.
3239
+ */
3240
+ instructions?: Instructions;
3241
+ /**
3242
+ * Optionally override the instructions sent to the model for this step.
3243
+ *
3244
+ * @deprecated Use `instructions` instead.
3245
+ */
3246
+ system?: Instructions;
3247
+ /**
3248
+ * Optionally override the full set of messages sent to the model
3249
+ * for this step. The override carries forward to later steps.
3250
+ */
3251
+ messages?: Array<ModelMessage$1>;
3252
+ /**
3253
+ * Tool context.
3254
+ *
3255
+ * Changing the toolsContext will affect the toolsContext in this step
3256
+ * and all subsequent steps.
3257
+ *
3258
+ * The toolsContext is passed into tool execution.
3259
+ */
3260
+ toolsContext?: InferToolSetContext<TOOLS>;
3261
+ /**
3262
+ * Runtime context.
3263
+ *
3264
+ * Changing the runtimeContext will affect the runtimeContext in this step
3265
+ * and all subsequent steps.
3266
+ */
3267
+ runtimeContext?: RUNTIME_CONTEXT;
3268
+ /**
3269
+ * The sandbox environment that the step is operating in.
3270
+ *
3271
+ * Changing the sandbox will affect tool execution in this step only.
3272
+ */
3273
+ experimental_sandbox?: Experimental_SandboxSession$1;
3274
+ /**
3275
+ * Additional provider-specific options for this step.
3276
+ *
3277
+ * Can be used to pass provider-specific configuration such as
3278
+ * container IDs for Anthropic's code execution.
3279
+ */
3280
+ providerOptions?: ProviderOptions;
3281
+ } & LanguageModelCallOptions) | undefined;
3282
+ //#endregion
3283
+ //#region src/generate-text/stop-condition.d.ts
3284
+ /**
3285
+ * A predicate that decides whether a tool-calling loop should stop after the
3286
+ * current step.
3287
+ *
3288
+ * A tool calling loop continues until one of the following conditions is met:
3289
+ * - The model returns a finish reason other than `tool-calls`
3290
+ * - A tool without an execute function is called
3291
+ * - A tool call needs approval
3292
+ * - One of the provided stop conditions returns `true`
3293
+ */
3294
+ type StopCondition<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context = Context> = (options: {
3295
+ steps: Array<StepResult<TOOLS, RUNTIME_CONTEXT>>;
3296
+ }) => PromiseLike<boolean> | boolean;
3297
+ /**
3298
+ * Creates a stop condition that returns `true` when the number of completed
3299
+ * steps equals `stepCount`.
3300
+ *
3301
+ * @param stepCount - The number of steps to allow before stopping.
3302
+ */
3303
+ export declare function isStepCount(stepCount: number): StopCondition<any, any>;
3304
+ /**
3305
+ * Creates a stop condition that never returns `true`.
3306
+ *
3307
+ * This lets the tool-calling loop continue until it reaches one of its
3308
+ * natural termination conditions.
3309
+ */
3310
+ export declare function isLoopFinished(): StopCondition<any, any>;
3311
+ /**
3312
+ * Creates a stop condition that returns `true` when the most recent step
3313
+ * contains a tool call with any of the specified names.
3314
+ *
3315
+ * @param toolName - The names of the tools that should stop the loop.
3316
+ */
3317
+ export declare function hasToolCall<TOOLS extends ToolSet$1>(...toolName: Array<keyof TOOLS | (string & {})>): StopCondition<TOOLS, any>;
3318
+ //#endregion
3305
3319
  //#region src/generate-text/tool-approval-configuration.d.ts
3306
3320
  /**
3307
3321
  * The approval status of a tool configuration. This can be one of the following:
@@ -3617,6 +3631,13 @@ type ToolsContextParameter<TOOLS extends ToolSet$1> = {
3617
3631
  } & ToolsContextSettings<TOOLS>;
3618
3632
  //#endregion
3619
3633
  //#region src/generate-text/stream-text.d.ts
3634
+ /** Internal policy, fixed before the model request starts. */
3635
+ type StreamTextRetention = {
3636
+ /** Keep a replay branch for independently consumed stream projections. */
3637
+ replay: boolean;
3638
+ /** Collect complete content for results, callbacks, or subsequent steps. */
3639
+ collectContent: boolean;
3640
+ };
3620
3641
  type StreamTextInclude = {
3621
3642
  /**
3622
3643
  * Whether to retain the request body in step results.
@@ -3700,6 +3721,7 @@ type StreamTextOnEndCallback<TOOLS extends ToolSet$1 = ToolSet$1, RUNTIME_CONTEX
3700
3721
  * @param event - The event that is passed to the callback.
3701
3722
  */
3702
3723
  type StreamTextOnAbortCallback<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context> = Callback<GenerateTextAbortEvent<TOOLS, RUNTIME_CONTEXT>>;
3724
+ type StreamTextOptions<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context, OUTPUT extends Output> = Parameters<typeof streamTextInternal<TOOLS, RUNTIME_CONTEXT, OUTPUT>>[0];
3703
3725
  /**
3704
3726
  * Generate a text and call tools for a given prompt using a language model.
3705
3727
  *
@@ -3768,7 +3790,13 @@ type StreamTextOnAbortCallback<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends
3768
3790
  * @returns
3769
3791
  * A result object for accessing different stream types and additional information.
3770
3792
  */
3771
- export declare function streamText<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output<string, string, never>>({ model, tools, toolChoice, instructions, system, prompt, messages, allowSystemInMessages, maxRetries, streamRetries, abortSignal, timeout, headers, stopWhen, experimental_sandbox: sandbox, output, toolApproval, experimental_toolCallers, experimental_toolApprovalSecret, experimental_telemetry, telemetry, prepareStep, providerOptions, activeTools, toolOrder, toolCallConcurrency, experimental_repairToolCall, repairToolCall, experimental_refineToolInput: refineToolInput, experimental_transform: transform, experimental_download: download, includeRawChunks, onChunk, onError: onErrorArg, onFinish, onEnd, onAbort, onStepEnd, onStepFinish, onStart, experimental_onStart, onStepStart, experimental_onStepStart, onLanguageModelCallStart, experimental_onLanguageModelCallStart, onLanguageModelCallEnd, experimental_onLanguageModelCallEnd, onToolExecutionStart, onToolExecutionEnd, experimental_onToolCallStart, experimental_onToolCallFinish, runtimeContext, toolsContext, experimental_include, include, _internal: { now, generateId, generateCallId }, ...settings }: LanguageModelCallOptions & RequestOptions<TOOLS> & Prompt & ToolsContextParameter<TOOLS> & {
3793
+ export declare function streamText<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output<string, string, never>>(options: StreamTextOptions<TOOLS, RUNTIME_CONTEXT, OUTPUT>): StreamTextResult<TOOLS, RUNTIME_CONTEXT, OUTPUT>;
3794
+ /**
3795
+ * Stream text with a single consumer, without replay or final-content getters.
3796
+ * Accepts the same options as streamText and uses the same execution engine.
3797
+ */
3798
+ declare function streamTextLowMemory<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output<string, string, never>>(options: StreamTextOptions<TOOLS, RUNTIME_CONTEXT, OUTPUT>): StreamTextSingleConsumerResult<TOOLS, RUNTIME_CONTEXT, OUTPUT>;
3799
+ declare function streamTextInternal<TOOLS extends ToolSet$1, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = Output<string, string, never>>({ model, tools, toolChoice, instructions, system, prompt, messages, allowSystemInMessages, maxRetries, streamRetries, abortSignal, timeout, headers, stopWhen, experimental_sandbox: sandbox, output, toolApproval, experimental_toolCallers, experimental_toolApprovalSecret, experimental_telemetry, telemetry, prepareStep, providerOptions, activeTools, toolOrder, toolCallConcurrency, experimental_repairToolCall, repairToolCall, experimental_refineToolInput: refineToolInput, experimental_transform: transform, experimental_download: download, includeRawChunks, onChunk, onError: onErrorArg, onFinish, onEnd, onAbort, onStepEnd, onStepFinish, onStart, experimental_onStart, onStepStart, experimental_onStepStart, onLanguageModelCallStart, experimental_onLanguageModelCallStart, onLanguageModelCallEnd, experimental_onLanguageModelCallEnd, onToolExecutionStart, onToolExecutionEnd, experimental_onToolCallStart, experimental_onToolCallFinish, runtimeContext, toolsContext, experimental_include, include, _internal: { now, generateId, generateCallId, retention }, ...settings }: LanguageModelCallOptions & RequestOptions<TOOLS> & Prompt & ToolsContextParameter<TOOLS> & {
3772
3800
  /**
3773
3801
  * The language model to use.
3774
3802
  */
@@ -4046,6 +4074,8 @@ export declare function streamText<TOOLS extends ToolSet$1, RUNTIME_CONTEXT exte
4046
4074
  now?: () => number;
4047
4075
  generateId?: IdGenerator$1;
4048
4076
  generateCallId?: IdGenerator$1;
4077
+ /** Internal policy used by the streaming-only facade. */
4078
+ retention?: StreamTextRetention;
4049
4079
  };
4050
4080
  }): StreamTextResult<TOOLS, RUNTIME_CONTEXT, OUTPUT>;
4051
4081
  type EnrichedStreamPart<TOOLS extends ToolSet$1, PARTIAL_OUTPUT> = {
@@ -6050,7 +6080,7 @@ type ChatOnFinishCallback<UI_MESSAGE extends UIMessage> = (options: {
6050
6080
  interface ChatInit<UI_MESSAGE extends UIMessage> {
6051
6081
  /**
6052
6082
  * A unique identifier for the chat. If not provided, a random one will be
6053
- * generated.
6083
+ * generated when first accessed.
6054
6084
  */
6055
6085
  id?: string;
6056
6086
  messageMetadataSchema?: FlexibleSchema$1<UI_MESSAGE['metadata']>;
@@ -6093,7 +6123,8 @@ interface ChatInit<UI_MESSAGE extends UIMessage> {
6093
6123
  }) => boolean | PromiseLike<boolean>;
6094
6124
  }
6095
6125
  export declare abstract class AbstractChat<UI_MESSAGE extends UIMessage> {
6096
- readonly id: string;
6126
+ private _id;
6127
+ get id(): string;
6097
6128
  readonly generateId: IdGenerator$1;
6098
6129
  protected state: ChatState<UI_MESSAGE>;
6099
6130
  private messageMetadataSchema;
@@ -7137,7 +7168,7 @@ type LanguageModelStreamPart<TOOLS extends ToolSet$1 = ToolSet$1> = Exclude<Text
7137
7168
  *
7138
7169
  * @returns A stream of model call parts together with request and response metadata when available.
7139
7170
  */
7140
- declare function streamLanguageModelCall<TOOLS extends ToolSet$1, OUTPUT extends Output = Output>({ model, tools, toolOrder, output, toolChoice, prompt, system, instructions, messages, allowSystemInMessages, download, abortSignal, headers, includeRawChunks, providerOptions, repairToolCall, refineToolInput, executeLanguageModelCallInTelemetryContext, callId, toolsContext, experimental_sandbox: sandbox, _internal: { generateId, generateCallId, now }, onStart, onLanguageModelCallStart, onLanguageModelCallEnd, ...callSettings }: {
7171
+ declare function streamLanguageModelCall<TOOLS extends ToolSet$1, OUTPUT extends Output = Output>({ model, tools, toolOrder, output, toolChoice, prompt, system, instructions, messages, allowSystemInMessages, download, abortSignal, headers, includeRawChunks, providerOptions, repairToolCall, refineToolInput, executeLanguageModelCallInTelemetryContext, callId, toolsContext, experimental_sandbox: sandbox, _internal: { generateId, generateCallId, now, collectContent }, onStart, onLanguageModelCallStart, onLanguageModelCallEnd, ...callSettings }: {
7141
7172
  model: LanguageModel;
7142
7173
  tools?: TOOLS;
7143
7174
  toolOrder?: ToolOrder<TOOLS>;
@@ -7165,6 +7196,8 @@ declare function streamLanguageModelCall<TOOLS extends ToolSet$1, OUTPUT extends
7165
7196
  generateId?: IdGenerator$1;
7166
7197
  generateCallId?: IdGenerator$1;
7167
7198
  now?: () => number;
7199
+ /** Internal: content is only needed by collectors and full-content callbacks. */
7200
+ collectContent?: boolean;
7168
7201
  };
7169
7202
  onLanguageModelCallStart?: Arrayable<OnLanguageModelCallStartCallback>;
7170
7203
  onLanguageModelCallEnd?: Arrayable<OnLanguageModelCallEndCallback<TOOLS>>;
@@ -10940,5 +10973,5 @@ export declare function uploadSkill({ api, files, displayTitle, providerOptions
10940
10973
  files: UploadSkillFile[];
10941
10974
  }): Promise<UploadSkillResult>;
10942
10975
  //#endregion
10943
- 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 Citation, 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 PrepareWebSocketChatTransportReconnectToStreamRequest, type PrepareWebSocketChatTransportSendMessagesRequest, 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 SafeValidateWebSocketChatTransportRequestResult, 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, type WebSocketChatTransportAbortRequest, type WebSocketChatTransportInitOptions, type WebSocketChatTransportRequest, type WebSocketChatTransportResponse, type WebSocketChatTransportResumeRequest, type WebSocketChatTransportSendRequest, 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 };
10976
+ 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 Citation, 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 PrepareWebSocketChatTransportReconnectToStreamRequest, type PrepareWebSocketChatTransportSendMessagesRequest, 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 SafeValidateWebSocketChatTransportRequestResult, 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, type WebSocketChatTransportAbortRequest, type WebSocketChatTransportInitOptions, type WebSocketChatTransportRequest, type WebSocketChatTransportResponse, type WebSocketChatTransportResumeRequest, type WebSocketChatTransportSendRequest, 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, streamTextLowMemory as experimental_streamTextLowMemory, 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 };
10944
10977
  //# sourceMappingURL=index.d.ts.map