@ai-sdk/black-forest-labs 2.0.0-beta.5 → 2.0.0-beta.52
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 +392 -4
- package/README.md +2 -0
- package/dist/index.js +148 -126
- package/dist/index.js.map +1 -1
- package/package.json +14 -14
- package/src/black-forest-labs-image-model-options.ts +51 -0
- package/src/black-forest-labs-image-model.ts +63 -61
- package/src/black-forest-labs-provider.ts +7 -3
- package/src/index.ts +1 -1
- package/dist/index.d.mts +0 -82
- package/dist/index.mjs +0 -436
- package/dist/index.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,393 @@
|
|
|
1
1
|
# @ai-sdk/black-forest-labs
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.52
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 53f9cbf: fix(bfl): remove duplicate parseProviderOptions call in doGenerate
|
|
8
|
+
|
|
9
|
+
## 2.0.0-beta.51
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- b8396f0: trigger initial beta release
|
|
14
|
+
- Updated dependencies [b8396f0]
|
|
15
|
+
- @ai-sdk/provider-utils@5.0.0-beta.49
|
|
16
|
+
- @ai-sdk/provider@4.0.0-beta.19
|
|
17
|
+
|
|
18
|
+
## 2.0.0-canary.50
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- aeda373: fix: only send provider credentials to same-origin response-supplied URLs
|
|
23
|
+
|
|
24
|
+
Several provider clients followed a URL taken from the provider's API response (a polling/status URL or a final media URL such as `polling_url`, `urls.get`, `result_url`, `result.sample`, or `video.uri`) and reused the authenticated headers — or appended `?key=<API_KEY>` — on that request. Because the host of the response-supplied URL was never validated, the long-lived API key was sent to whatever host the response named (a CDN in the benign case, or an attacker-chosen host if the provider response was tampered with), allowing credential exfiltration.
|
|
25
|
+
|
|
26
|
+
A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and the affected fetches in `@ai-sdk/black-forest-labs`, `@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`, `@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the followed URL is same-origin with the provider's configured API origin. Requests to a foreign origin are made without the credential.
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [aeda373]
|
|
29
|
+
- Updated dependencies [375fdd7]
|
|
30
|
+
- Updated dependencies [b4507d5]
|
|
31
|
+
- @ai-sdk/provider-utils@5.0.0-canary.48
|
|
32
|
+
|
|
33
|
+
## 2.0.0-canary.49
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- Updated dependencies [bae5e2b]
|
|
38
|
+
- @ai-sdk/provider-utils@5.0.0-canary.47
|
|
39
|
+
|
|
40
|
+
## 2.0.0-canary.48
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [ce769dd]
|
|
45
|
+
- @ai-sdk/provider@4.0.0-canary.18
|
|
46
|
+
- @ai-sdk/provider-utils@5.0.0-canary.46
|
|
47
|
+
|
|
48
|
+
## 2.0.0-canary.47
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [ee798eb]
|
|
53
|
+
- Updated dependencies [daf6637]
|
|
54
|
+
- @ai-sdk/provider-utils@5.0.0-canary.45
|
|
55
|
+
|
|
56
|
+
## 2.0.0-canary.46
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [6c93e36]
|
|
61
|
+
- Updated dependencies [f617ac2]
|
|
62
|
+
- @ai-sdk/provider-utils@5.0.0-canary.44
|
|
63
|
+
|
|
64
|
+
## 2.0.0-canary.45
|
|
65
|
+
|
|
66
|
+
### Patch Changes
|
|
67
|
+
|
|
68
|
+
- 23b6aca: fix(bfl): use 'image' field instead of 'input_image' for fill pro model
|
|
69
|
+
|
|
70
|
+
## 2.0.0-canary.44
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
|
|
75
|
+
- Updated dependencies [7fc6bd6]
|
|
76
|
+
- @ai-sdk/provider-utils@5.0.0-canary.43
|
|
77
|
+
- @ai-sdk/provider@4.0.0-canary.17
|
|
78
|
+
|
|
79
|
+
## 2.0.0-canary.43
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- Updated dependencies [a6617c5]
|
|
84
|
+
- @ai-sdk/provider-utils@5.0.0-canary.42
|
|
85
|
+
|
|
86
|
+
## 2.0.0-canary.42
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- Updated dependencies [28dfa06]
|
|
91
|
+
- Updated dependencies [e93fa91]
|
|
92
|
+
- @ai-sdk/provider-utils@5.0.0-canary.41
|
|
93
|
+
|
|
94
|
+
## 2.0.0-canary.41
|
|
95
|
+
|
|
96
|
+
### Patch Changes
|
|
97
|
+
|
|
98
|
+
- Updated dependencies [a7de9c9]
|
|
99
|
+
- @ai-sdk/provider-utils@5.0.0-canary.40
|
|
100
|
+
|
|
101
|
+
## 2.0.0-canary.40
|
|
102
|
+
|
|
103
|
+
### Patch Changes
|
|
104
|
+
|
|
105
|
+
- Updated dependencies [105f95b]
|
|
106
|
+
- @ai-sdk/provider-utils@5.0.0-canary.39
|
|
107
|
+
|
|
108
|
+
## 2.0.0-canary.39
|
|
109
|
+
|
|
110
|
+
### Patch Changes
|
|
111
|
+
|
|
112
|
+
- Updated dependencies [ca446f8]
|
|
113
|
+
- @ai-sdk/provider-utils@5.0.0-canary.38
|
|
114
|
+
|
|
115
|
+
## 2.0.0-canary.38
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- Updated dependencies [d848405]
|
|
120
|
+
- @ai-sdk/provider-utils@5.0.0-canary.37
|
|
121
|
+
|
|
122
|
+
## 2.0.0-canary.37
|
|
123
|
+
|
|
124
|
+
### Patch Changes
|
|
125
|
+
|
|
126
|
+
- Updated dependencies [ca39020]
|
|
127
|
+
- @ai-sdk/provider-utils@5.0.0-canary.36
|
|
128
|
+
|
|
129
|
+
## 2.0.0-canary.36
|
|
130
|
+
|
|
131
|
+
### Patch Changes
|
|
132
|
+
|
|
133
|
+
- Updated dependencies [f634bac]
|
|
134
|
+
- @ai-sdk/provider-utils@5.0.0-canary.35
|
|
135
|
+
|
|
136
|
+
## 2.0.0-canary.35
|
|
137
|
+
|
|
138
|
+
### Patch Changes
|
|
139
|
+
|
|
140
|
+
- Updated dependencies [69254e0]
|
|
141
|
+
- Updated dependencies [3015fc3]
|
|
142
|
+
- @ai-sdk/provider-utils@5.0.0-canary.34
|
|
143
|
+
|
|
144
|
+
## 2.0.0-canary.34
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- Updated dependencies [2427d88]
|
|
149
|
+
- @ai-sdk/provider-utils@5.0.0-canary.33
|
|
150
|
+
|
|
151
|
+
## 2.0.0-canary.33
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- Updated dependencies [5463d0d]
|
|
156
|
+
- @ai-sdk/provider-utils@5.0.0-canary.32
|
|
157
|
+
- @ai-sdk/provider@4.0.0-canary.16
|
|
158
|
+
|
|
159
|
+
## 2.0.0-canary.32
|
|
160
|
+
|
|
161
|
+
### Patch Changes
|
|
162
|
+
|
|
163
|
+
- 0c4c275: trigger initial canary release
|
|
164
|
+
- Updated dependencies [0c4c275]
|
|
165
|
+
- @ai-sdk/provider-utils@5.0.0-canary.31
|
|
166
|
+
- @ai-sdk/provider@4.0.0-canary.15
|
|
167
|
+
|
|
168
|
+
## 2.0.0-beta.31
|
|
169
|
+
|
|
170
|
+
### Major Changes
|
|
171
|
+
|
|
172
|
+
- 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
|
|
173
|
+
|
|
174
|
+
For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
|
|
175
|
+
|
|
176
|
+
### Patch Changes
|
|
177
|
+
|
|
178
|
+
- Updated dependencies [08d2129]
|
|
179
|
+
- @ai-sdk/provider-utils@5.0.0-beta.30
|
|
180
|
+
|
|
181
|
+
## 2.0.0-beta.30
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
|
|
186
|
+
- Updated dependencies [9bd6512]
|
|
187
|
+
- Updated dependencies [258c093]
|
|
188
|
+
- Updated dependencies [b6783da]
|
|
189
|
+
- @ai-sdk/provider-utils@5.0.0-beta.29
|
|
190
|
+
- @ai-sdk/provider@4.0.0-beta.14
|
|
191
|
+
|
|
192
|
+
## 2.0.0-beta.29
|
|
193
|
+
|
|
194
|
+
### Patch Changes
|
|
195
|
+
|
|
196
|
+
- 9f0e36c: trigger release for all packages after provenance setup
|
|
197
|
+
- Updated dependencies [9f0e36c]
|
|
198
|
+
- @ai-sdk/provider@4.0.0-beta.13
|
|
199
|
+
- @ai-sdk/provider-utils@5.0.0-beta.28
|
|
200
|
+
|
|
201
|
+
## 2.0.0-beta.28
|
|
202
|
+
|
|
203
|
+
### Patch Changes
|
|
204
|
+
|
|
205
|
+
- Updated dependencies [785fe16]
|
|
206
|
+
- Updated dependencies [67df0a0]
|
|
207
|
+
- Updated dependencies [befb78c]
|
|
208
|
+
- Updated dependencies [0458559]
|
|
209
|
+
- Updated dependencies [5852c0a]
|
|
210
|
+
- Updated dependencies [fc92055]
|
|
211
|
+
- @ai-sdk/provider-utils@5.0.0-beta.27
|
|
212
|
+
|
|
213
|
+
## 2.0.0-beta.27
|
|
214
|
+
|
|
215
|
+
### Patch Changes
|
|
216
|
+
|
|
217
|
+
- Updated dependencies [2e98477]
|
|
218
|
+
- @ai-sdk/provider-utils@5.0.0-beta.26
|
|
219
|
+
|
|
220
|
+
## 2.0.0-beta.26
|
|
221
|
+
|
|
222
|
+
### Patch Changes
|
|
223
|
+
|
|
224
|
+
- Updated dependencies [eea8d98]
|
|
225
|
+
- @ai-sdk/provider-utils@5.0.0-beta.25
|
|
226
|
+
|
|
227
|
+
## 2.0.0-beta.25
|
|
228
|
+
|
|
229
|
+
### Patch Changes
|
|
230
|
+
|
|
231
|
+
- Updated dependencies [f807e45]
|
|
232
|
+
- @ai-sdk/provider-utils@5.0.0-beta.24
|
|
233
|
+
|
|
234
|
+
## 2.0.0-beta.24
|
|
235
|
+
|
|
236
|
+
### Patch Changes
|
|
237
|
+
|
|
238
|
+
- Updated dependencies [350ea38]
|
|
239
|
+
- @ai-sdk/provider-utils@5.0.0-beta.23
|
|
240
|
+
|
|
241
|
+
## 2.0.0-beta.23
|
|
242
|
+
|
|
243
|
+
### Patch Changes
|
|
244
|
+
|
|
245
|
+
- Updated dependencies [083947b]
|
|
246
|
+
- @ai-sdk/provider-utils@5.0.0-beta.22
|
|
247
|
+
|
|
248
|
+
## 2.0.0-beta.22
|
|
249
|
+
|
|
250
|
+
### Patch Changes
|
|
251
|
+
|
|
252
|
+
- Updated dependencies [add1126]
|
|
253
|
+
- @ai-sdk/provider-utils@5.0.0-beta.21
|
|
254
|
+
|
|
255
|
+
## 2.0.0-beta.21
|
|
256
|
+
|
|
257
|
+
### Patch Changes
|
|
258
|
+
|
|
259
|
+
- b3976a2: Add workflow serialization support to all provider models.
|
|
260
|
+
|
|
261
|
+
**`@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.
|
|
262
|
+
|
|
263
|
+
**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.
|
|
264
|
+
|
|
265
|
+
All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
|
|
266
|
+
|
|
267
|
+
- Updated dependencies [b3976a2]
|
|
268
|
+
- Updated dependencies [ff5eba1]
|
|
269
|
+
- @ai-sdk/provider-utils@5.0.0-beta.20
|
|
270
|
+
- @ai-sdk/provider@4.0.0-beta.12
|
|
271
|
+
|
|
272
|
+
## 2.0.0-beta.20
|
|
273
|
+
|
|
274
|
+
### Major Changes
|
|
275
|
+
|
|
276
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
277
|
+
|
|
278
|
+
### Patch Changes
|
|
279
|
+
|
|
280
|
+
- Updated dependencies [ef992f8]
|
|
281
|
+
- @ai-sdk/provider@4.0.0-beta.11
|
|
282
|
+
- @ai-sdk/provider-utils@5.0.0-beta.19
|
|
283
|
+
|
|
284
|
+
## 2.0.0-beta.19
|
|
285
|
+
|
|
286
|
+
### Patch Changes
|
|
287
|
+
|
|
288
|
+
- Updated dependencies [90e2d8a]
|
|
289
|
+
- @ai-sdk/provider-utils@5.0.0-beta.18
|
|
290
|
+
|
|
291
|
+
## 2.0.0-beta.18
|
|
292
|
+
|
|
293
|
+
### Patch Changes
|
|
294
|
+
|
|
295
|
+
- Updated dependencies [3ae1786]
|
|
296
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
297
|
+
|
|
298
|
+
## 2.0.0-beta.17
|
|
299
|
+
|
|
300
|
+
### Patch Changes
|
|
301
|
+
|
|
302
|
+
- Updated dependencies [176466a]
|
|
303
|
+
- @ai-sdk/provider@4.0.0-beta.10
|
|
304
|
+
- @ai-sdk/provider-utils@5.0.0-beta.16
|
|
305
|
+
|
|
306
|
+
## 2.0.0-beta.16
|
|
307
|
+
|
|
308
|
+
### Patch Changes
|
|
309
|
+
|
|
310
|
+
- Updated dependencies [e311194]
|
|
311
|
+
- @ai-sdk/provider@4.0.0-beta.9
|
|
312
|
+
- @ai-sdk/provider-utils@5.0.0-beta.15
|
|
313
|
+
|
|
314
|
+
## 2.0.0-beta.15
|
|
315
|
+
|
|
316
|
+
### Patch Changes
|
|
317
|
+
|
|
318
|
+
- Updated dependencies [34bd95d]
|
|
319
|
+
- Updated dependencies [008271d]
|
|
320
|
+
- @ai-sdk/provider@4.0.0-beta.8
|
|
321
|
+
- @ai-sdk/provider-utils@5.0.0-beta.14
|
|
322
|
+
|
|
323
|
+
## 2.0.0-beta.14
|
|
324
|
+
|
|
325
|
+
### Patch Changes
|
|
326
|
+
|
|
327
|
+
- Updated dependencies [b0c2869]
|
|
328
|
+
- Updated dependencies [7e26e81]
|
|
329
|
+
- @ai-sdk/provider-utils@5.0.0-beta.13
|
|
330
|
+
|
|
331
|
+
## 2.0.0-beta.13
|
|
332
|
+
|
|
333
|
+
### Patch Changes
|
|
334
|
+
|
|
335
|
+
- Updated dependencies [46d1149]
|
|
336
|
+
- @ai-sdk/provider-utils@5.0.0-beta.12
|
|
337
|
+
|
|
338
|
+
## 2.0.0-beta.12
|
|
339
|
+
|
|
340
|
+
### Patch Changes
|
|
341
|
+
|
|
342
|
+
- Updated dependencies [6fd51c0]
|
|
343
|
+
- @ai-sdk/provider-utils@5.0.0-beta.11
|
|
344
|
+
- @ai-sdk/provider@4.0.0-beta.7
|
|
345
|
+
|
|
346
|
+
## 2.0.0-beta.11
|
|
347
|
+
|
|
348
|
+
### Patch Changes
|
|
349
|
+
|
|
350
|
+
- Updated dependencies [c29a26f]
|
|
351
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
352
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
353
|
+
|
|
354
|
+
## 2.0.0-beta.10
|
|
355
|
+
|
|
356
|
+
### Patch Changes
|
|
357
|
+
|
|
358
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
359
|
+
|
|
360
|
+
## 2.0.0-beta.9
|
|
361
|
+
|
|
362
|
+
### Patch Changes
|
|
363
|
+
|
|
364
|
+
- Updated dependencies [2e17091]
|
|
365
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
366
|
+
|
|
367
|
+
## 2.0.0-beta.8
|
|
368
|
+
|
|
369
|
+
### Patch Changes
|
|
370
|
+
|
|
371
|
+
- Updated dependencies [986c6fd]
|
|
372
|
+
- Updated dependencies [493295c]
|
|
373
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
374
|
+
|
|
375
|
+
## 2.0.0-beta.7
|
|
376
|
+
|
|
377
|
+
### Patch Changes
|
|
378
|
+
|
|
379
|
+
- Updated dependencies [1f509d4]
|
|
380
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
381
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
382
|
+
|
|
383
|
+
## 2.0.0-beta.6
|
|
384
|
+
|
|
385
|
+
### Patch Changes
|
|
386
|
+
|
|
387
|
+
- Updated dependencies [3887c70]
|
|
388
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
389
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
390
|
+
|
|
3
391
|
## 2.0.0-beta.5
|
|
4
392
|
|
|
5
393
|
### Patch Changes
|
|
@@ -237,13 +625,13 @@
|
|
|
237
625
|
Before
|
|
238
626
|
|
|
239
627
|
```ts
|
|
240
|
-
model.textEmbeddingModel(
|
|
628
|
+
model.textEmbeddingModel("my-model-id");
|
|
241
629
|
```
|
|
242
630
|
|
|
243
631
|
After
|
|
244
632
|
|
|
245
633
|
```ts
|
|
246
|
-
model.embeddingModel(
|
|
634
|
+
model.embeddingModel("my-model-id");
|
|
247
635
|
```
|
|
248
636
|
|
|
249
637
|
- cd3b71c: feat (provider/black-forest-labs): include cost and megapixels in metadata
|
|
@@ -442,13 +830,13 @@
|
|
|
442
830
|
Before
|
|
443
831
|
|
|
444
832
|
```ts
|
|
445
|
-
model.textEmbeddingModel(
|
|
833
|
+
model.textEmbeddingModel("my-model-id");
|
|
446
834
|
```
|
|
447
835
|
|
|
448
836
|
After
|
|
449
837
|
|
|
450
838
|
```ts
|
|
451
|
-
model.embeddingModel(
|
|
839
|
+
model.embeddingModel("my-model-id");
|
|
452
840
|
```
|
|
453
841
|
|
|
454
842
|
- Updated dependencies [8d9e8ad]
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The **[Black Forest Labs provider](https://ai-sdk.dev/providers/ai-sdk-providers/black-forest-labs)** for the [AI SDK](https://ai-sdk.dev/docs) adds image model support for the [Black Forest Labs API](https://docs.bfl.ai/).
|
|
4
4
|
|
|
5
|
+
> **Deploying to Vercel?** With Vercel's AI Gateway you can access Black Forest Labs (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 Black Forest Labs provider is available in the `@ai-sdk/black-forest-labs` module. You can install it with
|