ai 3.2.10 → 3.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "3.2.10",
3
+ "version": "3.2.12",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -57,13 +57,13 @@
57
57
  }
58
58
  },
59
59
  "dependencies": {
60
- "@ai-sdk/provider": "0.0.10",
61
- "@ai-sdk/provider-utils": "0.0.16",
62
- "@ai-sdk/react": "0.0.10",
63
- "@ai-sdk/solid": "0.0.7",
64
- "@ai-sdk/svelte": "0.0.8",
65
- "@ai-sdk/ui-utils": "0.0.6",
66
- "@ai-sdk/vue": "0.0.8",
60
+ "@ai-sdk/provider": "0.0.11",
61
+ "@ai-sdk/provider-utils": "1.0.0",
62
+ "@ai-sdk/react": "0.0.12",
63
+ "@ai-sdk/solid": "0.0.9",
64
+ "@ai-sdk/svelte": "0.0.10",
65
+ "@ai-sdk/ui-utils": "0.0.7",
66
+ "@ai-sdk/vue": "0.0.9",
67
67
  "eventsource-parser": "1.1.2",
68
68
  "jsondiffpatch": "0.6.0",
69
69
  "json-schema": "0.4.0",
@@ -279,6 +279,11 @@ type CallSettings = {
279
279
  Abort signal.
280
280
  */
281
281
  abortSignal?: AbortSignal;
282
+ /**
283
+ Additional HTTP headers to be sent with the request.
284
+ Only applicable for HTTP-based providers.
285
+ */
286
+ headers?: Record<string, string | undefined>;
282
287
  };
283
288
 
284
289
  /**
@@ -508,7 +513,7 @@ type RenderResult = {
508
513
  */
509
514
  declare function streamUI<TOOLS extends {
510
515
  [name: string]: z.ZodTypeAny;
511
- } = {}>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, initial, text, onFinish, ...settings }: CallSettings & Prompt & {
516
+ } = {}>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, initial, text, onFinish, ...settings }: CallSettings & Prompt & {
512
517
  /**
513
518
  * The language model to use.
514
519
  */
@@ -277,6 +277,11 @@ type CallSettings = {
277
277
  Abort signal.
278
278
  */
279
279
  abortSignal?: AbortSignal;
280
+ /**
281
+ Additional HTTP headers to be sent with the request.
282
+ Only applicable for HTTP-based providers.
283
+ */
284
+ headers?: Record<string, string | undefined>;
280
285
  };
281
286
 
282
287
  /**
@@ -506,7 +511,7 @@ type RenderResult = {
506
511
  */
507
512
  declare function streamUI<TOOLS extends {
508
513
  [name: string]: z.ZodTypeAny;
509
- } = {}>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, initial, text, onFinish, ...settings }: CallSettings & Prompt & {
514
+ } = {}>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, initial, text, onFinish, ...settings }: CallSettings & Prompt & {
510
515
  /**
511
516
  * The language model to use.
512
517
  */
@@ -1463,6 +1463,7 @@ async function streamUI({
1463
1463
  messages,
1464
1464
  maxRetries,
1465
1465
  abortSignal,
1466
+ headers,
1466
1467
  initial,
1467
1468
  text,
1468
1469
  onFinish,
@@ -1559,7 +1560,8 @@ async function streamUI({
1559
1560
  ...prepareCallSettings(settings),
1560
1561
  inputFormat: validatedPrompt.type,
1561
1562
  prompt: convertToLanguageModelPrompt(validatedPrompt),
1562
- abortSignal
1563
+ abortSignal,
1564
+ headers
1563
1565
  })
1564
1566
  );
1565
1567
  const [stream, forkedStream] = result.stream.tee();