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