@ai-sdk/fal 3.0.0-beta.2 → 3.0.0-beta.20
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 +151 -8
- package/README.md +2 -0
- package/dist/index.d.ts +8 -8
- package/dist/index.js +240 -221
- package/dist/index.js.map +1 -1
- package/package.json +7 -9
- package/src/fal-image-model.ts +8 -8
- package/src/fal-provider.ts +13 -13
- package/src/fal-speech-model.ts +7 -7
- package/src/fal-transcription-model.ts +8 -8
- package/src/fal-video-model.ts +7 -7
- package/dist/index.d.mts +0 -156
- package/dist/index.mjs +0 -1126
- package/dist/index.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,148 @@
|
|
|
1
1
|
# @ai-sdk/fal
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.20
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [ef992f8]
|
|
12
|
+
- @ai-sdk/provider@4.0.0-beta.11
|
|
13
|
+
- @ai-sdk/provider-utils@5.0.0-beta.19
|
|
14
|
+
|
|
15
|
+
## 3.0.0-beta.19
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
|
|
20
|
+
- Updated dependencies [90e2d8a]
|
|
21
|
+
- @ai-sdk/provider-utils@5.0.0-beta.18
|
|
22
|
+
|
|
23
|
+
## 3.0.0-beta.18
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [3ae1786]
|
|
28
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
29
|
+
|
|
30
|
+
## 3.0.0-beta.17
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies [176466a]
|
|
35
|
+
- @ai-sdk/provider@4.0.0-beta.10
|
|
36
|
+
- @ai-sdk/provider-utils@5.0.0-beta.16
|
|
37
|
+
|
|
38
|
+
## 3.0.0-beta.16
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [e311194]
|
|
43
|
+
- @ai-sdk/provider@4.0.0-beta.9
|
|
44
|
+
- @ai-sdk/provider-utils@5.0.0-beta.15
|
|
45
|
+
|
|
46
|
+
## 3.0.0-beta.15
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [34bd95d]
|
|
51
|
+
- Updated dependencies [008271d]
|
|
52
|
+
- @ai-sdk/provider@4.0.0-beta.8
|
|
53
|
+
- @ai-sdk/provider-utils@5.0.0-beta.14
|
|
54
|
+
|
|
55
|
+
## 3.0.0-beta.14
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- Updated dependencies [b0c2869]
|
|
60
|
+
- Updated dependencies [7e26e81]
|
|
61
|
+
- @ai-sdk/provider-utils@5.0.0-beta.13
|
|
62
|
+
|
|
63
|
+
## 3.0.0-beta.13
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- Updated dependencies [46d1149]
|
|
68
|
+
- @ai-sdk/provider-utils@5.0.0-beta.12
|
|
69
|
+
|
|
70
|
+
## 3.0.0-beta.12
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [6fd51c0]
|
|
75
|
+
- @ai-sdk/provider-utils@5.0.0-beta.11
|
|
76
|
+
- @ai-sdk/provider@4.0.0-beta.7
|
|
77
|
+
|
|
78
|
+
## 3.0.0-beta.11
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- Updated dependencies [c29a26f]
|
|
83
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
84
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
85
|
+
|
|
86
|
+
## 3.0.0-beta.10
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
91
|
+
|
|
92
|
+
## 3.0.0-beta.9
|
|
93
|
+
|
|
94
|
+
### Patch Changes
|
|
95
|
+
|
|
96
|
+
- Updated dependencies [2e17091]
|
|
97
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
98
|
+
|
|
99
|
+
## 3.0.0-beta.8
|
|
100
|
+
|
|
101
|
+
### Patch Changes
|
|
102
|
+
|
|
103
|
+
- Updated dependencies [986c6fd]
|
|
104
|
+
- Updated dependencies [493295c]
|
|
105
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
106
|
+
|
|
107
|
+
## 3.0.0-beta.7
|
|
108
|
+
|
|
109
|
+
### Patch Changes
|
|
110
|
+
|
|
111
|
+
- Updated dependencies [1f509d4]
|
|
112
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
113
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
114
|
+
|
|
115
|
+
## 3.0.0-beta.6
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- Updated dependencies [3887c70]
|
|
120
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
121
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
122
|
+
|
|
123
|
+
## 3.0.0-beta.5
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- Updated dependencies [776b617]
|
|
128
|
+
- @ai-sdk/provider-utils@5.0.0-beta.5
|
|
129
|
+
- @ai-sdk/provider@4.0.0-beta.3
|
|
130
|
+
|
|
131
|
+
## 3.0.0-beta.4
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- Updated dependencies [61753c3]
|
|
136
|
+
- @ai-sdk/provider-utils@5.0.0-beta.4
|
|
137
|
+
|
|
138
|
+
## 3.0.0-beta.3
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- Updated dependencies [f7d4f01]
|
|
143
|
+
- @ai-sdk/provider-utils@5.0.0-beta.3
|
|
144
|
+
- @ai-sdk/provider@4.0.0-beta.2
|
|
145
|
+
|
|
3
146
|
## 3.0.0-beta.2
|
|
4
147
|
|
|
5
148
|
### Patch Changes
|
|
@@ -227,13 +370,13 @@
|
|
|
227
370
|
Before
|
|
228
371
|
|
|
229
372
|
```ts
|
|
230
|
-
model.textEmbeddingModel(
|
|
373
|
+
model.textEmbeddingModel("my-model-id");
|
|
231
374
|
```
|
|
232
375
|
|
|
233
376
|
After
|
|
234
377
|
|
|
235
378
|
```ts
|
|
236
|
-
model.embeddingModel(
|
|
379
|
+
model.embeddingModel("my-model-id");
|
|
237
380
|
```
|
|
238
381
|
|
|
239
382
|
- 95f65c2: chore: use import \* from zod/v4
|
|
@@ -437,13 +580,13 @@
|
|
|
437
580
|
Before
|
|
438
581
|
|
|
439
582
|
```ts
|
|
440
|
-
model.textEmbeddingModel(
|
|
583
|
+
model.textEmbeddingModel("my-model-id");
|
|
441
584
|
```
|
|
442
585
|
|
|
443
586
|
After
|
|
444
587
|
|
|
445
588
|
```ts
|
|
446
|
-
model.embeddingModel(
|
|
589
|
+
model.embeddingModel("my-model-id");
|
|
447
590
|
```
|
|
448
591
|
|
|
449
592
|
- Updated dependencies [8d9e8ad]
|
|
@@ -845,7 +988,7 @@
|
|
|
845
988
|
|
|
846
989
|
```js
|
|
847
990
|
await generateImage({
|
|
848
|
-
model: luma.image(
|
|
991
|
+
model: luma.image("photon-flash-1", {
|
|
849
992
|
maxImagesPerCall: 5,
|
|
850
993
|
pollIntervalMillis: 500,
|
|
851
994
|
}),
|
|
@@ -858,7 +1001,7 @@
|
|
|
858
1001
|
|
|
859
1002
|
```js
|
|
860
1003
|
await generateImage({
|
|
861
|
-
model: luma.image(
|
|
1004
|
+
model: luma.image("photon-flash-1"),
|
|
862
1005
|
prompt,
|
|
863
1006
|
n: 10,
|
|
864
1007
|
maxImagesPerCall: 5,
|
|
@@ -1100,7 +1243,7 @@
|
|
|
1100
1243
|
|
|
1101
1244
|
```js
|
|
1102
1245
|
await generateImage({
|
|
1103
|
-
model: luma.image(
|
|
1246
|
+
model: luma.image("photon-flash-1", {
|
|
1104
1247
|
maxImagesPerCall: 5,
|
|
1105
1248
|
pollIntervalMillis: 500,
|
|
1106
1249
|
}),
|
|
@@ -1113,7 +1256,7 @@
|
|
|
1113
1256
|
|
|
1114
1257
|
```js
|
|
1115
1258
|
await generateImage({
|
|
1116
|
-
model: luma.image(
|
|
1259
|
+
model: luma.image("photon-flash-1"),
|
|
1117
1260
|
prompt,
|
|
1118
1261
|
n: 10,
|
|
1119
1262
|
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 {
|
|
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
|
|
35
|
+
interface FalProvider extends ProviderV4 {
|
|
36
36
|
/**
|
|
37
37
|
* Creates a model for image generation.
|
|
38
38
|
*/
|
|
39
|
-
image(modelId: FalImageModelId):
|
|
39
|
+
image(modelId: FalImageModelId): ImageModelV4;
|
|
40
40
|
/**
|
|
41
41
|
* Creates a model for image generation.
|
|
42
42
|
*/
|
|
43
|
-
imageModel(modelId: FalImageModelId):
|
|
43
|
+
imageModel(modelId: FalImageModelId): ImageModelV4;
|
|
44
44
|
/**
|
|
45
45
|
* Creates a model for transcription.
|
|
46
46
|
*/
|
|
47
|
-
transcription(modelId: FalTranscriptionModelId):
|
|
47
|
+
transcription(modelId: FalTranscriptionModelId): TranscriptionModelV4;
|
|
48
48
|
/**
|
|
49
49
|
* Creates a model for video generation.
|
|
50
50
|
*/
|
|
51
|
-
video(modelId: FalVideoModelId):
|
|
51
|
+
video(modelId: FalVideoModelId): Experimental_VideoModelV4;
|
|
52
52
|
/**
|
|
53
53
|
* Creates a model for video generation.
|
|
54
54
|
*/
|
|
55
|
-
videoModel(modelId: FalVideoModelId):
|
|
55
|
+
videoModel(modelId: FalVideoModelId): Experimental_VideoModelV4;
|
|
56
56
|
/**
|
|
57
57
|
* Creates a model for speech generation.
|
|
58
58
|
*/
|
|
59
|
-
speech(modelId: FalSpeechModelId):
|
|
59
|
+
speech(modelId: FalSpeechModelId): SpeechModelV4;
|
|
60
60
|
/**
|
|
61
61
|
* @deprecated Use `embeddingModel` instead.
|
|
62
62
|
*/
|