@ai-sdk/provider 3.0.14 → 3.0.15

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,18 @@
1
1
  # @ai-sdk/provider
2
2
 
3
+ ## 3.0.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 2171d15: feat(video): allow `aspectRatio: 'adaptive'` on `generateVideo`
8
+
9
+ Some video models derive the output ratio from the input and reject explicit
10
+ `{width}:{height}` values — BytePlus Seedance 2.5 does this for first-frame,
11
+ first-and-last-frame, editing, and extension tasks. `aspectRatio` on
12
+ `VideoModelV3CallOptions`, and
13
+ `experimental_generateVideo` is now `` `${number}:${number}` | 'adaptive' ``, so
14
+ those calls no longer need a type assertion. Support is provider-specific.
15
+
3
16
  ## 3.0.14
4
17
 
5
18
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -3882,11 +3882,12 @@ type VideoModelV3CallOptions = {
3882
3882
  n: number;
3883
3883
  /**
3884
3884
  * Aspect ratio of the videos to generate.
3885
- * Must have the format `{width}:{height}`.
3885
+ * Must have the format `{width}:{height}`, or `'adaptive'` to inherit the
3886
+ * ratio from the input media.
3886
3887
  * `undefined` will use the provider's default aspect ratio.
3887
3888
  * Common values: '16:9', '9:16', '1:1', '21:9', '4:3'
3888
3889
  */
3889
- aspectRatio: `${number}:${number}` | undefined;
3890
+ aspectRatio: `${number}:${number}` | 'adaptive' | undefined;
3890
3891
  /**
3891
3892
  * Resolution of the video to generate.
3892
3893
  * Format: `{width}x{height}` (e.g., '1280x720', '1920x1080')
package/dist/index.d.ts CHANGED
@@ -3882,11 +3882,12 @@ type VideoModelV3CallOptions = {
3882
3882
  n: number;
3883
3883
  /**
3884
3884
  * Aspect ratio of the videos to generate.
3885
- * Must have the format `{width}:{height}`.
3885
+ * Must have the format `{width}:{height}`, or `'adaptive'` to inherit the
3886
+ * ratio from the input media.
3886
3887
  * `undefined` will use the provider's default aspect ratio.
3887
3888
  * Common values: '16:9', '9:16', '1:1', '21:9', '4:3'
3888
3889
  */
3889
- aspectRatio: `${number}:${number}` | undefined;
3890
+ aspectRatio: `${number}:${number}` | 'adaptive' | undefined;
3890
3891
  /**
3891
3892
  * Resolution of the video to generate.
3892
3893
  * 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": "3.0.14",
3
+ "version": "3.0.15",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -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.