ai 4.1.17 → 4.1.19

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,19 @@
1
1
  # ai
2
2
 
3
+ ## 4.1.19
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [6b8cc14]
8
+ - @ai-sdk/ui-utils@1.1.9
9
+ - @ai-sdk/react@1.1.9
10
+
11
+ ## 4.1.18
12
+
13
+ ### Patch Changes
14
+
15
+ - 6a1acfe: fix (ai/core): revert '@internal' tag on function definitions due to build impacts
16
+
3
17
  ## 4.1.17
4
18
 
5
19
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -508,6 +508,12 @@ declare function generateImage({ model, prompt, n, size, aspectRatio, seed, prov
508
508
  Only applicable for HTTP-based providers.
509
509
  */
510
510
  headers?: Record<string, string>;
511
+ /**
512
+ * Internal. For test use only. May change without notice.
513
+ */
514
+ _internal?: {
515
+ currentDate?: () => Date;
516
+ };
511
517
  }): Promise<GenerateImageResult>;
512
518
 
513
519
  type CallSettings = {
@@ -1030,6 +1036,13 @@ functionality that can be fully encapsulated in the provider.
1030
1036
  @deprecated Use `providerOptions` instead.
1031
1037
  */
1032
1038
  experimental_providerMetadata?: ProviderMetadata;
1039
+ /**
1040
+ * Internal. For test use only. May change without notice.
1041
+ */
1042
+ _internal?: {
1043
+ generateId?: () => string;
1044
+ currentDate?: () => Date;
1045
+ };
1033
1046
  }): Promise<GenerateObjectResult<Array<ELEMENT>>>;
1034
1047
  /**
1035
1048
  Generate a value from an enum (limited list of string values) using a language model.
@@ -1310,6 +1323,14 @@ functionality that can be fully encapsulated in the provider.
1310
1323
  Callback that is called when the LLM response and the final object validation are finished.
1311
1324
  */
1312
1325
  onFinish?: OnFinishCallback<OBJECT>;
1326
+ /**
1327
+ * Internal. For test use only. May change without notice.
1328
+ */
1329
+ _internal?: {
1330
+ generateId?: () => string;
1331
+ currentDate?: () => Date;
1332
+ now?: () => number;
1333
+ };
1313
1334
  }): StreamObjectResult<DeepPartial<OBJECT>, OBJECT, never>;
1314
1335
  /**
1315
1336
  Generate an array with structured, typed elements for a given prompt and element schema using a language model.
@@ -1977,6 +1998,13 @@ A function that attempts to repair a tool call that failed to parse.
1977
1998
  Callback that is called when each step (LLM call) is finished, including intermediate steps.
1978
1999
  */
1979
2000
  onStepFinish?: (event: StepResult<TOOLS>) => Promise<void> | void;
2001
+ /**
2002
+ * Internal. For test use only. May change without notice.
2003
+ */
2004
+ _internal?: {
2005
+ generateId?: IDGenerator;
2006
+ currentDate?: () => Date;
2007
+ };
1980
2008
  }): Promise<GenerateTextResult<TOOLS, OUTPUT>>;
1981
2009
 
1982
2010
  /**
@@ -2234,6 +2262,12 @@ type TextStreamPart<TOOLS extends ToolSet> = {
2234
2262
  declare function smoothStream<TOOLS extends ToolSet>({ delayInMs, chunking, _internal: { delay }, }?: {
2235
2263
  delayInMs?: number | null;
2236
2264
  chunking?: 'word' | 'line' | RegExp;
2265
+ /**
2266
+ * Internal. For test use only. May change without notice.
2267
+ */
2268
+ _internal?: {
2269
+ delay?: (delayInMs: number | null) => Promise<void>;
2270
+ };
2237
2271
  }): (options: {
2238
2272
  tools: TOOLS;
2239
2273
  }) => TransformStream<TextStreamPart<TOOLS>, TextStreamPart<TOOLS>>;
@@ -2392,6 +2426,14 @@ Details for all steps.
2392
2426
  Callback that is called when each step (LLM call) is finished, including intermediate steps.
2393
2427
  */
2394
2428
  onStepFinish?: (event: StepResult<TOOLS>) => Promise<void> | void;
2429
+ /**
2430
+ Internal. For test use only. May change without notice.
2431
+ */
2432
+ _internal?: {
2433
+ now?: () => number;
2434
+ generateId?: IDGenerator;
2435
+ currentDate?: () => Date;
2436
+ };
2395
2437
  }): StreamTextResult<TOOLS, PARTIAL_OUTPUT>;
2396
2438
 
