ai 4.1.10 → 4.1.12

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,21 @@
1
1
  # ai
2
2
 
3
+ ## 4.1.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 0d2d9bf: fix (ui): single assistant message with multiple tool steps
8
+ - Updated dependencies [0d2d9bf]
9
+ - Updated dependencies [0d2d9bf]
10
+ - @ai-sdk/react@1.1.7
11
+ - @ai-sdk/ui-utils@1.1.7
12
+
13
+ ## 4.1.11
14
+
15
+ ### Patch Changes
16
+
17
+ - 4c58da5: chore (core): move providerOptions to stable
18
+
3
19
  ## 4.1.10
4
20
 
5
21
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -214,11 +214,19 @@ type Provider = {
214
214
  };
215
215
 
216
216
  /**
217
- Additional provider-specific metadata. They are passed through
218
- to the provider from the AI SDK and enable provider-specific
219
- functionality that can be fully encapsulated in the provider.
217
+ Additional provider-specific metadata that is returned from the provider.
218
+
219
+ This is needed to enable provider-specific functionality that can be
220
+ fully encapsulated in the provider.
220
221
  */
221
222
  type ProviderMetadata = LanguageModelV1ProviderMetadata;
223
+ /**
224
+ Additional provider-specific options.
225
+
226
+ They are passed through to the provider from the AI SDK and enable
227
+ provider-specific functionality that can be fully encapsulated in the provider.
228
+ */
229
+ type ProviderOptions = LanguageModelV1ProviderMetadata;
222
230
 
223
231
  /**
224
232
  Represents the number of tokens used in a prompt and completion.
@@ -590,6 +598,10 @@ interface TextPart {
590
598
  Additional provider-specific metadata. They are passed through
591
599
  to the provider from the AI SDK and enable provider-specific
592
600
  functionality that can be fully encapsulated in the provider.
601
+ */
602
+ providerOptions?: ProviderOptions;
603
+ /**
604
+ @deprecated Use `providerOptions` instead.
593
605
  */
594
606
  experimental_providerMetadata?: ProviderMetadata;
595
607
  }
@@ -613,6 +625,10 @@ interface ImagePart {
613
625
  Additional provider-specific metadata. They are passed through
614
626
  to the provider from the AI SDK and enable provider-specific
615
627
  functionality that can be fully encapsulated in the provider.
628
+ */
629
+ providerOptions?: ProviderOptions;
630
+ /**
631
+ @deprecated Use `providerOptions` instead.
616
632
  */
617
633
  experimental_providerMetadata?: ProviderMetadata;
618
634
  }
@@ -636,6 +652,10 @@ interface FilePart {
636
652
  Additional provider-specific metadata. They are passed through
637
653
  to the provider from the AI SDK and enable provider-specific
638
654
  functionality that can be fully encapsulated in the provider.
655
+ */
656
+ providerOptions?: ProviderOptions;
657
+ /**
658
+ @deprecated Use `providerOptions` instead.
639
659
  */
640
660
  experimental_providerMetadata?: ProviderMetadata;
641
661
  }
@@ -660,6 +680,10 @@ interface ToolCallPart {
660
680
  Additional provider-specific metadata. They are passed through
661
681
  to the provider from the AI SDK and enable provider-specific
662
682
  functionality that can be fully encapsulated in the provider.
683
+ */
684
+ providerOptions?: ProviderOptions;
685
+ /**
686
+ @deprecated Use `providerOptions` instead.
663
687
  */
664
688
  experimental_providerMetadata?: ProviderMetadata;
665
689
  }
@@ -692,6 +716,10 @@ interface ToolResultPart {
692
716
  Additional provider-specific metadata. They are passed through
693
717
  to the provider from the AI SDK and enable provider-specific
694
718
  functionality that can be fully encapsulated in the provider.
719
+ */
720
+ providerOptions?: ProviderOptions;
721
+ /**
722
+ @deprecated Use `providerOptions` instead.
695
723
  */
696
724
  experimental_providerMetadata?: ProviderMetadata;
697
725
  }
