ai 6.0.15 → 6.0.16

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.
@@ -82,6 +82,14 @@ declare function convertToLanguageModelPrompt({ prompt, supportedUrls, download,
82
82
  download: DownloadFunction | undefined;
83
83
  }): Promise<LanguageModelV3Prompt>;
84
84
 
85
+ /**
86
+ Timeout configuration for API calls. Can be specified as:
87
+ - A number representing milliseconds
88
+ - An object with `totalMs` property for the total timeout in milliseconds
89
+ */
90
+ type TimeoutConfiguration = number | {
91
+ totalMs?: number;
92
+ };
85
93
  type CallSettings = {
86
94
  /**
87
95
  Maximum number of tokens to generate.
@@ -149,8 +157,10 @@ type CallSettings = {
149
157
  /**
150
158
  Timeout in milliseconds. The call will be aborted if it takes longer
151
159
  than the specified timeout. Can be used alongside abortSignal.
160
+
161
+ Can be specified as a number (milliseconds) or as an object with `totalMs`.
152
162
  */
153
- timeout?: number;
163
+ timeout?: TimeoutConfiguration;
154
164
  /**
155
165
  Additional HTTP headers to be sent with the request.
156
166
  Only applicable for HTTP-based providers.
@@ -82,6 +82,14 @@ declare function convertToLanguageModelPrompt({ prompt, supportedUrls, download,
82
82
  download: DownloadFunction | undefined;
83
83
  }): Promise<LanguageModelV3Prompt>;
84
84
 
85
+ /**
86
+ Timeout configuration for API calls. Can be specified as:
87
+ - A number representing milliseconds
88
+ - An object with `totalMs` property for the total timeout in milliseconds
89
+ */
90
+ type TimeoutConfiguration = number | {
91
+ totalMs?: number;
92
+ };
85
93
  type CallSettings = {
86
94
  /**
87
95
  Maximum number of tokens to generate.
@@ -149,8 +157,10 @@ type CallSettings = {
149
157
  /**
150
158
  Timeout in milliseconds. The call will be aborted if it takes longer
151
159
  than the specified timeout. Can be used alongside abortSignal.
160
+
161
+ Can be specified as a number (milliseconds) or as an object with `totalMs`.
152
162
  */
153
- timeout?: number;
163
+ timeout?: TimeoutConfiguration;
154
164
  /**
155
165
  Additional HTTP headers to be sent with the request.
156
166
  Only applicable for HTTP-based providers.
@@ -153,7 +153,7 @@ var import_provider_utils2 = require("@ai-sdk/provider-utils");
153
153
  var import_provider_utils3 = require("@ai-sdk/provider-utils");
154
154
 
155
155
  // src/version.ts
156
- var VERSION = true ? "6.0.15" : "0.0.0-test";
156
+ var VERSION = true ? "6.0.16" : "0.0.0-test";
157
157
 
158
158
  // src/util/download/download.ts
159
159
  var download = async ({ url }) => {
@@ -128,7 +128,7 @@ import {
128
128
  } from "@ai-sdk/provider-utils";
129
129
 
130
130
  // src/version.ts
131
- var VERSION = true ? "6.0.15" : "0.0.0-test";
131
+ var VERSION = true ? "6.0.16" : "0.0.0-test";
132
132
 
133
133
  // src/util/download/download.ts
134
134
  var download = async ({ url }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "6.0.15",
3
+ "version": "6.0.16",
4
4
  "description": "AI SDK by Vercel - The AI Toolkit for TypeScript and JavaScript",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,