2397
2439
  /**
@@ -2567,6 +2609,9 @@ declare function simulateReadableStream<T>({ chunks, initialDelayInMs, chunkDela
2567
2609
  chunks: T[];
2568
2610
  initialDelayInMs?: number | null;
2569
2611
  chunkDelayInMs?: number | null;
2612
+ _internal?: {
2613
+ delay?: (ms: number | null) => Promise<void>;
2614
+ };
2570
2615
  }): ReadableStream<T>;
2571
2616
 
2572
2617
  declare const symbol$a: unique symbol;
package/dist/index.d.ts CHANGED
@@ -508,6 +508,12 @@ declare function generateImage({ model, prompt, n, size, aspectRatio, seed, prov
508
508
  Only applicable for HTTP-based providers.
509
509
  */
510
510
  headers?: Record<string, string>;
511
+ /**
512
+ * Internal. For test use only. May change without notice.
513
+ */
514
+ _internal?: {
515
+ currentDate?: () => Date;
516
+ };
511
517
  }): Promise<GenerateImageResult>;
512
518
 
513
519
  type CallSettings = {
@@ -1030,6 +1036,13 @@ functionality that can be fully encapsulated in the provider.
1030
1036
  @deprecated Use `providerOptions` instead.
1031
1037
  */
1032
1038
  experimental_providerMetadata?: ProviderMetadata;
1039
+ /**
1040
+ * Internal. For test use only. May change without notice.
1041
+ */
1042
+ _internal?: {
1043
+ generateId?: () => string;
1044
+ currentDate?: () => Date;
1045
+ };
1033
1046
  }): Promise<GenerateObjectResult<Array<ELEMENT>>>;
1034
1047
  /**
1035
1048
  Generate a value from an enum (limited list of string values) using a language model.
@@ -1310,6 +1323,14 @@ functionality that can be fully encapsulated in the provider.
1310
1323
  Callback that is called when the LLM response and the final object validation are finished.
1311
1324
  */
1312
1325
  onFinish?: OnFinishCallback<OBJECT>;
1326
+ /**
1327
+ * Internal. For test use only. May change without notice.
1328
+ */
1329
+ _internal?: {
1330
+ generateId?: () => string;
1331
+ currentDate?: () => Date;
1332
+ now?: () => number;
1333
+ };
1313
1334
  }): StreamObjectResult<DeepPartial<OBJECT>, OBJECT, never>;
1314
1335
  /**
1315
1336
  Generate an array with structured, typed elements for a given prompt and element schema using a language model.
@@ -1977,6 +1998,13 @@ A function that attempts to repair a tool call that failed to parse.
1977
1998
  Callback that is called when each step (LLM call) is finished, including intermediate steps.
1978
1999
  */
1979
2000
  onStepFinish?: (event: StepResult<TOOLS>) => Promise<void> | void;
2001
+ /**
2002
+ * Internal. For test use only. May change without notice.
2003
+ */
2004
+ _internal?: {
2005
+ generateId?: IDGenerator;
2006
+ currentDate?: () => Date;
2007
+ };
1980
2008
  }): Promise<GenerateTextResult<TOOLS, OUTPUT>>;
1981
2009
 
1982
2010
  /**
@@ -2234,6 +2262,12 @@ type TextStreamPart<TOOLS extends ToolSet> = {
2234
2262
  declare function smoothStream<TOOLS extends ToolSet>({ delayInMs, chunking, _internal: { delay }, }?: {
2235
2263
  delayInMs?: number | null;
2236
2264
  chunking?: 'word' | 'line' | RegExp;
2265
+ /**
2266
+ * Internal. For test use only. May change without notice.
2267
+ */
2268
+ _internal?: {
2269
+ delay?: (delayInMs: number | null) => Promise<void>;
2270
+ };
2237
2271
  }): (options: {
2238
2272
  tools: TOOLS;
2239
2273
  }) => TransformStream<TextStreamPart<TOOLS>, TextStreamPart<TOOLS>>;
@@ -2392,6 +2426,14 @@ Details for all steps.
2392
2426
  Callback that is called when each step (LLM call) is finished, including intermediate steps.
2393
2427
  */
2394
2428
  onStepFinish?: (event: StepResult<TOOLS>) => Promise<void> | void;
2429
+ /**
2430
+ Internal. For test use only. May change without notice.
2431
+ */
2432
+ _internal?: {
2433
+ now?: () => number;
2434
+ generateId?: IDGenerator;
2435
+ currentDate?: () => Date;
2436
+ };
2395
2437
  }): StreamTextResult<TOOLS, PARTIAL_OUTPUT>;
2396
2438
 
2397
2439
  /**
@@ -2567,6 +2609,9 @@ declare function simulateReadableStream<T>({ chunks, initialDelayInMs, chunkDela
2567
2609
  chunks: T[];
2568
2610
  initialDelayInMs?: number | null;
2569
2611
  chunkDelayInMs?: number | null;
2612
+ _internal?: {
2613
+ delay?: (ms: number | null) => Promise<void>;
2614
+ };
2570
2615
  }): ReadableStream<T>;
2571
2616
 
2572
2617
  declare const symbol$a: unique symbol;