@@ -710,6 +738,10 @@ type CoreSystemMessage = {
710
738
  Additional provider-specific metadata. They are passed through
711
739
  to the provider from the AI SDK and enable provider-specific
712
740
  functionality that can be fully encapsulated in the provider.
741
+ */
742
+ providerOptions?: ProviderOptions;
743
+ /**
744
+ @deprecated Use `providerOptions` instead.
713
745
  */
714
746
  experimental_providerMetadata?: ProviderMetadata;
715
747
  };
@@ -725,6 +757,10 @@ type CoreUserMessage = {
725
757
  to the provider from the AI SDK and enable provider-specific
726
758
  functionality that can be fully encapsulated in the provider.
727
759
  */
760
+ providerOptions?: ProviderOptions;
761
+ /**
762
+ @deprecated Use `providerOptions` instead.
763
+ */
728
764
  experimental_providerMetadata?: ProviderMetadata;
729
765
  };
730
766
  declare const coreUserMessageSchema: z.ZodType<CoreUserMessage>;
@@ -743,6 +779,10 @@ type CoreAssistantMessage = {
743
779
  to the provider from the AI SDK and enable provider-specific
744
780
  functionality that can be fully encapsulated in the provider.
745
781
  */
782
+ providerOptions?: ProviderOptions;
783
+ /**
784
+ @deprecated Use `providerOptions` instead.
785
+ */
746
786
  experimental_providerMetadata?: ProviderMetadata;
747
787
  };
748
788
  declare const coreAssistantMessageSchema: z.ZodType<CoreAssistantMessage>;
@@ -761,6 +801,10 @@ type CoreToolMessage = {
761
801
  to the provider from the AI SDK and enable provider-specific
762
802
  functionality that can be fully encapsulated in the provider.
763
803
  */
804
+ providerOptions?: ProviderOptions;
805
+ /**
806
+ @deprecated Use `providerOptions` instead.
807
+ */
764
808
  experimental_providerMetadata?: ProviderMetadata;
765
809
  };
766
810
  declare const coreToolMessageSchema: z.ZodType<CoreToolMessage>;
@@ -898,9 +942,13 @@ Optional telemetry configuration (experimental).
898
942
  */
899
943
  experimental_telemetry?: TelemetrySettings;
900
944
  /**
901
- Additional provider-specific metadata. They are passed through
945
+ Additional provider-specific options. They are passed through
902
946
  to the provider from the AI SDK and enable provider-specific
903
947
  functionality that can be fully encapsulated in the provider.
948
+ */
949
+ providerOptions?: ProviderOptions;
950
+ /**
951
+ @deprecated Use `providerOptions` instead.
904
952
  */
905
953
  experimental_providerMetadata?: ProviderMetadata;
906
954
  /**
@@ -960,9 +1008,13 @@ Optional telemetry configuration (experimental).
960
1008
  */
961
1009
  experimental_telemetry?: TelemetrySettings;
962
1010
  /**
963
- Additional provider-specific metadata. They are passed through
1011
+ Additional provider-specific options. They are passed through
964
1012
  to the provider from the AI SDK and enable provider-specific
965
1013
  functionality that can be fully encapsulated in the provider.
1014
+ */
1015
+ providerOptions?: ProviderOptions;
1016
+ /**
1017
+ @deprecated Use `providerOptions` instead.
966
1018
  */
967
1019
  experimental_providerMetadata?: ProviderMetadata;
968
1020
  }): Promise<GenerateObjectResult<Array<ELEMENT>>>;
@@ -1003,9 +1055,13 @@ Optional telemetry configuration (experimental).
1003
1055
  */
1004
1056
  experimental_telemetry?: TelemetrySettings;
1005
1057
  /**
1006
- Additional provider-specific metadata. They are passed through
1058
+ Additional provider-specific options. They are passed through
1007
1059
  to the provider from the AI SDK and enable provider-specific
1008
1060
  functionality that can be fully encapsulated in the provider.
1061
+ */
1062
+ providerOptions?: ProviderOptions;
1063
+ /**
1064
+ @deprecated Use `providerOptions` instead.
1009
1065
  */
