@ai-sdk/provider 4.0.6 → 4.0.8

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,24 @@
1
1
  # @ai-sdk/provider
2
2
 
3
+ ## 4.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 591d25b: feat: add batch completion webhooks. `experimental_startTextBatch` accepts a `webhookUrl`, and the gateway provider registers it through the batch `callbackUrl` contract and exports typed async-job metadata. Direct Anthropic and OpenAI batch providers return an unsupported warning when the option is provided.
8
+
9
+ ## 4.0.7
10
+
11
+ ### Patch Changes
12
+
13
+ - ad6a650: feat(video): allow `aspectRatio: 'adaptive'` on `generateVideo`
14
+
15
+ Some video models derive the output ratio from the input and reject explicit
16
+ `{width}:{height}` values — BytePlus Seedance 2.5 does this for first-frame,
17
+ first-and-last-frame, editing, and extension tasks. `aspectRatio` on
18
+ `VideoModelV3CallOptions`, `VideoModelV4CallOptions`, and
19
+ `experimental_generateVideo` is now `` `${number}:${number}` | 'adaptive' ``, so
20
+ those calls no longer need a type assertion. Support is provider-specific.
21
+
3
22
  ## 4.0.6
4
23
 
5
24
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -365,6 +365,12 @@ type BatchV4StartOptions<REQUEST> = {
365
365
  readonly providerOptions?: SharedV4ProviderOptions;
366
366
  readonly abortSignal?: AbortSignal;
367
367
  readonly headers?: Record<string, string | undefined>;
368
+ /**
369
+ * URL the provider notifies when the batch reaches a terminal state.
370
+ * Providers that do not support completion webhooks should return an
371
+ * unsupported warning.
372
+ */
373
+ readonly webhookUrl?: string;
368
374
  };
369
375
  /**
370
376
  * Result of starting a batch.
@@ -7299,11 +7305,12 @@ type VideoModelV4CallOptions = {
7299
7305
  n: number;
7300
7306
  /**
7301
7307
  * Aspect ratio of the videos to generate.
7302
- * Must have the format `{width}:{height}`.
7308
+ * Must have the format `{width}:{height}`, or `'adaptive'` to inherit the
7309
+ * ratio from the input media.
7303
7310
  * `undefined` will use the provider's default aspect ratio.
7304
7311
  * Common values: '16:9', '9:16', '1:1', '21:9', '4:3'
7305
7312
  */
7306
- aspectRatio: `${number}:${number}` | undefined;
7313
+ aspectRatio: `${number}:${number}` | 'adaptive' | undefined;
7307
7314
  /**
7308
7315
  * Resolution of the video to generate.
7309
7316
  * Format: `{width}x{height}` (e.g., '1280x720', '1920x1080')
@@ -7750,11 +7757,12 @@ type VideoModelV3CallOptions = {
7750
7757
  n: number;
7751
7758
  /**
7752
7759
  * Aspect ratio of the videos to generate.
7753
- * Must have the format `{width}:{height}`.
7760
+ * Must have the format `{width}:{height}`, or `'adaptive'` to inherit the
7761
+ * ratio from the input media.
7754
7762
  * `undefined` will use the provider's default aspect ratio.
7755
7763
  * Common values: '16:9', '9:16', '1:1', '21:9', '4:3'
7756
7764
  */
7757
- aspectRatio: `${number}:${number}` | undefined;
7765
+ aspectRatio: `${number}:${number}` | 'adaptive' | undefined;
7758
7766
  /**
7759
7767
  * Resolution of the video to generate.
7760
7768
  * Format: `{width}x{height}` (e.g., '1280x720', '1920x1080')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider",
3
- "version": "4.0.6",
3
+ "version": "4.0.8",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -31,9 +31,9 @@
31
31
  "devDependencies": {
32
32
  "@types/json-schema": "7.0.15",
33
33
  "@types/node": "22.19.19",
34
+ "@vercel/ai-tsconfig": "0.0.0",
34
35
  "tsup": "^8.5.1",
35
- "typescript": "5.8.3",
36
- "@vercel/ai-tsconfig": "0.0.0"
36
+ "typescript": "5.8.3"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=22"
@@ -40,6 +40,13 @@ export type BatchV4StartOptions<REQUEST> = {
40
40
  readonly providerOptions?: SharedV4ProviderOptions;
41
41
  readonly abortSignal?: AbortSignal;
42
42
  readonly headers?: Record<string, string | undefined>;
43
+
44
+ /**
45
+ * URL the provider notifies when the batch reaches a terminal state.
46
+ * Providers that do not support completion webhooks should return an
47
+ * unsupported warning.
48
+ */
49
+ readonly webhookUrl?: string;
43
50
  };
44
51
 
45
52
  /**
@@ -16,11 +16,12 @@ export type VideoModelV3CallOptions = {
16
16
 
17
17
  /**
18
18
  * Aspect ratio of the videos to generate.
19
- * Must have the format `{width}:{height}`.
19
+ * Must have the format `{width}:{height}`, or `'adaptive'` to inherit the
20
+ * ratio from the input media.
20
21
  * `undefined` will use the provider's default aspect ratio.
21
22
  * Common values: '16:9', '9:16', '1:1', '21:9', '4:3'
22
23
  */
23
- aspectRatio: `${number}:${number}` | undefined;
24
+ aspectRatio: `${number}:${number}` | 'adaptive' | undefined;
24
25
 
25
26
  /**
26
27
  * Resolution of the video to generate.
@@ -16,11 +16,12 @@ export type VideoModelV4CallOptions = {
16
16
 
17
17
  /**
18
18
  * Aspect ratio of the videos to generate.
19
- * Must have the format `{width}:{height}`.
19
+ * Must have the format `{width}:{height}`, or `'adaptive'` to inherit the
20
+ * ratio from the input media.
20
21
  * `undefined` will use the provider's default aspect ratio.
21
22
  * Common values: '16:9', '9:16', '1:1', '21:9', '4:3'
22
23
  */
23
- aspectRatio: `${number}:${number}` | undefined;
24
+ aspectRatio: `${number}:${number}` | 'adaptive' | undefined;
24
25
 
25
26
  /**
26
27
  * Resolution of the video to generate.