@ai-sdk/fal 3.0.0-beta.2 → 3.0.0-beta.21

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,165 @@
1
1
  # @ai-sdk/fal
2
2
 
3
+ ## 3.0.0-beta.21
4
+
5
+ ### Patch Changes
6
+
7
+ - b3976a2: Add workflow serialization support to all provider models.
8
+
9
+ **`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
10
+
11
+ **All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
12
+
13
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
14
+
15
+ - Updated dependencies [b3976a2]
16
+ - Updated dependencies [ff5eba1]
17
+ - @ai-sdk/provider-utils@5.0.0-beta.20
18
+ - @ai-sdk/provider@4.0.0-beta.12
19
+
20
+ ## 3.0.0-beta.20
21
+
22
+ ### Major Changes
23
+
24
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [ef992f8]
29
+ - @ai-sdk/provider@4.0.0-beta.11
30
+ - @ai-sdk/provider-utils@5.0.0-beta.19
31
+
32
+ ## 3.0.0-beta.19
33
+
34
+ ### Patch Changes
35
+
36
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
37
+ - Updated dependencies [90e2d8a]
38
+ - @ai-sdk/provider-utils@5.0.0-beta.18
39
+
40
+ ## 3.0.0-beta.18
41
+
42
+ ### Patch Changes
43
+
44
+ - Updated dependencies [3ae1786]
45
+ - @ai-sdk/provider-utils@5.0.0-beta.17
46
+
47
+ ## 3.0.0-beta.17
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies [176466a]
52
+ - @ai-sdk/provider@4.0.0-beta.10
53
+ - @ai-sdk/provider-utils@5.0.0-beta.16
54
+
55
+ ## 3.0.0-beta.16
56
+
57
+ ### Patch Changes
58
+
59
+ - Updated dependencies [e311194]
60
+ - @ai-sdk/provider@4.0.0-beta.9
61
+ - @ai-sdk/provider-utils@5.0.0-beta.15
62
+
63
+ ## 3.0.0-beta.15
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies [34bd95d]
68
+ - Updated dependencies [008271d]
69
+ - @ai-sdk/provider@4.0.0-beta.8
70
+ - @ai-sdk/provider-utils@5.0.0-beta.14
71
+
72
+ ## 3.0.0-beta.14
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [b0c2869]
77
+ - Updated dependencies [7e26e81]
78
+ - @ai-sdk/provider-utils@5.0.0-beta.13
79
+
80
+ ## 3.0.0-beta.13
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [46d1149]
85
+ - @ai-sdk/provider-utils@5.0.0-beta.12
86
+
87
+ ## 3.0.0-beta.12
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies [6fd51c0]
92
+ - @ai-sdk/provider-utils@5.0.0-beta.11
93
+ - @ai-sdk/provider@4.0.0-beta.7
94
+
95
+ ## 3.0.0-beta.11
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies [c29a26f]
100
+ - @ai-sdk/provider-utils@5.0.0-beta.10
101
+ - @ai-sdk/provider@4.0.0-beta.6
102
+
103
+ ## 3.0.0-beta.10
104
+
105
+ ### Patch Changes
106
+
107
+ - 38fc777: Add AI Gateway hint to provider READMEs
108
+
109
+ ## 3.0.0-beta.9
110
+
111
+ ### Patch Changes
112
+
113
+ - Updated dependencies [2e17091]
114
+ - @ai-sdk/provider-utils@5.0.0-beta.9
115
+
116
+ ## 3.0.0-beta.8
117
+
118
+ ### Patch Changes
119
+
120
+ - Updated dependencies [986c6fd]
121
+ - Updated dependencies [493295c]
122
+ - @ai-sdk/provider-utils@5.0.0-beta.8
123
+
124
+ ## 3.0.0-beta.7
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies [1f509d4]
129
+ - @ai-sdk/provider-utils@5.0.0-beta.7
130
+ - @ai-sdk/provider@4.0.0-beta.5
131
+
132
+ ## 3.0.0-beta.6
133
+
134
+ ### Patch Changes
135
+
136
+ - Updated dependencies [3887c70]
137
+ - @ai-sdk/provider-utils@5.0.0-beta.6
138
+ - @ai-sdk/provider@4.0.0-beta.4
139
+
140
+ ## 3.0.0-beta.5
141
+
142
+ ### Patch Changes
143
+
144
+ - Updated dependencies [776b617]
145
+ - @ai-sdk/provider-utils@5.0.0-beta.5
146
+ - @ai-sdk/provider@4.0.0-beta.3
147
+
148
+ ## 3.0.0-beta.4
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies [61753c3]
153
+ - @ai-sdk/provider-utils@5.0.0-beta.4
154
+
155
+ ## 3.0.0-beta.3
156
+
157
+ ### Patch Changes
158
+
159
+ - Updated dependencies [f7d4f01]
160
+ - @ai-sdk/provider-utils@5.0.0-beta.3
161
+ - @ai-sdk/provider@4.0.0-beta.2
162
+
3
163
  ## 3.0.0-beta.2
4
164
 
5
165
  ### Patch Changes
@@ -227,13 +387,13 @@
227
387
  Before
228
388
 
229
389
  ```ts