1010
1066
  experimental_providerMetadata?: ProviderMetadata;
1011
1067
  /**
@@ -1039,9 +1095,13 @@ Optional telemetry configuration (experimental).
1039
1095
  */
1040
1096
  experimental_telemetry?: TelemetrySettings;
1041
1097
  /**
1042
- Additional provider-specific metadata. They are passed through
1098
+ Additional provider-specific options. They are passed through
1043
1099
  to the provider from the AI SDK and enable provider-specific
1044
1100
  functionality that can be fully encapsulated in the provider.
1101
+ */
1102
+ providerOptions?: ProviderOptions;
1103
+ /**
1104
+ @deprecated Use `providerOptions` instead.
1045
1105
  */
1046
1106
  experimental_providerMetadata?: ProviderMetadata;
1047
1107
  /**
@@ -1165,11 +1225,15 @@ type OnFinishCallback<RESULT> = (event: {
1165
1225
  */
1166
1226
  warnings?: CallWarning[];
1167
1227
  /**
1168
- Additional provider-specific metadata. They are passed through
1169
- from the provider to the AI SDK and enable provider-specific
1170
- results that can be fully encapsulated in the provider.
1228
+ Additional provider-specific options. They are passed through
1229
+ to the provider from the AI SDK and enable provider-specific
1230
+ functionality that can be fully encapsulated in the provider.
1231
+ */
1232
+ providerOptions?: ProviderOptions;
1233
+ /**
1234
+ @deprecated Use `providerOptions` instead.
1171
1235
  */
1172
- experimental_providerMetadata: ProviderMetadata | undefined;
1236
+ experimental_providerMetadata?: ProviderMetadata;
1173
1237
  }) => Promise<void> | void;
1174
1238
  /**
1175
1239
  Generate a structured, typed object for a given prompt and schema using a language model.
@@ -1220,9 +1284,13 @@ Optional telemetry configuration (experimental).
1220
1284
  */
1221
1285
  experimental_telemetry?: TelemetrySettings;
1222
1286
  /**
1223
- Additional provider-specific metadata. They are passed through
1287
+ Additional provider-specific options. They are passed through
1224
1288
  to the provider from the AI SDK and enable provider-specific
1225
1289
  functionality that can be fully encapsulated in the provider.
1290
+ */
1291
+ providerOptions?: ProviderOptions;
1292
+ /**
1293
+ @deprecated Use `providerOptions` instead.
1226
1294
  */
1227
1295
  experimental_providerMetadata?: ProviderMetadata;
1228
1296
  /**
@@ -1279,9 +1347,13 @@ Optional telemetry configuration (experimental).
1279
1347
  */
1280
1348
  experimental_telemetry?: TelemetrySettings;
1281
1349
  /**
1282
- Additional provider-specific metadata. They are passed through
1350
+ Additional provider-specific options. They are passed through
1283
1351
  to the provider from the AI SDK and enable provider-specific
1284
1352
  functionality that can be fully encapsulated in the provider.
1353
+ */
1354
+ providerOptions?: ProviderOptions;
1355
+ /**
1356
+ @deprecated Use `providerOptions` instead.
1285
1357
  */
1286
1358
  experimental_providerMetadata?: ProviderMetadata;
1287
1359
  /**
@@ -1320,9 +1392,13 @@ Optional telemetry configuration (experimental).
1320
1392
  */
1321
1393
  experimental_telemetry?: TelemetrySettings;
1322
1394
  /**
1323
- Additional provider-specific metadata. They are passed through
1395
+ Additional provider-specific options. They are passed through
1324
1396
  to the provider from the AI SDK and enable provider-specific
1325
1397
  functionality that can be fully encapsulated in the provider.
1398
+ */
1399
+ providerOptions?: ProviderOptions;
1400
+ /**
1401
+ @deprecated Use `providerOptions` instead.
1326
1402
  */
