@ai-sdk/gateway 4.0.76 → 4.0.78

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.
@@ -213,13 +213,17 @@ started, AI SDK Core exposes it as a
213
213
  Use its `type`, `code`, `statusCode`, and `isRetryable` metadata to classify
214
214
  the failure without inspecting the Gateway's serialized error payload.
215
215
 
216
- ## Text Batches
216
+ ## Batch
217
217
 
218
218
  <Note type="warning">
219
- Text batch support is experimental and the API may change in patch releases.
219
+ Batch support is experimental and the API may change in patch releases.
220
220
  </Note>
221
221
 
222
- AI Gateway supports durable text batches through `experimental_startBatch`, `experimental_getBatchStatus`, and `experimental_getBatchResults`. See the [AI Gateway batch processing guide](https://vercel.com/docs/ai-gateway/models-and-providers/batch-processing) for supported models, limits, and the complete lifecycle.
222
+ AI Gateway supports durable text batches through `experimental_startBatch`,
223
+ `experimental_getBatchStatus`, and `experimental_getBatchResults`. See
224
+ [Batch](/docs/ai-sdk-core/batch) for the provider-agnostic workflow,
225
+ and the [AI Gateway batch processing guide](https://vercel.com/docs/ai-gateway/models-and-providers/batch-processing)
226
+ for supported models, limits, and Gateway-specific behavior.
223
227
 
224
228
  Pass a publicly reachable HTTPS `webhookUrl` when starting a batch to receive a terminal notification instead of polling. AI Gateway sends `batch.completed`, `batch.failed`, or `batch.cancelled`. The event contains terminal status information but not batch results. Completion webhooks are an AI Gateway capability; direct Anthropic and OpenAI batch providers return an unsupported warning when this option is provided.
225
229
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ai-sdk/gateway",
3
3
  "private": false,
4
- "version": "4.0.76",
4
+ "version": "4.0.78",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "sideEffects": false,
@@ -30,8 +30,8 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@ai-sdk/provider": "4.0.11",
34
- "@ai-sdk/provider-utils": "5.0.37",
33
+ "@ai-sdk/provider": "4.0.13",
34
+ "@ai-sdk/provider-utils": "5.0.39",
35
35
  "@vercel/oidc": "3.2.0"
36
36
  },
37
37
  "devDependencies": {
@@ -18,6 +18,8 @@ export type GatewayImageModelId =
18
18
  | 'openai/gpt-image-1-mini'
19
19
  | 'openai/gpt-image-1.5'
20
20
  | 'openai/gpt-image-2'
21
+ | 'openai/gpt-image-2.5-flare'
22
+ | 'openai/gpt-image-2.5-sunburst'
21
23
  | 'prodia/flux-fast-schnell'
22
24
  | 'quiverai/arrow-1.1'
23
25
  | 'recraft/recraft-v2'
@@ -105,6 +105,9 @@ export class GatewayImageModel implements ImageModelV4 {
105
105
 
106
106
  return {
107
107
  images: responseBody.images, // Always base64 strings from server
108
+ ...(responseBody.isRetryable != null && {
109
+ isRetryable: responseBody.isRetryable,
110
+ }),
108
111
  warnings: responseBody.warnings ?? [],
109
112
  providerMetadata:
110
113
  responseBody.providerMetadata as ImageModelV4ProviderMetadata,
@@ -187,6 +190,7 @@ const gatewayImageUsageSchema = z.object({
187
190
 
188
191
  const gatewayImageResponseSchema = z.object({
189
192
  images: z.array(z.string()), // Always base64 strings over the wire
193
+ isRetryable: z.boolean().optional(),
190
194
  warnings: z.array(gatewayImageWarningSchema).optional(),
191
195
  providerMetadata: z
192
196
  .record(z.string(), providerMetadataEntrySchema)
@@ -85,6 +85,7 @@ export type GatewayModelId =
85
85
  | 'google/gemma-4-26b-a4b-it'
86
86
  | 'google/gemma-4-31b-it'
87
87
  | 'inception/mercury-2'
88
+ | 'inception/mercury-2.5'
88
89
  | 'inception/mercury-coder-small'
89
90
  | 'inclusionai/ling-3.0-flash'
90
91
  | 'inclusionai/ling-3.0-flash-fin'
@@ -231,7 +232,6 @@ export type GatewayModelId =
231
232
  | 'thinkingmachines/inkling-small'
232
233
  | 'xiaomi/mimo-v2.5'
233
234
  | 'xiaomi/mimo-v2.5-pro'
234
- | 'xiaomi/mimo-v2.5-pro-ultraspeed'
235
235
  | 'zai/glm-4.5'
236
236
  | 'zai/glm-4.5-air'
237
237
  | 'zai/glm-4.5v'
@@ -247,6 +247,5 @@ export type GatewayModelId =
247
247
  | 'zai/glm-5.3'
248
248
  | 'zai/glm-5.3-fast'
249
249
  | 'zai/glm-5.3-flash'
250
- | 'zai/glm-5.3-promo-50'
251
250
  | 'zai/glm-5v-turbo'
252
251
  | (string & {});