@ai-sdk/gateway 3.0.62 → 3.0.63

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,12 @@
1
1
  # @ai-sdk/gateway
2
2
 
3
+ ## 3.0.63
4
+
5
+ ### Patch Changes
6
+
7
+ - 1b01ec1: feat(gateway): add providerTimeouts to provider options
8
+ - 8df8e11: chore(provider/gateway): update gateway model settings files
9
+
3
10
  ## 3.0.62
4
11
 
5
12
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -440,6 +440,9 @@ declare const gatewayLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
440
440
  models?: string[] | undefined;
441
441
  byok?: Record<string, Record<string, unknown>[]> | undefined;
442
442
  zeroDataRetention?: boolean | undefined;
443
+ providerTimeouts?: {
444
+ byok?: Record<string, number> | undefined;
445
+ } | undefined;
443
446
  }>;
444
447
  type GatewayLanguageModelOptions = InferSchema<typeof gatewayLanguageModelOptions>;
445
448
 
package/dist/index.d.ts CHANGED
@@ -440,6 +440,9 @@ declare const gatewayLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
440
440
  models?: string[] | undefined;
441
441
  byok?: Record<string, Record<string, unknown>[]> | undefined;
442
442
  zeroDataRetention?: boolean | undefined;
443
+ providerTimeouts?: {
444
+ byok?: Record<string, number> | undefined;
445
+ } | undefined;
443
446
  }>;
444
447
  type GatewayLanguageModelOptions = InferSchema<typeof gatewayLanguageModelOptions>;
445
448
 
package/dist/index.js CHANGED
@@ -1336,7 +1336,7 @@ async function getVercelRequestId() {
1336
1336
  var import_provider_utils12 = require("@ai-sdk/provider-utils");
1337
1337
 
1338
1338
  // src/version.ts
1339
- var VERSION = true ? "3.0.62" : "0.0.0-test";
1339
+ var VERSION = true ? "3.0.63" : "0.0.0-test";
1340
1340
 
1341
1341
  // src/gateway-provider.ts
1342
1342
  var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
package/dist/index.mjs CHANGED
@@ -1356,7 +1356,7 @@ async function getVercelRequestId() {
1356
1356
  import { withUserAgentSuffix } from "@ai-sdk/provider-utils";
1357
1357
 
1358
1358
  // src/version.ts
1359
- var VERSION = true ? "3.0.62" : "0.0.0-test";
1359
+ var VERSION = true ? "3.0.63" : "0.0.0-test";
1360
1360
 
1361
1361
  // src/gateway-provider.ts
1362
1362
  var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
@@ -631,6 +631,14 @@ The following gateway provider options are available:
631
631
 
632
632
  Restricts routing requests to providers that have zero data retention policies.
633
633
 
634
+ - **providerTimeouts** _object_
635
+
636
+ Per-provider timeouts for BYOK credentials in milliseconds. Controls how long to wait for a provider to start responding before falling back to the next available provider.
637
+
638
+ Example: `providerTimeouts: { byok: { openai: 5000, anthropic: 2000 } }`
639
+
640
+ For full details, see [Provider Timeouts](https://vercel.com/docs/ai-gateway/models-and-providers/provider-timeouts).
641
+
634
642
  You can combine these options to have fine-grained control over routing and tracking:
635
643
 
636
644
  ```ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ai-sdk/gateway",
3
3
  "private": false,
4
- "version": "3.0.62",
4
+ "version": "3.0.63",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -59,6 +59,18 @@ const gatewayLanguageModelOptions = lazySchema(() =>
59
59
  * used.
60
60
  */
61
61
  zeroDataRetention: z.boolean().optional(),
62
+ /**
63
+ * Per-provider timeouts for BYOK credentials in milliseconds.
64
+ * Controls how long to wait for a provider to start responding
65
+ * before falling back to the next available provider.
66
+ *
67
+ * Example: `{ byok: { openai: 5000, anthropic: 2000 } }`
68
+ */
69
+ providerTimeouts: z
70
+ .object({
71
+ byok: z.record(z.string(), z.number().int().min(1000)).optional(),
72
+ })
73
+ .optional(),
62
74
  }),
63
75
  ),
64
76
  );