1327
1403
  experimental_providerMetadata?: ProviderMetadata;
1328
1404
  /**
@@ -1826,7 +1902,7 @@ If set and supported by the model, calls will generate deterministic results.
1826
1902
  @returns
1827
1903
  A result object that contains the generated text, the results of the tool calls, and additional information.
1828
1904
  */
1829
- declare function generateText<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never>({ model, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, headers, maxSteps, experimental_generateMessageId: generateMessageId, experimental_output: output, experimental_continueSteps: continueSteps, experimental_telemetry: telemetry, experimental_providerMetadata: providerMetadata, experimental_activeTools: activeTools, experimental_repairToolCall: repairToolCall, _internal: { generateId, currentDate, }, onStepFinish, ...settings }: CallSettings & Prompt & {
1905
+ declare function generateText<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never>({ model, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, headers, maxSteps, experimental_generateMessageId: generateMessageId, experimental_output: output, experimental_continueSteps: continueSteps, experimental_telemetry: telemetry, experimental_providerMetadata, providerOptions, experimental_activeTools: activeTools, experimental_repairToolCall: repairToolCall, _internal: { generateId, currentDate, }, onStepFinish, ...settings }: CallSettings & Prompt & {
1830
1906
  /**
1831
1907
  The language model to use.
1832
1908
  */
@@ -1862,10 +1938,14 @@ Optional telemetry configuration (experimental).
1862
1938
  */
1863
1939
  experimental_telemetry?: TelemetrySettings;
1864
1940
  /**
1865
- Additional provider-specific metadata. They are passed through
1941
+ Additional provider-specific options. They are passed through
1866
1942
  to the provider from the AI SDK and enable provider-specific
1867
1943
  functionality that can be fully encapsulated in the provider.
1868
1944
  */
1945
+ providerOptions?: ProviderOptions;
1946
+ /**
1947
+ @deprecated Use `providerOptions` instead.
1948
+ */
1869
1949
  experimental_providerMetadata?: ProviderMetadata;
1870
1950
  /**
1871
1951
  Limits the tools that are available for the model to call without
@@ -2203,7 +2283,7 @@ If set and supported by the model, calls will generate deterministic results.
2203
2283
  @return
2204
2284
  A result object for accessing different stream types and additional information.
2205
2285
  */
2206
- declare function streamText<TOOLS extends ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, maxSteps, experimental_generateMessageId: generateMessageId, experimental_output: output, experimental_continueSteps: continueSteps, experimental_telemetry: telemetry, experimental_providerMetadata: providerMetadata, experimental_toolCallStreaming, toolCallStreaming, experimental_activeTools: activeTools, experimental_repairToolCall: repairToolCall, experimental_transform: transform, onChunk, onFinish, onStepFinish, _internal: { now, generateId, currentDate, }, ...settings }: CallSettings & Prompt & {
2286
+ declare function streamText<TOOLS extends ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, maxSteps, experimental_generateMessageId: generateMessageId, experimental_output: output, experimental_continueSteps: continueSteps, experimental_telemetry: telemetry, experimental_providerMetadata, providerOptions, experimental_toolCallStreaming, toolCallStreaming, experimental_activeTools: activeTools, experimental_repairToolCall: repairToolCall, experimental_transform: transform, onChunk, onFinish, onStepFinish, _internal: { now, generateId, currentDate, }, ...settings }: CallSettings & Prompt & {
2207
2287
  /**
2208
2288
  The language model to use.
2209
2289
  */
@@ -2239,9 +2319,13 @@ Optional telemetry configuration (experimental).
2239
2319
  */
2240
2320
  experimental_telemetry?: TelemetrySettings;
2241
2321
  /**
2242
- Additional provider-specific metadata. They are passed through
2322
+ Additional provider-specific options. They are passed through
2243
2323
  to the provider from the AI SDK and enable provider-specific
2244
2324
  functionality that can be fully encapsulated in the provider.
2325
+ */
2326
+ providerOptions?: ProviderOptions;
2327
+ /**
2328
+ @deprecated Use `providerOptions` instead.
2245
2329
  */
2246
2330
  experimental_providerMetadata?: ProviderMetadata;
2247
2331
  /**
package/dist/index.d.ts CHANGED
@@ -214,11 +214,19 @@ type Provider = {
214
214
  };
215
215
 
216
216
  /**
217
- Additional provider-specific metadata. They are passed through
218
- to the provider from the AI SDK and enable provider-specific
219
- functionality that can be fully encapsulated in the provider.
217
+ Additional provider-specific metadata that is returned from the provider.
218
+
219
+ This is needed to enable provider-specific functionality that can be
220
+ fully encapsulated in the provider.
220
221
  */
221
222
  type ProviderMetadata = LanguageModelV1ProviderMetadata;
223
+ /**
224
+ Additional provider-specific options.
225
+
226
+ They are passed through to the provider from the AI SDK and enable
227
+ provider-specific functionality that can be fully encapsulated in the provider.
228
+ */
229
+ type ProviderOptions = LanguageModelV1ProviderMetadata;
222
230
 
223
231
  /**
224
232
  Represents the number of tokens used in a prompt and completion.
@@ -590,6 +598,10 @@ interface TextPart {
590
598
  Additional provider-specific metadata. They are passed through
591
599
  to the provider from the AI SDK and enable provider-specific
592
600
  functionality that can be fully encapsulated in the provider.
601
+ */
602
+ providerOptions?: ProviderOptions;
603
+ /**
604
+ @deprecated Use `providerOptions` instead.
593
605
  */
594
606
  experimental_providerMetadata?: ProviderMetadata;
595
607
  }
@@ -613,6 +625,10 @@ interface ImagePart {
613
625
  Additional provider-specific metadata. They are passed through
614
626
  to the provider from the AI SDK and enable provider-specific
615
627
  functionality that can be fully encapsulated in the provider.
628
+ */
629
+ providerOptions?: ProviderOptions;
630
+ /**
631
+ @deprecated Use `providerOptions` instead.
616
632
  */
617
633
  experimental_providerMetadata?: ProviderMetadata;
618
634
  }
@@ -636,6 +652,10 @@ interface FilePart {
636
652
  Additional provider-specific metadata. They are passed through
637
653
  to the provider from the AI SDK and enable provider-specific
638
654
  functionality that can be fully encapsulated in the provider.
655
+ */
656
+ providerOptions?: ProviderOptions;
657
+ /**
658
+ @deprecated Use `providerOptions` instead.
639
659
  */
640
660
  experimental_providerMetadata?: ProviderMetadata;
641
661
  }
@@ -660,6 +680,10 @@ interface ToolCallPart {
660
680
  Additional provider-specific metadata. They are passed through
661
681
  to the provider from the AI SDK and enable provider-specific
662
682
  functionality that can be fully encapsulated in the provider.
683
+ */
684
+ providerOptions?: ProviderOptions;
685
+ /**
686
+ @deprecated Use `providerOptions` instead.
663
687
  */
664
688
  experimental_providerMetadata?: ProviderMetadata;
665
689
  }
@@ -692,6 +716,10 @@ interface ToolResultPart {
692
716
  Additional provider-specific metadata. They are passed through
693
717
  to the provider from the AI SDK and enable provider-specific
694
718
  functionality that can be fully encapsulated in the provider.
719
+ */
720
+ providerOptions?: ProviderOptions;
721
+ /**
722
+ @deprecated Use `providerOptions` instead.
695
723
  */
696
724
  experimental_providerMetadata?: ProviderMetadata;
697
725
  }
@@ -710,6 +738,10 @@ type CoreSystemMessage = {
710
738
  Additional provider-specific metadata. They are passed through
711
739
  to the provider from the AI SDK and enable provider-specific
712
740
  functionality that can be fully encapsulated in the provider.
741
+ */
742
+ providerOptions?: ProviderOptions;
743
+ /**
744
+ @deprecated Use `providerOptions` instead.
713
745
  */
714
746
  experimental_providerMetadata?: ProviderMetadata;
715
747
  };
@@ -725,6 +757,10 @@ type CoreUserMessage = {
725
757
  to the provider from the AI SDK and enable provider-specific
726
758
  functionality that can be fully encapsulated in the provider.
727
759
  */
760
+ providerOptions?: ProviderOptions;
761
+ /**
762
+ @deprecated Use `providerOptions` instead.
763
+ */
728
764
  experimental_providerMetadata?: ProviderMetadata;
729
765
  };
730
766
  declare const coreUserMessageSchema: z.ZodType<CoreUserMessage>;
@@ -743,6 +779,10 @@ type CoreAssistantMessage = {
743
779
  to the provider from the AI SDK and enable provider-specific
744
780
  functionality that can be fully encapsulated in the provider.
745
781
  */
782
+ providerOptions?: ProviderOptions;
783
+ /**
784
+ @deprecated Use `providerOptions` instead.
785
+ */
746
786
  experimental_providerMetadata?: ProviderMetadata;
747
787
  };
748
788
  declare const coreAssistantMessageSchema: z.ZodType<CoreAssistantMessage>;
@@ -761,6 +801,10 @@ type CoreToolMessage = {
761
801
  to the provider from the AI SDK and enable provider-specific
762
802
  functionality that can be fully encapsulated in the provider.
763
803
  */
804
+ providerOptions?: ProviderOptions;
805
+ /**
806
+ @deprecated Use `providerOptions` instead.
807
+ */
764
808
  experimental_providerMetadata?: ProviderMetadata;
765
809
  };
766
810
  declare const coreToolMessageSchema: z.ZodType<CoreToolMessage>;
@@ -898,9 +942,13 @@ Optional telemetry configuration (experimental).
898
942
  */
899
943
  experimental_telemetry?: TelemetrySettings;
900
944
  /**
901
- Additional provider-specific metadata. They are passed through
945
+ Additional provider-specific options. They are passed through
902
946
  to the provider from the AI SDK and enable provider-specific
903
947
  functionality that can be fully encapsulated in the provider.
948
+ */
949
+ providerOptions?: ProviderOptions;
950
+ /**
951
+ @deprecated Use `providerOptions` instead.
904
952
  */
905
953
  experimental_providerMetadata?: ProviderMetadata;
906
954
  /**
@@ -960,9 +1008,13 @@ Optional telemetry configuration (experimental).
960
1008
  */
961
1009
  experimental_telemetry?: TelemetrySettings;
962
1010
  /**
963
- Additional provider-specific metadata. They are passed through
1011
+ Additional provider-specific options. They are passed through
964
1012
  to the provider from the AI SDK and enable provider-specific
965
1013
  functionality that can be fully encapsulated in the provider.
1014
+ */
1015
+ providerOptions?: ProviderOptions;
1016
+ /**
1017
+ @deprecated Use `providerOptions` instead.
966
1018
  */
967
1019
  experimental_providerMetadata?: ProviderMetadata;
968
1020
  }): Promise<GenerateObjectResult<Array<ELEMENT>>>;
@@ -1003,9 +1055,13 @@ Optional telemetry configuration (experimental).
1003
1055
  */
1004
1056
  experimental_telemetry?: TelemetrySettings;
1005
1057
  /**
1006
- Additional provider-specific metadata. They are passed through
1058
+ Additional provider-specific options. They are passed through
1007
1059
  to the provider from the AI SDK and enable provider-specific
1008
1060
  functionality that can be fully encapsulated in the provider.
1061
+ */
1062
+ providerOptions?: ProviderOptions;
1063
+ /**
1064
+ @deprecated Use `providerOptions` instead.
1009
1065
  */
1010
1066
  experimental_providerMetadata?: ProviderMetadata;
1011
1067
  /**
@@ -1039,9 +1095,13 @@ Optional telemetry configuration (experimental).
1039
1095
  */
1040
1096
  experimental_telemetry?: TelemetrySettings;
1041
1097
  /**
1042
- Additional provider-specific metadata. They are passed through
1098
+ Additional provider-specific options. They are passed through
1043
1099
  to the provider from the AI SDK and enable provider-specific
1044
1100
  functionality that can be fully encapsulated in the provider.
1101
+ */
1102
+ providerOptions?: ProviderOptions;
1103
+ /**
1104
+ @deprecated Use `providerOptions` instead.
1045
1105
  */
1046
1106
  experimental_providerMetadata?: ProviderMetadata;
1047
1107
  /**
@@ -1165,11 +1225,15 @@ type OnFinishCallback<RESULT> = (event: {
1165
1225
  */
1166
1226
  warnings?: CallWarning[];
1167
1227
  /**
1168
- Additional provider-specific metadata. They are passed through
1169
- from the provider to the AI SDK and enable provider-specific
1170
- results that can be fully encapsulated in the provider.
1228
+ Additional provider-specific options. They are passed through
1229
+ to the provider from the AI SDK and enable provider-specific
1230
+ functionality that can be fully encapsulated in the provider.
1231
+ */
1232
+ providerOptions?: ProviderOptions;
1233
+ /**
1234
+ @deprecated Use `providerOptions` instead.
1171
1235
  */
1172
- experimental_providerMetadata: ProviderMetadata | undefined;
1236
+ experimental_providerMetadata?: ProviderMetadata;
1173
1237
  }) => Promise<void> | void;
