@ai-sdk/gateway 3.0.112 → 3.0.114

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/dist/index.mjs CHANGED
@@ -20,13 +20,19 @@ var GatewayError = class _GatewayError extends (_b = Error, _a = symbol, _b) {
20
20
  message,
21
21
  statusCode = 500,
22
22
  cause,
23
- generationId
23
+ generationId,
24
+ isRetryable = statusCode != null && (statusCode === 408 || // request timeout
25
+ statusCode === 409 || // conflict
26
+ statusCode === 429 || // too many requests
27
+ statusCode >= 500)
28
+ // server error
24
29
  }) {
25
30
  super(generationId ? `${message} [${generationId}]` : message);
26
31
  this[_a] = true;
27
32
  this.statusCode = statusCode;
28
33
  this.cause = cause;
29
34
  this.generationId = generationId;
35
+ this.isRetryable = isRetryable;
30
36
  }
31
37
  /**
32
38
  * Checks if the given error is a Gateway Error.
@@ -1666,7 +1672,7 @@ async function getVercelRequestId() {
1666
1672
  }
1667
1673
 
1668
1674
  // src/version.ts
1669
- var VERSION = true ? "3.0.112" : "0.0.0-test";
1675
+ var VERSION = true ? "3.0.114" : "0.0.0-test";
1670
1676
 
1671
1677
  // src/gateway-provider.ts
1672
1678
  var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";