@ai-sdk/gateway 4.0.59 → 4.0.60

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@ai-sdk/gateway",
3
3
  "private": false,
4
- "version": "4.0.59",
4
+ "version": "4.0.60",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "sideEffects": false,
@@ -59,6 +59,7 @@ export type GatewayModelId =
59
59
  | 'deepseek/deepseek-v3.2-thinking'
60
60
  | 'deepseek/deepseek-v4-flash'
61
61
  | 'deepseek/deepseek-v4-flash-0731'
62
+ | 'deepseek/deepseek-v4-flash-vision-exp'
62
63
  | 'deepseek/deepseek-v4-pro'
63
64
  | 'deepseek/deepseek-v4-pro-0813'
64
65
  | 'google/gemini-2.5-flash'
@@ -6,6 +6,7 @@ import {
6
6
  type Experimental_VideoModelV4File as VideoModelV4File,
7
7
  type Experimental_VideoModelV4OperationStartResult as VideoModelV4OperationStartResult,
8
8
  type Experimental_VideoModelV4OperationStatusResult as VideoModelV4OperationStatusResult,
9
+ type Experimental_VideoModelV4OperationWebhook as VideoModelV4OperationWebhook,
9
10
  type Experimental_VideoModelV4VideoData as VideoModelV4VideoData,
10
11
  type JSONValue,
11
12
  type SharedV4ProviderMetadata,
@@ -171,15 +172,22 @@ export class GatewayVideoModel implements VideoModelV4 {
171
172
  }
172
173
  }
173
174
 
174
- // `handleWebhookOption` is intentionally NOT implemented. The Gateway's
175
- // async video jobs are polling-first: it does not expose a provider->SDK
176
- // webhook completion channel. If this method were present, `generateVideo`
177
- // would forward a webhook URL and await a notification that never arrives.
178
- // `doStart` still forwards the spec's `webhookUrl` — as the Gateway's
179
- // `callbackUrl` wire field (its completion-webhook contract; unknown body
180
- // keys are stripped server-side). Enabling webhooks later requires adding
181
- // `handleWebhookOption` here plus handling the Gateway's HMAC-signed
182
- // delivery format; the wire field is already the right one.
175
+ // The Gateway notifies the caller's URL on completion (`doStart` maps it to
176
+ // `callbackUrl`), so the factory's URL and `received` pass straight through.
177
+ async handleWebhookOption({
178
+ webhook,
179
+ }: {
180
+ webhook: () => PromiseLike<{
181
+ url: string;
182
+ received: PromiseLike<VideoModelV4OperationWebhook>;
183
+ }>;
184
+ }): Promise<{
185
+ webhookUrl: string;
186
+ received: PromiseLike<VideoModelV4OperationWebhook>;
187
+ }> {
188
+ const { url, received } = await webhook();
189
+ return { webhookUrl: url, received };
190
+ }
183
191
 
184
192
  async doStart(
185
193
  options: VideoModelV4CallOptions & {