1174
1238
  /**
1175
1239
  Generate a structured, typed object for a given prompt and schema using a language model.
@@ -1220,9 +1284,13 @@ Optional telemetry configuration (experimental).
1220
1284
  */
1221
1285
  experimental_telemetry?: TelemetrySettings;
1222
1286
  /**
1223
- Additional provider-specific metadata. They are passed through
1287
+ Additional provider-specific options. They are passed through
1224
1288
  to the provider from the AI SDK and enable provider-specific
1225
1289
  functionality that can be fully encapsulated in the provider.
1290
+ */
1291
+ providerOptions?: ProviderOptions;
1292
+ /**
1293
+ @deprecated Use `providerOptions` instead.
1226
1294
  */
1227
1295
  experimental_providerMetadata?: ProviderMetadata;
1228
1296
  /**
@@ -1279,9 +1347,13 @@ Optional telemetry configuration (experimental).
1279
1347
  */
1280
1348
  experimental_telemetry?: TelemetrySettings;
1281
1349
  /**
1282
- Additional provider-specific metadata. They are passed through
1350
+ Additional provider-specific options. They are passed through
1283
1351
  to the provider from the AI SDK and enable provider-specific
1284
1352
  functionality that can be fully encapsulated in the provider.
1353
+ */
1354
+ providerOptions?: ProviderOptions;
1355
+ /**
1356
+ @deprecated Use `providerOptions` instead.
1285
1357
  */
