@ai-sdk/fal 3.0.0-beta.1 → 3.0.0-beta.11
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 +84 -8
- package/README.md +2 -0
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -5
- package/src/fal-image-model.ts +7 -7
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
# @ai-sdk/fal
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [c29a26f]
|
|
8
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
9
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
10
|
+
|
|
11
|
+
## 3.0.0-beta.10
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
16
|
+
|
|
17
|
+
## 3.0.0-beta.9
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [2e17091]
|
|
22
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
23
|
+
|
|
24
|
+
## 3.0.0-beta.8
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [986c6fd]
|
|
29
|
+
- Updated dependencies [493295c]
|
|
30
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
31
|
+
|
|
32
|
+
## 3.0.0-beta.7
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies [1f509d4]
|
|
37
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
38
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
39
|
+
|
|
40
|
+
## 3.0.0-beta.6
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [3887c70]
|
|
45
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
46
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
47
|
+
|
|
48
|
+
## 3.0.0-beta.5
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [776b617]
|
|
53
|
+
- @ai-sdk/provider-utils@5.0.0-beta.5
|
|
54
|
+
- @ai-sdk/provider@4.0.0-beta.3
|
|
55
|
+
|
|
56
|
+
## 3.0.0-beta.4
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [61753c3]
|
|
61
|
+
- @ai-sdk/provider-utils@5.0.0-beta.4
|
|
62
|
+
|
|
63
|
+
## 3.0.0-beta.3
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- Updated dependencies [f7d4f01]
|
|
68
|
+
- @ai-sdk/provider-utils@5.0.0-beta.3
|
|
69
|
+
- @ai-sdk/provider@4.0.0-beta.2
|
|
70
|
+
|
|
71
|
+
## 3.0.0-beta.2
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- Updated dependencies [5c2a5a2]
|
|
76
|
+
- @ai-sdk/provider@4.0.0-beta.1
|
|
77
|
+
- @ai-sdk/provider-utils@5.0.0-beta.2
|
|
78
|
+
|
|
3
79
|
## 3.0.0-beta.1
|
|
4
80
|
|
|
5
81
|
### Patch Changes
|
|
@@ -219,13 +295,13 @@
|
|
|
219
295
|
Before
|
|
220
296
|
|
|
221
297
|
```ts
|
|
222
|
-
model.textEmbeddingModel(
|
|
298
|
+
model.textEmbeddingModel("my-model-id");
|
|
223
299
|
```
|
|
224
300
|
|
|
225
301
|
After
|
|
226
302
|
|
|
227
303
|
```ts
|
|
228
|
-
model.embeddingModel(
|
|
304
|
+
model.embeddingModel("my-model-id");
|
|
229
305
|
```
|
|
230
306
|
|
|
231
307
|
- 95f65c2: chore: use import \* from zod/v4
|
|
@@ -429,13 +505,13 @@
|
|
|
429
505
|
Before
|
|
430
506
|
|
|
431
507
|
```ts
|
|
432
|
-
model.textEmbeddingModel(
|
|
508
|
+
model.textEmbeddingModel("my-model-id");
|
|
433
509
|
```
|
|
434
510
|
|
|
435
511
|
After
|
|
436
512
|
|
|
437
513
|
```ts
|
|
438
|
-
model.embeddingModel(
|
|
514
|
+
model.embeddingModel("my-model-id");
|
|
439
515
|
```
|
|
440
516
|
|
|
441
517
|
- Updated dependencies [8d9e8ad]
|
|
@@ -837,7 +913,7 @@
|
|
|
837
913
|
|
|
838
914
|
```js
|
|
839
915
|
await generateImage({
|
|
840
|
-
model: luma.image(
|
|
916
|
+
model: luma.image("photon-flash-1", {
|
|
841
917
|
maxImagesPerCall: 5,
|
|
842
918
|
pollIntervalMillis: 500,
|
|
843
919
|
}),
|
|
@@ -850,7 +926,7 @@
|
|
|
850
926
|
|
|
851
927
|
```js
|
|
852
928
|
await generateImage({
|
|
853
|
-
model: luma.image(
|
|
929
|
+
model: luma.image("photon-flash-1"),
|
|
854
930
|
prompt,
|
|
855
931
|
n: 10,
|
|
856
932
|
maxImagesPerCall: 5,
|
|
@@ -1092,7 +1168,7 @@
|
|
|
1092
1168
|
|
|
1093
1169
|
```js
|
|
1094
1170
|
await generateImage({
|
|
1095
|
-
model: luma.image(
|
|
1171
|
+
model: luma.image("photon-flash-1", {
|
|
1096
1172
|
maxImagesPerCall: 5,
|
|
1097
1173
|
pollIntervalMillis: 500,
|
|
1098
1174
|
}),
|
|
@@ -1105,7 +1181,7 @@
|
|
|
1105
1181
|
|
|
1106
1182
|
```js
|
|
1107
1183
|
await generateImage({
|
|
1108
|
-
model: luma.image(
|
|
1184
|
+
model: luma.image("photon-flash-1"),
|
|
1109
1185
|
prompt,
|
|
1110
1186
|
n: 10,
|
|
1111
1187
|
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.mts
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
|
*/
|
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
|
*/
|
package/dist/index.js
CHANGED
|
@@ -18,13 +18,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
VERSION: () => VERSION,
|
|
24
24
|
createFal: () => createFal,
|
|
25
25
|
fal: () => fal
|
|
26
26
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
28
|
|
|
29
29
|
// src/fal-provider.ts
|
|
30
30
|
var import_provider3 = require("@ai-sdk/provider");
|
|
@@ -137,7 +137,7 @@ var FalImageModel = class {
|
|
|
137
137
|
constructor(modelId, config) {
|
|
138
138
|
this.modelId = modelId;
|
|
139
139
|
this.config = config;
|
|
140
|
-
this.specificationVersion = "
|
|
140
|
+
this.specificationVersion = "v4";
|
|
141
141
|
this.maxImagesPerCall = 1;
|
|
142
142
|
}
|
|
143
143
|
get provider() {
|
|
@@ -454,7 +454,7 @@ var FalTranscriptionModel = class {
|
|
|
454
454
|
constructor(modelId, config) {
|
|
455
455
|
this.modelId = modelId;
|
|
456
456
|
this.config = config;
|
|
457
|
-
this.specificationVersion = "
|
|
457
|
+
this.specificationVersion = "v4";
|
|
458
458
|
}
|
|
459
459
|
get provider() {
|
|
460
460
|
return this.config.provider;
|
|
@@ -670,7 +670,7 @@ var FalSpeechModel = class {
|
|
|
670
670
|
constructor(modelId, config) {
|
|
671
671
|
this.modelId = modelId;
|
|
672
672
|
this.config = config;
|
|
673
|
-
this.specificationVersion = "
|
|
673
|
+
this.specificationVersion = "v4";
|
|
674
674
|
}
|
|
675
675
|
get provider() {
|
|
676
676
|
return this.config.provider;
|
|
@@ -789,7 +789,7 @@ var FalVideoModel = class {
|
|
|
789
789
|
constructor(modelId, config) {
|
|
790
790
|
this.modelId = modelId;
|
|
791
791
|
this.config = config;
|
|
792
|
-
this.specificationVersion = "
|
|
792
|
+
this.specificationVersion = "v4";
|
|
793
793
|
this.maxVideosPerCall = 1;
|
|
794
794
|
}
|
|
795
795
|
// FAL video models support 1 video at a time
|
|
@@ -1002,7 +1002,7 @@ var falVideoResponseSchema = import_v46.z.object({
|
|
|
1002
1002
|
});
|
|
1003
1003
|
|
|
1004
1004
|
// src/version.ts
|
|
1005
|
-
var VERSION = true ? "3.0.0-beta.
|
|
1005
|
+
var VERSION = true ? "3.0.0-beta.11" : "0.0.0-test";
|
|
1006
1006
|
|
|
1007
1007
|
// src/fal-provider.ts
|
|
1008
1008
|
var defaultBaseURL = "https://fal.run";
|
|
@@ -1080,7 +1080,7 @@ function createFal(options = {}) {
|
|
|
1080
1080
|
});
|
|
1081
1081
|
};
|
|
1082
1082
|
return {
|
|
1083
|
-
specificationVersion: "
|
|
1083
|
+
specificationVersion: "v4",
|
|
1084
1084
|
imageModel: createImageModel,
|
|
1085
1085
|
image: createImageModel,
|
|
1086
1086
|
languageModel: (modelId) => {
|