230
- model.textEmbeddingModel('my-model-id');
390
+ model.textEmbeddingModel("my-model-id");
231
391
  ```
232
392
 
233
393
  After
234
394
 
235
395
  ```ts
236
- model.embeddingModel('my-model-id');
396
+ model.embeddingModel("my-model-id");
237
397
  ```
238
398
 
239
399
  - 95f65c2: chore: use import \* from zod/v4
@@ -437,13 +597,13 @@
437
597
  Before
438
598
 
439
599
  ```ts
440
- model.textEmbeddingModel('my-model-id');
600
+ model.textEmbeddingModel("my-model-id");
441
601
  ```
442
602
 
443
603
  After
444
604
 
445
605
  ```ts
446
- model.embeddingModel('my-model-id');
606
+ model.embeddingModel("my-model-id");
447
607
  ```
448
608
 
449
609
  - Updated dependencies [8d9e8ad]
@@ -845,7 +1005,7 @@
845
1005
 
846
1006
  ```js
847
1007
  await generateImage({
848
- model: luma.image('photon-flash-1', {
1008
+ model: luma.image("photon-flash-1", {
849
1009
  maxImagesPerCall: 5,
850
1010
  pollIntervalMillis: 500,
851
1011
  }),
@@ -858,7 +1018,7 @@
858
1018
 
859
1019
  ```js
860
1020
  await generateImage({
861
- model: luma.image('photon-flash-1'),
1021
+ model: luma.image("photon-flash-1"),
862
1022
  prompt,
863
1023
  n: 10,
864
1024
  maxImagesPerCall: 5,
@@ -1100,7 +1260,7 @@
1100
1260
 
1101
1261
  ```js
1102
1262
  await generateImage({
1103
- model: luma.image('photon-flash-1', {
1263
+ model: luma.image("photon-flash-1", {
1104
1264
  maxImagesPerCall: 5,
1105
1265
  pollIntervalMillis: 500,
1106
1266
  }),
@@ -1113,7 +1273,7 @@
1113
1273
 
1114
1274
  ```js
1115
1275
  await generateImage({
1116
- model: luma.image('photon-flash-1'),
1276
+ model: luma.image("photon-flash-1"),
1117
1277
  prompt,
1118
1278
  n: 10,
1119
1279
  maxImagesPerCall: 5,
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  The **[fal provider](https://ai-sdk.dev/providers/ai-sdk-providers/fal)** for the [AI SDK](https://ai-sdk.dev/docs) contains image model support for the [fal.ai API](https://fal.ai/).
4
4
 
5
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access fal (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).
6
+
5
7
  ## Setup
6
8
 
7
9
  The fal provider is available in the `@ai-sdk/fal` module. You can install it with
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ProviderV3, ImageModelV3, TranscriptionModelV3, Experimental_VideoModelV3, SpeechModelV3 } from '@ai-sdk/provider';
1
+ import { ProviderV4, ImageModelV4, TranscriptionModelV4, Experimental_VideoModelV4, SpeechModelV4 } from '@ai-sdk/provider';
2
2
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
3
3
  import { FetchFunction, InferSchema } from '@ai-sdk/provider-utils';
4
4
  import { z } from 'zod/v4';
@@ -32,31 +32,31 @@ interface FalProviderSettings {
32
32
  */
33
33
  fetch?: FetchFunction;
34
34
  }
35
- interface FalProvider extends ProviderV3 {
35
+ interface FalProvider extends ProviderV4 {
36
36
  /**
37
37
  * Creates a model for image generation.
38
38
  */
39
- image(modelId: FalImageModelId): ImageModelV3;
39
+ image(modelId: FalImageModelId): ImageModelV4;
40
40
  /**
41
41
  * Creates a model for image generation.
42
42
  */
43
- imageModel(modelId: FalImageModelId): ImageModelV3;
43
+ imageModel(modelId: FalImageModelId): ImageModelV4;
44
44
  /**
45
45
  * Creates a model for transcription.
46
46
  */
47
- transcription(modelId: FalTranscriptionModelId): TranscriptionModelV3;
47
+ transcription(modelId: FalTranscriptionModelId): TranscriptionModelV4;
48
48
  /**
49
49
  * Creates a model for video generation.
50
50
  */
51
- video(modelId: FalVideoModelId): Experimental_VideoModelV3;
51
+ video(modelId: FalVideoModelId): Experimental_VideoModelV4;
52
52
  /**
53
53
  * Creates a model for video generation.
54
54
  */
55
- videoModel(modelId: FalVideoModelId): Experimental_VideoModelV3;
55
+ videoModel(modelId: FalVideoModelId): Experimental_VideoModelV4;
56
56
  /**
57
57
  * Creates a model for speech generation.
58
58
  */
59
- speech(modelId: FalSpeechModelId): SpeechModelV3;
59
+ speech(modelId: FalSpeechModelId): SpeechModelV4;
60
60
  /**
61
61
  * @deprecated Use `embeddingModel` instead.
62
62
  */