1286
1358
  experimental_providerMetadata?: ProviderMetadata;
1287
1359
  /**
@@ -1320,9 +1392,13 @@ Optional telemetry configuration (experimental).
1320
1392
  */
1321
1393
  experimental_telemetry?: TelemetrySettings;
1322
1394
  /**
1323
- Additional provider-specific metadata. They are passed through
1395
+ Additional provider-specific options. They are passed through
1324
1396
  to the provider from the AI SDK and enable provider-specific
1325
1397
  functionality that can be fully encapsulated in the provider.
1398
+ */
1399
+ providerOptions?: ProviderOptions;
1400
+ /**
1401
+ @deprecated Use `providerOptions` instead.
1326
1402
  */
1327
1403
  experimental_providerMetadata?: ProviderMetadata;
1328
1404
  /**
@@ -1826,7 +1902,7 @@ If set and supported by the model, calls will generate deterministic results.
1826
1902
  @returns
1827
1903
  A result object that contains the generated text, the results of the tool calls, and additional information.
1828
1904
  */
1829
- declare function generateText<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never>({ model, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, headers, maxSteps, experimental_generateMessageId: generateMessageId, experimental_output: output, experimental_continueSteps: continueSteps, experimental_telemetry: telemetry, experimental_providerMetadata: providerMetadata, experimental_activeTools: activeTools, experimental_repairToolCall: repairToolCall, _internal: { generateId, currentDate, }, onStepFinish, ...settings }: CallSettings & Prompt & {
1905
+ declare function generateText<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never>({ model, tools, toolChoice, system, prompt, messages, maxRetries: maxRetriesArg, abortSignal, headers, maxSteps, experimental_generateMessageId: generateMessageId, experimental_output: output, experimental_continueSteps: continueSteps, experimental_telemetry: telemetry, experimental_providerMetadata, providerOptions, experimental_activeTools: activeTools, experimental_repairToolCall: repairToolCall, _internal: { generateId, currentDate, }, onStepFinish, ...settings }: CallSettings & Prompt & {
1830
1906
  /**
1831
1907
  The language model to use.
1832
1908
  */
@@ -1862,10 +1938,14 @@ Optional telemetry configuration (experimental).
1862
1938
  */
1863
1939
  experimental_telemetry?: TelemetrySettings;
1864
1940
  /**
1865
- Additional provider-specific metadata. They are passed through
1941
+ Additional provider-specific options. They are passed through
1866
1942
  to the provider from the AI SDK and enable provider-specific
1867
1943
  functionality that can be fully encapsulated in the provider.
1868
1944
  */
1945
+ providerOptions?: ProviderOptions;
1946
+ /**
1947
+ @deprecated Use `providerOptions` instead.
1948
+ */
1869
1949
  experimental_providerMetadata?: ProviderMetadata;
1870
1950
  /**
1871
1951
  Limits the tools that are available for the model to call without
@@ -2203,7 +2283,7 @@ If set and supported by the model, calls will generate deterministic results.
2203
2283
  @return
2204
2284
  A result object for accessing different stream types and additional information.
2205
2285
  */
2206
- declare function streamText<TOOLS extends ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, maxSteps, experimental_generateMessageId: generateMessageId, experimental_output: output, experimental_continueSteps: continueSteps, experimental_telemetry: telemetry, experimental_providerMetadata: providerMetadata, experimental_toolCallStreaming, toolCallStreaming, experimental_activeTools: activeTools, experimental_repairToolCall: repairToolCall, experimental_transform: transform, onChunk, onFinish, onStepFinish, _internal: { now, generateId, currentDate, }, ...settings }: CallSettings & Prompt & {
2286
+ declare function streamText<TOOLS extends ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, maxSteps, experimental_generateMessageId: generateMessageId, experimental_output: output, experimental_continueSteps: continueSteps, experimental_telemetry: telemetry, experimental_providerMetadata, providerOptions, experimental_toolCallStreaming, toolCallStreaming, experimental_activeTools: activeTools, experimental_repairToolCall: repairToolCall, experimental_transform: transform, onChunk, onFinish, onStepFinish, _internal: { now, generateId, currentDate, }, ...settings }: CallSettings & Prompt & {
2207
2287
  /**
2208
2288
  The language model to use.
2209
2289
  */
@@ -2239,9 +2319,13 @@ Optional telemetry configuration (experimental).
2239
2319
  */
2240
2320
  experimental_telemetry?: TelemetrySettings;
2241
2321
  /**
2242
- Additional provider-specific metadata. They are passed through
2322
+ Additional provider-specific options. They are passed through
2243
2323
  to the provider from the AI SDK and enable provider-specific
2244
2324
  functionality that can be fully encapsulated in the provider.
2325
+ */
2326
+ providerOptions?: ProviderOptions;
2327
+ /**
2328
+ @deprecated Use `providerOptions` instead.
2245
2329
  */
2246
2330
  experimental_providerMetadata?: ProviderMetadata;
2247
2331
  /**