@ai-sdk/vercel 0.0.0-1c33ba03-20260114162300
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 +1035 -0
- package/LICENSE +13 -0
- package/README.md +43 -0
- package/dist/index.d.mts +45 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +84 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +61 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +67 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,1035 @@
|
|
|
1
|
+
# @ai-sdk/vercel
|
|
2
|
+
|
|
3
|
+
## 0.0.0-1c33ba03-20260114162300
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [261c011]
|
|
8
|
+
- @ai-sdk/provider-utils@0.0.0-1c33ba03-20260114162300
|
|
9
|
+
- @ai-sdk/openai-compatible@0.0.0-1c33ba03-20260114162300
|
|
10
|
+
|
|
11
|
+
## 2.0.10
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [1b11dcb]
|
|
16
|
+
- @ai-sdk/provider-utils@4.0.6
|
|
17
|
+
- @ai-sdk/provider@3.0.3
|
|
18
|
+
- @ai-sdk/openai-compatible@2.0.10
|
|
19
|
+
|
|
20
|
+
## 2.0.9
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [bc02a3c]
|
|
25
|
+
- @ai-sdk/openai-compatible@2.0.9
|
|
26
|
+
|
|
27
|
+
## 2.0.8
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [78fcb18]
|
|
32
|
+
- @ai-sdk/openai-compatible@2.0.8
|
|
33
|
+
|
|
34
|
+
## 2.0.7
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies [cd7bb0e]
|
|
39
|
+
- @ai-sdk/openai-compatible@2.0.7
|
|
40
|
+
|
|
41
|
+
## 2.0.6
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies [34d1c8a]
|
|
46
|
+
- @ai-sdk/provider-utils@4.0.5
|
|
47
|
+
- @ai-sdk/openai-compatible@2.0.6
|
|
48
|
+
|
|
49
|
+
## 2.0.5
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Updated dependencies [d54c380]
|
|
54
|
+
- @ai-sdk/openai-compatible@2.0.5
|
|
55
|
+
|
|
56
|
+
## 2.0.4
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [d937c8f]
|
|
61
|
+
- @ai-sdk/provider@3.0.2
|
|
62
|
+
- @ai-sdk/openai-compatible@2.0.4
|
|
63
|
+
- @ai-sdk/provider-utils@4.0.4
|
|
64
|
+
|
|
65
|
+
## 2.0.3
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- Updated dependencies [0b429d4]
|
|
70
|
+
- @ai-sdk/provider-utils@4.0.3
|
|
71
|
+
- @ai-sdk/openai-compatible@2.0.3
|
|
72
|
+
|
|
73
|
+
## 2.0.2
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- 863d34f: fix: trigger release to update `@latest`
|
|
78
|
+
- Updated dependencies [863d34f]
|
|
79
|
+
- @ai-sdk/openai-compatible@2.0.2
|
|
80
|
+
- @ai-sdk/provider@3.0.1
|
|
81
|
+
- @ai-sdk/provider-utils@4.0.2
|
|
82
|
+
|
|
83
|
+
## 2.0.1
|
|
84
|
+
|
|
85
|
+
### Patch Changes
|
|
86
|
+
|
|
87
|
+
- Updated dependencies [29264a3]
|
|
88
|
+
- @ai-sdk/provider-utils@4.0.1
|
|
89
|
+
- @ai-sdk/openai-compatible@2.0.1
|
|
90
|
+
|
|
91
|
+
## 2.0.0
|
|
92
|
+
|
|
93
|
+
### Major Changes
|
|
94
|
+
|
|
95
|
+
- dee8b05: ai SDK 6 beta
|
|
96
|
+
|
|
97
|
+
### Minor Changes
|
|
98
|
+
|
|
99
|
+
- 78928cb: release: start 5.1 beta
|
|
100
|
+
|
|
101
|
+
### Patch Changes
|
|
102
|
+
|
|
103
|
+
- 0c3b58b: fix(provider): add specificationVersion to ProviderV3
|
|
104
|
+
- 8d9e8ad: chore(provider): remove generics from EmbeddingModelV3
|
|
105
|
+
|
|
106
|
+
Before
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
model.textEmbeddingModel('my-model-id');
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
After
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
model.embeddingModel('my-model-id');
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
- ed329cb: feat: `Provider-V3`
|
|
119
|
+
- 1cad0ab: feat: add provider version to user-agent header
|
|
120
|
+
- 8dac895: feat: `LanguageModelV3`
|
|
121
|
+
- 366f50b: chore(provider): add deprecated textEmbeddingModel and textEmbedding aliases
|
|
122
|
+
- 4616b86: chore: update zod peer depenedency version
|
|
123
|
+
- Updated dependencies
|
|
124
|
+
- @ai-sdk/openai-compatible@2.0.0
|
|
125
|
+
- @ai-sdk/provider@3.0.0
|
|
126
|
+
- @ai-sdk/provider-utils@4.0.0
|
|
127
|
+
|
|
128
|
+
## 2.0.0-beta.60
|
|
129
|
+
|
|
130
|
+
### Patch Changes
|
|
131
|
+
|
|
132
|
+
- Updated dependencies [475189e]
|
|
133
|
+
- @ai-sdk/provider@3.0.0-beta.32
|
|
134
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.60
|
|
135
|
+
- @ai-sdk/provider-utils@4.0.0-beta.59
|
|
136
|
+
|
|
137
|
+
## 2.0.0-beta.59
|
|
138
|
+
|
|
139
|
+
### Patch Changes
|
|
140
|
+
|
|
141
|
+
- Updated dependencies [2625a04]
|
|
142
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.59
|
|
143
|
+
- @ai-sdk/provider@3.0.0-beta.31
|
|
144
|
+
- @ai-sdk/provider-utils@4.0.0-beta.58
|
|
145
|
+
|
|
146
|
+
## 2.0.0-beta.58
|
|
147
|
+
|
|
148
|
+
### Patch Changes
|
|
149
|
+
|
|
150
|
+
- Updated dependencies [cbf52cd]
|
|
151
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.58
|
|
152
|
+
- @ai-sdk/provider@3.0.0-beta.30
|
|
153
|
+
- @ai-sdk/provider-utils@4.0.0-beta.57
|
|
154
|
+
|
|
155
|
+
## 2.0.0-beta.57
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- Updated dependencies [9549c9e]
|
|
160
|
+
- @ai-sdk/provider@3.0.0-beta.29
|
|
161
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.57
|
|
162
|
+
- @ai-sdk/provider-utils@4.0.0-beta.56
|
|
163
|
+
|
|
164
|
+
## 2.0.0-beta.56
|
|
165
|
+
|
|
166
|
+
### Patch Changes
|
|
167
|
+
|
|
168
|
+
- Updated dependencies [50b70d6]
|
|
169
|
+
- @ai-sdk/provider-utils@4.0.0-beta.55
|
|
170
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.56
|
|
171
|
+
|
|
172
|
+
## 2.0.0-beta.55
|
|
173
|
+
|
|
174
|
+
### Patch Changes
|
|
175
|
+
|
|
176
|
+
- Updated dependencies [9061dc0]
|
|
177
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.55
|
|
178
|
+
- @ai-sdk/provider-utils@4.0.0-beta.54
|
|
179
|
+
- @ai-sdk/provider@3.0.0-beta.28
|
|
180
|
+
|
|
181
|
+
## 2.0.0-beta.54
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- 366f50b: chore(provider): add deprecated textEmbeddingModel and textEmbedding aliases
|
|
186
|
+
- Updated dependencies [366f50b]
|
|
187
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.54
|
|
188
|
+
- @ai-sdk/provider@3.0.0-beta.27
|
|
189
|
+
- @ai-sdk/provider-utils@4.0.0-beta.53
|
|
190
|
+
|
|
191
|
+
## 2.0.0-beta.53
|
|
192
|
+
|
|
193
|
+
### Patch Changes
|
|
194
|
+
|
|
195
|
+
- Updated dependencies [763d04a]
|
|
196
|
+
- @ai-sdk/provider-utils@4.0.0-beta.52
|
|
197
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.53
|
|
198
|
+
|
|
199
|
+
## 2.0.0-beta.52
|
|
200
|
+
|
|
201
|
+
### Patch Changes
|
|
202
|
+
|
|
203
|
+
- Updated dependencies [c1efac4]
|
|
204
|
+
- @ai-sdk/provider-utils@4.0.0-beta.51
|
|
205
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.52
|
|
206
|
+
|
|
207
|
+
## 2.0.0-beta.51
|
|
208
|
+
|
|
209
|
+
### Patch Changes
|
|
210
|
+
|
|
211
|
+
- Updated dependencies [32223c8]
|
|
212
|
+
- @ai-sdk/provider-utils@4.0.0-beta.50
|
|
213
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.51
|
|
214
|
+
|
|
215
|
+
## 2.0.0-beta.50
|
|
216
|
+
|
|
217
|
+
### Patch Changes
|
|
218
|
+
|
|
219
|
+
- Updated dependencies [83e5744]
|
|
220
|
+
- @ai-sdk/provider-utils@4.0.0-beta.49
|
|
221
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.50
|
|
222
|
+
|
|
223
|
+
## 2.0.0-beta.49
|
|
224
|
+
|
|
225
|
+
### Patch Changes
|
|
226
|
+
|
|
227
|
+
- Updated dependencies [960ec8f]
|
|
228
|
+
- @ai-sdk/provider-utils@4.0.0-beta.48
|
|
229
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.49
|
|
230
|
+
|
|
231
|
+
## 2.0.0-beta.48
|
|
232
|
+
|
|
233
|
+
### Patch Changes
|
|
234
|
+
|
|
235
|
+
- Updated dependencies [e9e157f]
|
|
236
|
+
- @ai-sdk/provider-utils@4.0.0-beta.47
|
|
237
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.48
|
|
238
|
+
|
|
239
|
+
## 2.0.0-beta.47
|
|
240
|
+
|
|
241
|
+
### Patch Changes
|
|
242
|
+
|
|
243
|
+
- Updated dependencies [81e29ab]
|
|
244
|
+
- @ai-sdk/provider-utils@4.0.0-beta.46
|
|
245
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.47
|
|
246
|
+
|
|
247
|
+
## 2.0.0-beta.46
|
|
248
|
+
|
|
249
|
+
### Patch Changes
|
|
250
|
+
|
|
251
|
+
- Updated dependencies [3bd2689]
|
|
252
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.46
|
|
253
|
+
- @ai-sdk/provider@3.0.0-beta.26
|
|
254
|
+
- @ai-sdk/provider-utils@4.0.0-beta.45
|
|
255
|
+
|
|
256
|
+
## 2.0.0-beta.45
|
|
257
|
+
|
|
258
|
+
### Patch Changes
|
|
259
|
+
|
|
260
|
+
- Updated dependencies [53f3368]
|
|
261
|
+
- @ai-sdk/provider@3.0.0-beta.25
|
|
262
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.45
|
|
263
|
+
- @ai-sdk/provider-utils@4.0.0-beta.44
|
|
264
|
+
|
|
265
|
+
## 2.0.0-beta.44
|
|
266
|
+
|
|
267
|
+
### Patch Changes
|
|
268
|
+
|
|
269
|
+
- Updated dependencies [dce03c4]
|
|
270
|
+
- @ai-sdk/provider-utils@4.0.0-beta.43
|
|
271
|
+
- @ai-sdk/provider@3.0.0-beta.24
|
|
272
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.44
|
|
273
|
+
|
|
274
|
+
## 2.0.0-beta.43
|
|
275
|
+
|
|
276
|
+
### Patch Changes
|
|
277
|
+
|
|
278
|
+
- Updated dependencies [3ed5519]
|
|
279
|
+
- @ai-sdk/provider-utils@4.0.0-beta.42
|
|
280
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.43
|
|
281
|
+
|
|
282
|
+
## 2.0.0-beta.42
|
|
283
|
+
|
|
284
|
+
### Patch Changes
|
|
285
|
+
|
|
286
|
+
- Updated dependencies [1bd7d32]
|
|
287
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.42
|
|
288
|
+
- @ai-sdk/provider-utils@4.0.0-beta.41
|
|
289
|
+
- @ai-sdk/provider@3.0.0-beta.23
|
|
290
|
+
|
|
291
|
+
## 2.0.0-beta.41
|
|
292
|
+
|
|
293
|
+
### Patch Changes
|
|
294
|
+
|
|
295
|
+
- Updated dependencies [544d4e8]
|
|
296
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.41
|
|
297
|
+
- @ai-sdk/provider-utils@4.0.0-beta.40
|
|
298
|
+
- @ai-sdk/provider@3.0.0-beta.22
|
|
299
|
+
|
|
300
|
+
## 2.0.0-beta.40
|
|
301
|
+
|
|
302
|
+
### Patch Changes
|
|
303
|
+
|
|
304
|
+
- Updated dependencies [954c356]
|
|
305
|
+
- @ai-sdk/provider-utils@4.0.0-beta.39
|
|
306
|
+
- @ai-sdk/provider@3.0.0-beta.21
|
|
307
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.40
|
|
308
|
+
|
|
309
|
+
## 2.0.0-beta.39
|
|
310
|
+
|
|
311
|
+
### Patch Changes
|
|
312
|
+
|
|
313
|
+
- Updated dependencies [03849b0]
|
|
314
|
+
- @ai-sdk/provider-utils@4.0.0-beta.38
|
|
315
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.39
|
|
316
|
+
|
|
317
|
+
## 2.0.0-beta.38
|
|
318
|
+
|
|
319
|
+
### Patch Changes
|
|
320
|
+
|
|
321
|
+
- Updated dependencies [457318b]
|
|
322
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.38
|
|
323
|
+
- @ai-sdk/provider@3.0.0-beta.20
|
|
324
|
+
- @ai-sdk/provider-utils@4.0.0-beta.37
|
|
325
|
+
|
|
326
|
+
## 2.0.0-beta.37
|
|
327
|
+
|
|
328
|
+
### Patch Changes
|
|
329
|
+
|
|
330
|
+
- 8d9e8ad: chore(provider): remove generics from EmbeddingModelV3
|
|
331
|
+
|
|
332
|
+
Before
|
|
333
|
+
|
|
334
|
+
```ts
|
|
335
|
+
model.textEmbeddingModel('my-model-id');
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
After
|
|
339
|
+
|
|
340
|
+
```ts
|
|
341
|
+
model.embeddingModel('my-model-id');
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
- Updated dependencies [8d9e8ad]
|
|
345
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.37
|
|
346
|
+
- @ai-sdk/provider@3.0.0-beta.19
|
|
347
|
+
- @ai-sdk/provider-utils@4.0.0-beta.36
|
|
348
|
+
|
|
349
|
+
## 2.0.0-beta.36
|
|
350
|
+
|
|
351
|
+
### Patch Changes
|
|
352
|
+
|
|
353
|
+
- Updated dependencies [10d819b]
|
|
354
|
+
- @ai-sdk/provider@3.0.0-beta.18
|
|
355
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.36
|
|
356
|
+
- @ai-sdk/provider-utils@4.0.0-beta.35
|
|
357
|
+
|
|
358
|
+
## 2.0.0-beta.35
|
|
359
|
+
|
|
360
|
+
### Patch Changes
|
|
361
|
+
|
|
362
|
+
- Updated dependencies [db913bd]
|
|
363
|
+
- @ai-sdk/provider@3.0.0-beta.17
|
|
364
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.35
|
|
365
|
+
- @ai-sdk/provider-utils@4.0.0-beta.34
|
|
366
|
+
|
|
367
|
+
## 2.0.0-beta.34
|
|
368
|
+
|
|
369
|
+
### Patch Changes
|
|
370
|
+
|
|
371
|
+
- Updated dependencies [b681d7d]
|
|
372
|
+
- @ai-sdk/provider@3.0.0-beta.16
|
|
373
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.34
|
|
374
|
+
- @ai-sdk/provider-utils@4.0.0-beta.33
|
|
375
|
+
|
|
376
|
+
## 2.0.0-beta.33
|
|
377
|
+
|
|
378
|
+
### Patch Changes
|
|
379
|
+
|
|
380
|
+
- Updated dependencies [32d8dbb]
|
|
381
|
+
- @ai-sdk/provider-utils@4.0.0-beta.32
|
|
382
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.33
|
|
383
|
+
|
|
384
|
+
## 2.0.0-beta.32
|
|
385
|
+
|
|
386
|
+
### Patch Changes
|
|
387
|
+
|
|
388
|
+
- Updated dependencies [bb36798]
|
|
389
|
+
- @ai-sdk/provider@3.0.0-beta.15
|
|
390
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.32
|
|
391
|
+
- @ai-sdk/provider-utils@4.0.0-beta.31
|
|
392
|
+
|
|
393
|
+
## 2.0.0-beta.31
|
|
394
|
+
|
|
395
|
+
### Patch Changes
|
|
396
|
+
|
|
397
|
+
- Updated dependencies [4f16c37]
|
|
398
|
+
- @ai-sdk/provider-utils@4.0.0-beta.30
|
|
399
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.31
|
|
400
|
+
|
|
401
|
+
## 2.0.0-beta.30
|
|
402
|
+
|
|
403
|
+
### Patch Changes
|
|
404
|
+
|
|
405
|
+
- Updated dependencies [af3780b]
|
|
406
|
+
- @ai-sdk/provider@3.0.0-beta.14
|
|
407
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.30
|
|
408
|
+
- @ai-sdk/provider-utils@4.0.0-beta.29
|
|
409
|
+
|
|
410
|
+
## 2.0.0-beta.29
|
|
411
|
+
|
|
412
|
+
### Patch Changes
|
|
413
|
+
|
|
414
|
+
- Updated dependencies [016b111]
|
|
415
|
+
- @ai-sdk/provider-utils@4.0.0-beta.28
|
|
416
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.29
|
|
417
|
+
|
|
418
|
+
## 2.0.0-beta.28
|
|
419
|
+
|
|
420
|
+
### Patch Changes
|
|
421
|
+
|
|
422
|
+
- Updated dependencies [37c58a0]
|
|
423
|
+
- @ai-sdk/provider@3.0.0-beta.13
|
|
424
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.28
|
|
425
|
+
- @ai-sdk/provider-utils@4.0.0-beta.27
|
|
426
|
+
|
|
427
|
+
## 2.0.0-beta.27
|
|
428
|
+
|
|
429
|
+
### Patch Changes
|
|
430
|
+
|
|
431
|
+
- Updated dependencies [d1bdadb]
|
|
432
|
+
- @ai-sdk/provider@3.0.0-beta.12
|
|
433
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.27
|
|
434
|
+
- @ai-sdk/provider-utils@4.0.0-beta.26
|
|
435
|
+
|
|
436
|
+
## 2.0.0-beta.26
|
|
437
|
+
|
|
438
|
+
### Patch Changes
|
|
439
|
+
|
|
440
|
+
- Updated dependencies [4c44a5b]
|
|
441
|
+
- @ai-sdk/provider@3.0.0-beta.11
|
|
442
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.26
|
|
443
|
+
- @ai-sdk/provider-utils@4.0.0-beta.25
|
|
444
|
+
|
|
445
|
+
## 2.0.0-beta.25
|
|
446
|
+
|
|
447
|
+
### Patch Changes
|
|
448
|
+
|
|
449
|
+
- 0c3b58b: fix(provider): add specificationVersion to ProviderV3
|
|
450
|
+
- Updated dependencies [0c3b58b]
|
|
451
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.25
|
|
452
|
+
- @ai-sdk/provider@3.0.0-beta.10
|
|
453
|
+
- @ai-sdk/provider-utils@4.0.0-beta.24
|
|
454
|
+
|
|
455
|
+
## 2.0.0-beta.24
|
|
456
|
+
|
|
457
|
+
### Patch Changes
|
|
458
|
+
|
|
459
|
+
- Updated dependencies [a755db5]
|
|
460
|
+
- @ai-sdk/provider@3.0.0-beta.9
|
|
461
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.24
|
|
462
|
+
- @ai-sdk/provider-utils@4.0.0-beta.23
|
|
463
|
+
|
|
464
|
+
## 2.0.0-beta.23
|
|
465
|
+
|
|
466
|
+
### Patch Changes
|
|
467
|
+
|
|
468
|
+
- Updated dependencies [58920e0]
|
|
469
|
+
- @ai-sdk/provider-utils@4.0.0-beta.22
|
|
470
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.23
|
|
471
|
+
|
|
472
|
+
## 2.0.0-beta.22
|
|
473
|
+
|
|
474
|
+
### Patch Changes
|
|
475
|
+
|
|
476
|
+
- Updated dependencies [293a6b7]
|
|
477
|
+
- @ai-sdk/provider-utils@4.0.0-beta.21
|
|
478
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.22
|
|
479
|
+
|
|
480
|
+
## 2.0.0-beta.21
|
|
481
|
+
|
|
482
|
+
### Patch Changes
|
|
483
|
+
|
|
484
|
+
- Updated dependencies [fca786b]
|
|
485
|
+
- @ai-sdk/provider-utils@4.0.0-beta.20
|
|
486
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.21
|
|
487
|
+
|
|
488
|
+
## 2.0.0-beta.20
|
|
489
|
+
|
|
490
|
+
### Patch Changes
|
|
491
|
+
|
|
492
|
+
- Updated dependencies [3794514]
|
|
493
|
+
- @ai-sdk/provider-utils@4.0.0-beta.19
|
|
494
|
+
- @ai-sdk/provider@3.0.0-beta.8
|
|
495
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.20
|
|
496
|
+
|
|
497
|
+
## 2.0.0-beta.19
|
|
498
|
+
|
|
499
|
+
### Patch Changes
|
|
500
|
+
|
|
501
|
+
- Updated dependencies [81d4308]
|
|
502
|
+
- @ai-sdk/provider@3.0.0-beta.7
|
|
503
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.19
|
|
504
|
+
- @ai-sdk/provider-utils@4.0.0-beta.18
|
|
505
|
+
|
|
506
|
+
## 2.0.0-beta.18
|
|
507
|
+
|
|
508
|
+
### Patch Changes
|
|
509
|
+
|
|
510
|
+
- Updated dependencies [703459a]
|
|
511
|
+
- @ai-sdk/provider-utils@4.0.0-beta.17
|
|
512
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.18
|
|
513
|
+
|
|
514
|
+
## 2.0.0-beta.17
|
|
515
|
+
|
|
516
|
+
### Patch Changes
|
|
517
|
+
|
|
518
|
+
- Updated dependencies [b689220]
|
|
519
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.17
|
|
520
|
+
|
|
521
|
+
## 2.0.0-beta.16
|
|
522
|
+
|
|
523
|
+
### Patch Changes
|
|
524
|
+
|
|
525
|
+
- Updated dependencies [6306603]
|
|
526
|
+
- @ai-sdk/provider-utils@4.0.0-beta.16
|
|
527
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.16
|
|
528
|
+
|
|
529
|
+
## 2.0.0-beta.15
|
|
530
|
+
|
|
531
|
+
### Patch Changes
|
|
532
|
+
|
|
533
|
+
- Updated dependencies [f0b2157]
|
|
534
|
+
- @ai-sdk/provider-utils@4.0.0-beta.15
|
|
535
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.15
|
|
536
|
+
|
|
537
|
+
## 2.0.0-beta.14
|
|
538
|
+
|
|
539
|
+
### Patch Changes
|
|
540
|
+
|
|
541
|
+
- Updated dependencies [3b1d015]
|
|
542
|
+
- @ai-sdk/provider-utils@4.0.0-beta.14
|
|
543
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.14
|
|
544
|
+
|
|
545
|
+
## 2.0.0-beta.13
|
|
546
|
+
|
|
547
|
+
### Patch Changes
|
|
548
|
+
|
|
549
|
+
- Updated dependencies [d116b4b]
|
|
550
|
+
- @ai-sdk/provider-utils@4.0.0-beta.13
|
|
551
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.13
|
|
552
|
+
|
|
553
|
+
## 2.0.0-beta.12
|
|
554
|
+
|
|
555
|
+
### Patch Changes
|
|
556
|
+
|
|
557
|
+
- Updated dependencies [7e32fea]
|
|
558
|
+
- @ai-sdk/provider-utils@4.0.0-beta.12
|
|
559
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.12
|
|
560
|
+
|
|
561
|
+
## 2.0.0-beta.11
|
|
562
|
+
|
|
563
|
+
### Patch Changes
|
|
564
|
+
|
|
565
|
+
- Updated dependencies
|
|
566
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.11
|
|
567
|
+
- @ai-sdk/provider-utils@4.0.0-beta.11
|
|
568
|
+
|
|
569
|
+
## 2.0.0-beta.10
|
|
570
|
+
|
|
571
|
+
### Major Changes
|
|
572
|
+
|
|
573
|
+
- dee8b05: ai SDK 6 beta
|
|
574
|
+
|
|
575
|
+
### Patch Changes
|
|
576
|
+
|
|
577
|
+
- Updated dependencies [dee8b05]
|
|
578
|
+
- @ai-sdk/openai-compatible@2.0.0-beta.10
|
|
579
|
+
- @ai-sdk/provider@3.0.0-beta.6
|
|
580
|
+
- @ai-sdk/provider-utils@4.0.0-beta.10
|
|
581
|
+
|
|
582
|
+
## 1.1.0-beta.9
|
|
583
|
+
|
|
584
|
+
### Patch Changes
|
|
585
|
+
|
|
586
|
+
- Updated dependencies [521c537]
|
|
587
|
+
- @ai-sdk/provider-utils@3.1.0-beta.9
|
|
588
|
+
- @ai-sdk/openai-compatible@1.1.0-beta.9
|
|
589
|
+
|
|
590
|
+
## 1.1.0-beta.8
|
|
591
|
+
|
|
592
|
+
### Patch Changes
|
|
593
|
+
|
|
594
|
+
- Updated dependencies [e06565c]
|
|
595
|
+
- @ai-sdk/provider-utils@3.1.0-beta.8
|
|
596
|
+
- @ai-sdk/openai-compatible@1.1.0-beta.8
|
|
597
|
+
|
|
598
|
+
## 1.1.0-beta.7
|
|
599
|
+
|
|
600
|
+
### Patch Changes
|
|
601
|
+
|
|
602
|
+
- Updated dependencies
|
|
603
|
+
- @ai-sdk/provider@2.1.0-beta.5
|
|
604
|
+
- @ai-sdk/openai-compatible@1.1.0-beta.7
|
|
605
|
+
- @ai-sdk/provider-utils@3.1.0-beta.7
|
|
606
|
+
|
|
607
|
+
## 1.1.0-beta.6
|
|
608
|
+
|
|
609
|
+
### Patch Changes
|
|
610
|
+
|
|
611
|
+
- Updated dependencies
|
|
612
|
+
- @ai-sdk/openai-compatible@1.1.0-beta.6
|
|
613
|
+
- @ai-sdk/provider-utils@3.1.0-beta.6
|
|
614
|
+
- @ai-sdk/provider@2.1.0-beta.4
|
|
615
|
+
|
|
616
|
+
## 1.1.0-beta.5
|
|
617
|
+
|
|
618
|
+
### Patch Changes
|
|
619
|
+
|
|
620
|
+
- 8dac895: feat: `LanguageModelV3`
|
|
621
|
+
- Updated dependencies
|
|
622
|
+
- @ai-sdk/openai-compatible@1.1.0-beta.5
|
|
623
|
+
- @ai-sdk/provider-utils@3.1.0-beta.5
|
|
624
|
+
- @ai-sdk/provider@2.1.0-beta.3
|
|
625
|
+
|
|
626
|
+
## 1.1.0-beta.4
|
|
627
|
+
|
|
628
|
+
### Patch Changes
|
|
629
|
+
|
|
630
|
+
- 4616b86: chore: update zod peer depenedency version
|
|
631
|
+
- Updated dependencies [4616b86]
|
|
632
|
+
- @ai-sdk/openai-compatible@1.1.0-beta.4
|
|
633
|
+
- @ai-sdk/provider-utils@3.1.0-beta.4
|
|
634
|
+
|
|
635
|
+
## 1.1.0-beta.3
|
|
636
|
+
|
|
637
|
+
### Patch Changes
|
|
638
|
+
|
|
639
|
+
- ed329cb: feat: `Provider-V3`
|
|
640
|
+
- Updated dependencies
|
|
641
|
+
- @ai-sdk/openai-compatible@1.1.0-beta.3
|
|
642
|
+
- @ai-sdk/provider@2.1.0-beta.2
|
|
643
|
+
- @ai-sdk/provider-utils@3.1.0-beta.3
|
|
644
|
+
|
|
645
|
+
## 1.1.0-beta.2
|
|
646
|
+
|
|
647
|
+
### Patch Changes
|
|
648
|
+
|
|
649
|
+
- 1cad0ab: feat: add provider version to user-agent header
|
|
650
|
+
- Updated dependencies [0c4822d]
|
|
651
|
+
- @ai-sdk/openai-compatible@1.1.0-beta.2
|
|
652
|
+
- @ai-sdk/provider@2.1.0-beta.1
|
|
653
|
+
- @ai-sdk/provider-utils@3.1.0-beta.2
|
|
654
|
+
|
|
655
|
+
## 1.1.0-beta.1
|
|
656
|
+
|
|
657
|
+
### Patch Changes
|
|
658
|
+
|
|
659
|
+
- Updated dependencies [cbb1d35]
|
|
660
|
+
- @ai-sdk/provider-utils@3.1.0-beta.1
|
|
661
|
+
- @ai-sdk/openai-compatible@1.1.0-beta.1
|
|
662
|
+
|
|
663
|
+
## 1.1.0-beta.0
|
|
664
|
+
|
|
665
|
+
### Minor Changes
|
|
666
|
+
|
|
667
|
+
- 78928cb: release: start 5.1 beta
|
|
668
|
+
|
|
669
|
+
### Patch Changes
|
|
670
|
+
|
|
671
|
+
- Updated dependencies [78928cb]
|
|
672
|
+
- @ai-sdk/openai-compatible@1.1.0-beta.0
|
|
673
|
+
- @ai-sdk/provider@2.1.0-beta.0
|
|
674
|
+
- @ai-sdk/provider-utils@3.1.0-beta.0
|
|
675
|
+
|
|
676
|
+
## 1.0.18
|
|
677
|
+
|
|
678
|
+
### Patch Changes
|
|
679
|
+
|
|
680
|
+
- Updated dependencies [28363da]
|
|
681
|
+
- @ai-sdk/openai-compatible@1.0.18
|
|
682
|
+
|
|
683
|
+
## 1.0.17
|
|
684
|
+
|
|
685
|
+
### Patch Changes
|
|
686
|
+
|
|
687
|
+
- Updated dependencies [3aed04c]
|
|
688
|
+
- @ai-sdk/openai-compatible@1.0.17
|
|
689
|
+
|
|
690
|
+
## 1.0.16
|
|
691
|
+
|
|
692
|
+
### Patch Changes
|
|
693
|
+
|
|
694
|
+
- Updated dependencies [0294b58]
|
|
695
|
+
- @ai-sdk/provider-utils@3.0.9
|
|
696
|
+
- @ai-sdk/openai-compatible@1.0.16
|
|
697
|
+
|
|
698
|
+
## 1.0.15
|
|
699
|
+
|
|
700
|
+
### Patch Changes
|
|
701
|
+
|
|
702
|
+
- Updated dependencies [99964ed]
|
|
703
|
+
- @ai-sdk/provider-utils@3.0.8
|
|
704
|
+
- @ai-sdk/openai-compatible@1.0.15
|
|
705
|
+
|
|
706
|
+
## 1.0.14
|
|
707
|
+
|
|
708
|
+
### Patch Changes
|
|
709
|
+
|
|
710
|
+
- Updated dependencies [818f021]
|
|
711
|
+
- @ai-sdk/openai-compatible@1.0.14
|
|
712
|
+
|
|
713
|
+
## 1.0.13
|
|
714
|
+
|
|
715
|
+
### Patch Changes
|
|
716
|
+
|
|
717
|
+
- Updated dependencies [886e7cd]
|
|
718
|
+
- @ai-sdk/provider-utils@3.0.7
|
|
719
|
+
- @ai-sdk/openai-compatible@1.0.13
|
|
720
|
+
|
|
721
|
+
## 1.0.12
|
|
722
|
+
|
|
723
|
+
### Patch Changes
|
|
724
|
+
|
|
725
|
+
- Updated dependencies [1b5a3d3]
|
|
726
|
+
- @ai-sdk/provider-utils@3.0.6
|
|
727
|
+
- @ai-sdk/openai-compatible@1.0.12
|
|
728
|
+
|
|
729
|
+
## 1.0.11
|
|
730
|
+
|
|
731
|
+
### Patch Changes
|
|
732
|
+
|
|
733
|
+
- Updated dependencies [0857788]
|
|
734
|
+
- @ai-sdk/provider-utils@3.0.5
|
|
735
|
+
- @ai-sdk/openai-compatible@1.0.11
|
|
736
|
+
|
|
737
|
+
## 1.0.10
|
|
738
|
+
|
|
739
|
+
### Patch Changes
|
|
740
|
+
|
|
741
|
+
- Updated dependencies [7ca3aee]
|
|
742
|
+
- @ai-sdk/openai-compatible@1.0.10
|
|
743
|
+
|
|
744
|
+
## 1.0.9
|
|
745
|
+
|
|
746
|
+
### Patch Changes
|
|
747
|
+
|
|
748
|
+
- Updated dependencies [68751f9]
|
|
749
|
+
- @ai-sdk/provider-utils@3.0.4
|
|
750
|
+
- @ai-sdk/openai-compatible@1.0.9
|
|
751
|
+
|
|
752
|
+
## 1.0.8
|
|
753
|
+
|
|
754
|
+
### Patch Changes
|
|
755
|
+
|
|
756
|
+
- Updated dependencies [515c891]
|
|
757
|
+
- @ai-sdk/openai-compatible@1.0.8
|
|
758
|
+
|
|
759
|
+
## 1.0.7
|
|
760
|
+
|
|
761
|
+
### Patch Changes
|
|
762
|
+
|
|
763
|
+
- Updated dependencies
|
|
764
|
+
- @ai-sdk/provider-utils@3.0.3
|
|
765
|
+
- @ai-sdk/openai-compatible@1.0.7
|
|
766
|
+
|
|
767
|
+
## 1.0.6
|
|
768
|
+
|
|
769
|
+
### Patch Changes
|
|
770
|
+
|
|
771
|
+
- Updated dependencies [38ac190]
|
|
772
|
+
- @ai-sdk/provider-utils@3.0.2
|
|
773
|
+
- @ai-sdk/openai-compatible@1.0.6
|
|
774
|
+
|
|
775
|
+
## 1.0.5
|
|
776
|
+
|
|
777
|
+
### Patch Changes
|
|
778
|
+
|
|
779
|
+
- Updated dependencies
|
|
780
|
+
- @ai-sdk/openai-compatible@1.0.5
|
|
781
|
+
|
|
782
|
+
## 1.0.4
|
|
783
|
+
|
|
784
|
+
### Patch Changes
|
|
785
|
+
|
|
786
|
+
- Updated dependencies
|
|
787
|
+
- @ai-sdk/openai-compatible@1.0.4
|
|
788
|
+
|
|
789
|
+
## 1.0.3
|
|
790
|
+
|
|
791
|
+
### Patch Changes
|
|
792
|
+
|
|
793
|
+
- Updated dependencies [a0934f8]
|
|
794
|
+
- @ai-sdk/openai-compatible@1.0.3
|
|
795
|
+
|
|
796
|
+
## 1.0.2
|
|
797
|
+
|
|
798
|
+
### Patch Changes
|
|
799
|
+
|
|
800
|
+
- Updated dependencies
|
|
801
|
+
- @ai-sdk/openai-compatible@1.0.2
|
|
802
|
+
- @ai-sdk/provider-utils@3.0.1
|
|
803
|
+
|
|
804
|
+
## 1.0.1
|
|
805
|
+
|
|
806
|
+
### Patch Changes
|
|
807
|
+
|
|
808
|
+
- Updated dependencies [0e8ed8e]
|
|
809
|
+
- @ai-sdk/openai-compatible@1.0.1
|
|
810
|
+
|
|
811
|
+
## 1.0.0
|
|
812
|
+
|
|
813
|
+
### Patch Changes
|
|
814
|
+
|
|
815
|
+
- 6f87d1d: feat (provider/vercel): update chat model ids and examples
|
|
816
|
+
- e2aceaf: feat: add raw chunk support
|
|
817
|
+
- 9eb5417: feat (providers/vercel): initial vercel provider
|
|
818
|
+
- 205077b: fix: improve Zod compatibility
|
|
819
|
+
- Updated dependencies
|
|
820
|
+
- @ai-sdk/provider-utils@3.0.0
|
|
821
|
+
- @ai-sdk/provider@2.0.0
|
|
822
|
+
- @ai-sdk/openai-compatible@1.0.0
|
|
823
|
+
|
|
824
|
+
## 1.0.0-beta.14
|
|
825
|
+
|
|
826
|
+
### Patch Changes
|
|
827
|
+
|
|
828
|
+
- Updated dependencies [88a8ee5]
|
|
829
|
+
- @ai-sdk/provider-utils@3.0.0-beta.10
|
|
830
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.13
|
|
831
|
+
|
|
832
|
+
## 1.0.0-beta.13
|
|
833
|
+
|
|
834
|
+
### Patch Changes
|
|
835
|
+
|
|
836
|
+
- Updated dependencies [27deb4d]
|
|
837
|
+
- @ai-sdk/provider@2.0.0-beta.2
|
|
838
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.12
|
|
839
|
+
- @ai-sdk/provider-utils@3.0.0-beta.9
|
|
840
|
+
|
|
841
|
+
## 1.0.0-beta.12
|
|
842
|
+
|
|
843
|
+
### Patch Changes
|
|
844
|
+
|
|
845
|
+
- Updated dependencies [dd5fd43]
|
|
846
|
+
- @ai-sdk/provider-utils@3.0.0-beta.8
|
|
847
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.11
|
|
848
|
+
|
|
849
|
+
## 1.0.0-beta.11
|
|
850
|
+
|
|
851
|
+
### Patch Changes
|
|
852
|
+
|
|
853
|
+
- Updated dependencies [e7fcc86]
|
|
854
|
+
- @ai-sdk/provider-utils@3.0.0-beta.7
|
|
855
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.10
|
|
856
|
+
|
|
857
|
+
## 1.0.0-beta.10
|
|
858
|
+
|
|
859
|
+
### Patch Changes
|
|
860
|
+
|
|
861
|
+
- Updated dependencies
|
|
862
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.9
|
|
863
|
+
- @ai-sdk/provider-utils@3.0.0-beta.6
|
|
864
|
+
|
|
865
|
+
## 1.0.0-beta.9
|
|
866
|
+
|
|
867
|
+
### Patch Changes
|
|
868
|
+
|
|
869
|
+
- 6f87d1d: feat (provider/vercel): update chat model ids and examples
|
|
870
|
+
|
|
871
|
+
## 1.0.0-beta.8
|
|
872
|
+
|
|
873
|
+
### Patch Changes
|
|
874
|
+
|
|
875
|
+
- Updated dependencies
|
|
876
|
+
- @ai-sdk/provider-utils@3.0.0-beta.5
|
|
877
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.8
|
|
878
|
+
|
|
879
|
+
## 1.0.0-beta.7
|
|
880
|
+
|
|
881
|
+
### Patch Changes
|
|
882
|
+
|
|
883
|
+
- 205077b: fix: improve Zod compatibility
|
|
884
|
+
- Updated dependencies [205077b]
|
|
885
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.7
|
|
886
|
+
- @ai-sdk/provider-utils@3.0.0-beta.4
|
|
887
|
+
|
|
888
|
+
## 1.0.0-beta.6
|
|
889
|
+
|
|
890
|
+
### Patch Changes
|
|
891
|
+
|
|
892
|
+
- Updated dependencies [281bb1c]
|
|
893
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.6
|
|
894
|
+
|
|
895
|
+
## 1.0.0-beta.5
|
|
896
|
+
|
|
897
|
+
### Patch Changes
|
|
898
|
+
|
|
899
|
+
- Updated dependencies [05d2819]
|
|
900
|
+
- @ai-sdk/provider-utils@3.0.0-beta.3
|
|
901
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.5
|
|
902
|
+
|
|
903
|
+
## 1.0.0-beta.4
|
|
904
|
+
|
|
905
|
+
### Patch Changes
|
|
906
|
+
|
|
907
|
+
- Updated dependencies [1b101e1]
|
|
908
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.4
|
|
909
|
+
|
|
910
|
+
## 1.0.0-beta.3
|
|
911
|
+
|
|
912
|
+
### Patch Changes
|
|
913
|
+
|
|
914
|
+
- Updated dependencies [7b069ed]
|
|
915
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.3
|
|
916
|
+
|
|
917
|
+
## 1.0.0-beta.2
|
|
918
|
+
|
|
919
|
+
### Patch Changes
|
|
920
|
+
|
|
921
|
+
- Updated dependencies
|
|
922
|
+
- @ai-sdk/provider-utils@3.0.0-beta.2
|
|
923
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.2
|
|
924
|
+
|
|
925
|
+
## 1.0.0-beta.1
|
|
926
|
+
|
|
927
|
+
### Patch Changes
|
|
928
|
+
|
|
929
|
+
- Updated dependencies
|
|
930
|
+
- @ai-sdk/provider@2.0.0-beta.1
|
|
931
|
+
- @ai-sdk/provider-utils@3.0.0-beta.1
|
|
932
|
+
- @ai-sdk/openai-compatible@1.0.0-beta.1
|
|
933
|
+
|
|
934
|
+
## 1.0.0-alpha.15
|
|
935
|
+
|
|
936
|
+
### Patch Changes
|
|
937
|
+
|
|
938
|
+
- Updated dependencies
|
|
939
|
+
- @ai-sdk/provider@2.0.0-alpha.15
|
|
940
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.15
|
|
941
|
+
- @ai-sdk/openai-compatible@1.0.0-alpha.15
|
|
942
|
+
|
|
943
|
+
## 1.0.0-alpha.14
|
|
944
|
+
|
|
945
|
+
### Patch Changes
|
|
946
|
+
|
|
947
|
+
- Updated dependencies
|
|
948
|
+
- @ai-sdk/provider@2.0.0-alpha.14
|
|
949
|
+
- @ai-sdk/openai-compatible@1.0.0-alpha.14
|
|
950
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.14
|
|
951
|
+
|
|
952
|
+
## 1.0.0-alpha.13
|
|
953
|
+
|
|
954
|
+
### Patch Changes
|
|
955
|
+
|
|
956
|
+
- Updated dependencies [68ecf2f]
|
|
957
|
+
- @ai-sdk/provider@2.0.0-alpha.13
|
|
958
|
+
- @ai-sdk/openai-compatible@1.0.0-alpha.13
|
|
959
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.13
|
|
960
|
+
|
|
961
|
+
## 1.0.0-alpha.12
|
|
962
|
+
|
|
963
|
+
### Patch Changes
|
|
964
|
+
|
|
965
|
+
- e2aceaf: feat: add raw chunk support
|
|
966
|
+
- Updated dependencies [e2aceaf]
|
|
967
|
+
- @ai-sdk/openai-compatible@1.0.0-alpha.12
|
|
968
|
+
- @ai-sdk/provider@2.0.0-alpha.12
|
|
969
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.12
|
|
970
|
+
|
|
971
|
+
## 1.0.0-alpha.11
|
|
972
|
+
|
|
973
|
+
### Patch Changes
|
|
974
|
+
|
|
975
|
+
- Updated dependencies [c1e6647]
|
|
976
|
+
- @ai-sdk/provider@2.0.0-alpha.11
|
|
977
|
+
- @ai-sdk/openai-compatible@1.0.0-alpha.11
|
|
978
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.11
|
|
979
|
+
|
|
980
|
+
## 1.0.0-alpha.10
|
|
981
|
+
|
|
982
|
+
### Patch Changes
|
|
983
|
+
|
|
984
|
+
- Updated dependencies [c4df419]
|
|
985
|
+
- @ai-sdk/provider@2.0.0-alpha.10
|
|
986
|
+
- @ai-sdk/openai-compatible@1.0.0-alpha.10
|
|
987
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.10
|
|
988
|
+
|
|
989
|
+
## 1.0.0-alpha.9
|
|
990
|
+
|
|
991
|
+
### Patch Changes
|
|
992
|
+
|
|
993
|
+
- Updated dependencies [811dff3]
|
|
994
|
+
- @ai-sdk/provider@2.0.0-alpha.9
|
|
995
|
+
- @ai-sdk/openai-compatible@1.0.0-alpha.9
|
|
996
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.9
|
|
997
|
+
|
|
998
|
+
## 1.0.0-alpha.8
|
|
999
|
+
|
|
1000
|
+
### Patch Changes
|
|
1001
|
+
|
|
1002
|
+
- Updated dependencies
|
|
1003
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.8
|
|
1004
|
+
- @ai-sdk/provider@2.0.0-alpha.8
|
|
1005
|
+
- @ai-sdk/openai-compatible@1.0.0-alpha.8
|
|
1006
|
+
|
|
1007
|
+
## 1.0.0-alpha.7
|
|
1008
|
+
|
|
1009
|
+
### Patch Changes
|
|
1010
|
+
|
|
1011
|
+
- Updated dependencies [5c56081]
|
|
1012
|
+
- @ai-sdk/provider@2.0.0-alpha.7
|
|
1013
|
+
- @ai-sdk/openai-compatible@1.0.0-alpha.7
|
|
1014
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.7
|
|
1015
|
+
|
|
1016
|
+
## 1.0.0-alpha.6
|
|
1017
|
+
|
|
1018
|
+
### Patch Changes
|
|
1019
|
+
|
|
1020
|
+
- Updated dependencies [0d2c085]
|
|
1021
|
+
- @ai-sdk/provider@2.0.0-alpha.6
|
|
1022
|
+
- @ai-sdk/openai-compatible@1.0.0-alpha.6
|
|
1023
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.6
|
|
1024
|
+
|
|
1025
|
+
## 1.0.0-alpha.5
|
|
1026
|
+
|
|
1027
|
+
### Patch Changes
|
|
1028
|
+
|
|
1029
|
+
- 9eb5417: feat (providers/vercel): initial vercel provider
|
|
1030
|
+
|
|
1031
|
+
## 0.0.1
|
|
1032
|
+
|
|
1033
|
+
### Patch Changes
|
|
1034
|
+
|
|
1035
|
+
- 42e37fb: feat (provider/vercel): initial vercel provider
|
package/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2023 Vercel, Inc.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# AI SDK - Vercel Provider
|
|
2
|
+
|
|
3
|
+
The **[Vercel provider](https://ai-sdk.dev/providers/ai-sdk-providers/vercel)** for the [AI SDK](https://ai-sdk.dev/docs)
|
|
4
|
+
gives you access to the v0 API, designed for building modern web applications. The `v0-1.0-md` model supports text and image inputs, provides fast streaming responses, and is compatible with the OpenAI Chat Completions API format.
|
|
5
|
+
|
|
6
|
+
Key features include:
|
|
7
|
+
|
|
8
|
+
- Framework aware completions: Optimized for modern stacks like Next.js and Vercel
|
|
9
|
+
- Auto-fix: Identifies and corrects common coding issues during generation
|
|
10
|
+
- Quick edit: Streams inline edits as they're available
|
|
11
|
+
- Multimodal: Supports both text and image inputs
|
|
12
|
+
|
|
13
|
+
## Setup
|
|
14
|
+
|
|
15
|
+
The Vercel provider is available in the `@ai-sdk/vercel` module. You can install it with
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm i @ai-sdk/vercel
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Provider Instance
|
|
22
|
+
|
|
23
|
+
You can import the default provider instance `vercel` from `@ai-sdk/vercel`:
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { vercel } from '@ai-sdk/vercel';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { vercel } from '@ai-sdk/vercel';
|
|
33
|
+
import { generateText } from 'ai';
|
|
34
|
+
|
|
35
|
+
const { text } = await generateText({
|
|
36
|
+
model: vercel('v0-1.0-md'),
|
|
37
|
+
prompt: 'Create a Next.js app',
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Documentation
|
|
42
|
+
|
|
43
|
+
Please check out the **[Vercel provider documentation](https://ai-sdk.dev/providers/ai-sdk-providers/vercel)** for more information.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ProviderV3, LanguageModelV3 } from '@ai-sdk/provider';
|
|
2
|
+
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
+
export { OpenAICompatibleErrorData as VercelErrorData } from '@ai-sdk/openai-compatible';
|
|
4
|
+
|
|
5
|
+
type VercelChatModelId = 'v0-1.0-md' | 'v0-1.5-md' | 'v0-1.5-lg' | (string & {});
|
|
6
|
+
|
|
7
|
+
interface VercelProviderSettings {
|
|
8
|
+
/**
|
|
9
|
+
Vercel API key.
|
|
10
|
+
*/
|
|
11
|
+
apiKey?: string;
|
|
12
|
+
/**
|
|
13
|
+
Base URL for the API calls.
|
|
14
|
+
*/
|
|
15
|
+
baseURL?: string;
|
|
16
|
+
/**
|
|
17
|
+
Custom headers to include in the requests.
|
|
18
|
+
*/
|
|
19
|
+
headers?: Record<string, string>;
|
|
20
|
+
/**
|
|
21
|
+
Custom fetch implementation. You can use it as a middleware to intercept requests,
|
|
22
|
+
or to provide a custom fetch implementation for e.g. testing.
|
|
23
|
+
*/
|
|
24
|
+
fetch?: FetchFunction;
|
|
25
|
+
}
|
|
26
|
+
interface VercelProvider extends ProviderV3 {
|
|
27
|
+
/**
|
|
28
|
+
Creates a model for text generation.
|
|
29
|
+
*/
|
|
30
|
+
(modelId: VercelChatModelId): LanguageModelV3;
|
|
31
|
+
/**
|
|
32
|
+
Creates a language model for text generation.
|
|
33
|
+
*/
|
|
34
|
+
languageModel(modelId: VercelChatModelId): LanguageModelV3;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use `embeddingModel` instead.
|
|
37
|
+
*/
|
|
38
|
+
textEmbeddingModel(modelId: string): never;
|
|
39
|
+
}
|
|
40
|
+
declare function createVercel(options?: VercelProviderSettings): VercelProvider;
|
|
41
|
+
declare const vercel: VercelProvider;
|
|
42
|
+
|
|
43
|
+
declare const VERSION: string;
|
|
44
|
+
|
|
45
|
+
export { VERSION, type VercelProvider, type VercelProviderSettings, createVercel, vercel };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ProviderV3, LanguageModelV3 } from '@ai-sdk/provider';
|
|
2
|
+
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
+
export { OpenAICompatibleErrorData as VercelErrorData } from '@ai-sdk/openai-compatible';
|
|
4
|
+
|
|
5
|
+
type VercelChatModelId = 'v0-1.0-md' | 'v0-1.5-md' | 'v0-1.5-lg' | (string & {});
|
|
6
|
+
|
|
7
|
+
interface VercelProviderSettings {
|
|
8
|
+
/**
|
|
9
|
+
Vercel API key.
|
|
10
|
+
*/
|
|
11
|
+
apiKey?: string;
|
|
12
|
+
/**
|
|
13
|
+
Base URL for the API calls.
|
|
14
|
+
*/
|
|
15
|
+
baseURL?: string;
|
|
16
|
+
/**
|
|
17
|
+
Custom headers to include in the requests.
|
|
18
|
+
*/
|
|
19
|
+
headers?: Record<string, string>;
|
|
20
|
+
/**
|
|
21
|
+
Custom fetch implementation. You can use it as a middleware to intercept requests,
|
|
22
|
+
or to provide a custom fetch implementation for e.g. testing.
|
|
23
|
+
*/
|
|
24
|
+
fetch?: FetchFunction;
|
|
25
|
+
}
|
|
26
|
+
interface VercelProvider extends ProviderV3 {
|
|
27
|
+
/**
|
|
28
|
+
Creates a model for text generation.
|
|
29
|
+
*/
|
|
30
|
+
(modelId: VercelChatModelId): LanguageModelV3;
|
|
31
|
+
/**
|
|
32
|
+
Creates a language model for text generation.
|
|
33
|
+
*/
|
|
34
|
+
languageModel(modelId: VercelChatModelId): LanguageModelV3;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use `embeddingModel` instead.
|
|
37
|
+
*/
|
|
38
|
+
textEmbeddingModel(modelId: string): never;
|
|
39
|
+
}
|
|
40
|
+
declare function createVercel(options?: VercelProviderSettings): VercelProvider;
|
|
41
|
+
declare const vercel: VercelProvider;
|
|
42
|
+
|
|
43
|
+
declare const VERSION: string;
|
|
44
|
+
|
|
45
|
+
export { VERSION, type VercelProvider, type VercelProviderSettings, createVercel, vercel };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
VERSION: () => VERSION,
|
|
24
|
+
createVercel: () => createVercel,
|
|
25
|
+
vercel: () => vercel
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(src_exports);
|
|
28
|
+
|
|
29
|
+
// src/vercel-provider.ts
|
|
30
|
+
var import_provider = require("@ai-sdk/provider");
|
|
31
|
+
var import_openai_compatible = require("@ai-sdk/openai-compatible");
|
|
32
|
+
var import_provider_utils = require("@ai-sdk/provider-utils");
|
|
33
|
+
|
|
34
|
+
// src/version.ts
|
|
35
|
+
var VERSION = true ? "0.0.0-1c33ba03-20260114162300" : "0.0.0-test";
|
|
36
|
+
|
|
37
|
+
// src/vercel-provider.ts
|
|
38
|
+
function createVercel(options = {}) {
|
|
39
|
+
var _a;
|
|
40
|
+
const baseURL = (0, import_provider_utils.withoutTrailingSlash)(
|
|
41
|
+
(_a = options.baseURL) != null ? _a : "https://api.v0.dev/v1"
|
|
42
|
+
);
|
|
43
|
+
const getHeaders = () => (0, import_provider_utils.withUserAgentSuffix)(
|
|
44
|
+
{
|
|
45
|
+
Authorization: `Bearer ${(0, import_provider_utils.loadApiKey)({
|
|
46
|
+
apiKey: options.apiKey,
|
|
47
|
+
environmentVariableName: "VERCEL_API_KEY",
|
|
48
|
+
description: "Vercel"
|
|
49
|
+
})}`,
|
|
50
|
+
...options.headers
|
|
51
|
+
},
|
|
52
|
+
`ai-sdk/vercel/${VERSION}`
|
|
53
|
+
);
|
|
54
|
+
const getCommonModelConfig = (modelType) => ({
|
|
55
|
+
provider: `vercel.${modelType}`,
|
|
56
|
+
url: ({ path }) => `${baseURL}${path}`,
|
|
57
|
+
headers: getHeaders,
|
|
58
|
+
fetch: options.fetch
|
|
59
|
+
});
|
|
60
|
+
const createChatModel = (modelId) => {
|
|
61
|
+
return new import_openai_compatible.OpenAICompatibleChatLanguageModel(modelId, {
|
|
62
|
+
...getCommonModelConfig("chat")
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
const provider = (modelId) => createChatModel(modelId);
|
|
66
|
+
provider.specificationVersion = "v3";
|
|
67
|
+
provider.languageModel = createChatModel;
|
|
68
|
+
provider.embeddingModel = (modelId) => {
|
|
69
|
+
throw new import_provider.NoSuchModelError({ modelId, modelType: "embeddingModel" });
|
|
70
|
+
};
|
|
71
|
+
provider.textEmbeddingModel = provider.embeddingModel;
|
|
72
|
+
provider.imageModel = (modelId) => {
|
|
73
|
+
throw new import_provider.NoSuchModelError({ modelId, modelType: "imageModel" });
|
|
74
|
+
};
|
|
75
|
+
return provider;
|
|
76
|
+
}
|
|
77
|
+
var vercel = createVercel();
|
|
78
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
+
0 && (module.exports = {
|
|
80
|
+
VERSION,
|
|
81
|
+
createVercel,
|
|
82
|
+
vercel
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/vercel-provider.ts","../src/version.ts"],"sourcesContent":["export { createVercel, vercel } from './vercel-provider';\nexport type { VercelProvider, VercelProviderSettings } from './vercel-provider';\nexport type { OpenAICompatibleErrorData as VercelErrorData } from '@ai-sdk/openai-compatible';\nexport { VERSION } from './version';\n","import {\n LanguageModelV3,\n NoSuchModelError,\n ProviderV3,\n} from '@ai-sdk/provider';\nimport { OpenAICompatibleChatLanguageModel } from '@ai-sdk/openai-compatible';\nimport {\n FetchFunction,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix,\n} from '@ai-sdk/provider-utils';\nimport { VercelChatModelId } from './vercel-chat-options';\nimport { VERSION } from './version';\n\nexport interface VercelProviderSettings {\n /**\nVercel API key.\n*/\n apiKey?: string;\n /**\nBase URL for the API calls.\n*/\n baseURL?: string;\n /**\nCustom headers to include in the requests.\n*/\n headers?: Record<string, string>;\n /**\nCustom fetch implementation. You can use it as a middleware to intercept requests,\nor to provide a custom fetch implementation for e.g. testing.\n*/\n fetch?: FetchFunction;\n}\n\nexport interface VercelProvider extends ProviderV3 {\n /**\nCreates a model for text generation.\n*/\n (modelId: VercelChatModelId): LanguageModelV3;\n\n /**\nCreates a language model for text generation.\n*/\n languageModel(modelId: VercelChatModelId): LanguageModelV3;\n\n /**\n * @deprecated Use `embeddingModel` instead.\n */\n textEmbeddingModel(modelId: string): never;\n}\n\nexport function createVercel(\n options: VercelProviderSettings = {},\n): VercelProvider {\n const baseURL = withoutTrailingSlash(\n options.baseURL ?? 'https://api.v0.dev/v1',\n );\n const getHeaders = () =>\n withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: 'VERCEL_API_KEY',\n description: 'Vercel',\n })}`,\n ...options.headers,\n },\n `ai-sdk/vercel/${VERSION}`,\n );\n\n interface CommonModelConfig {\n provider: string;\n url: ({ path }: { path: string }) => string;\n headers: () => Record<string, string>;\n fetch?: FetchFunction;\n }\n\n const getCommonModelConfig = (modelType: string): CommonModelConfig => ({\n provider: `vercel.${modelType}`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch,\n });\n\n const createChatModel = (modelId: VercelChatModelId) => {\n return new OpenAICompatibleChatLanguageModel(modelId, {\n ...getCommonModelConfig('chat'),\n });\n };\n\n const provider = (modelId: VercelChatModelId) => createChatModel(modelId);\n\n provider.specificationVersion = 'v3' as const;\n provider.languageModel = createChatModel;\n provider.embeddingModel = (modelId: string) => {\n throw new NoSuchModelError({ modelId, modelType: 'embeddingModel' });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId: string) => {\n throw new NoSuchModelError({ modelId, modelType: 'imageModel' });\n };\n\n return provider;\n}\n\nexport const vercel = createVercel();\n","// Version string of this package injected at build time.\ndeclare const __PACKAGE_VERSION__: string | undefined;\nexport const VERSION: string =\n typeof __PACKAGE_VERSION__ !== 'undefined'\n ? __PACKAGE_VERSION__\n : '0.0.0-test';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAIO;AACP,+BAAkD;AAClD,4BAKO;;;ACTA,IAAM,UACX,OACI,kCACA;;;AD+CC,SAAS,aACd,UAAkC,CAAC,GACnB;AAtDlB;AAuDE,QAAM,cAAU;AAAA,KACd,aAAQ,YAAR,YAAmB;AAAA,EACrB;AACA,QAAM,aAAa,UACjB;AAAA,IACE;AAAA,MACE,eAAe,cAAU,kCAAW;AAAA,QAClC,QAAQ,QAAQ;AAAA,QAChB,yBAAyB;AAAA,QACzB,aAAa;AAAA,MACf,CAAC,CAAC;AAAA,MACF,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,iBAAiB,OAAO;AAAA,EAC1B;AASF,QAAM,uBAAuB,CAAC,eAA0C;AAAA,IACtE,UAAU,UAAU,SAAS;AAAA,IAC7B,KAAK,CAAC,EAAE,KAAK,MAAM,GAAG,OAAO,GAAG,IAAI;AAAA,IACpC,SAAS;AAAA,IACT,OAAO,QAAQ;AAAA,EACjB;AAEA,QAAM,kBAAkB,CAAC,YAA+B;AACtD,WAAO,IAAI,2DAAkC,SAAS;AAAA,MACpD,GAAG,qBAAqB,MAAM;AAAA,IAChC,CAAC;AAAA,EACH;AAEA,QAAM,WAAW,CAAC,YAA+B,gBAAgB,OAAO;AAExE,WAAS,uBAAuB;AAChC,WAAS,gBAAgB;AACzB,WAAS,iBAAiB,CAAC,YAAoB;AAC7C,UAAM,IAAI,iCAAiB,EAAE,SAAS,WAAW,iBAAiB,CAAC;AAAA,EACrE;AACA,WAAS,qBAAqB,SAAS;AACvC,WAAS,aAAa,CAAC,YAAoB;AACzC,UAAM,IAAI,iCAAiB,EAAE,SAAS,WAAW,aAAa,CAAC;AAAA,EACjE;AAEA,SAAO;AACT;AAEO,IAAM,SAAS,aAAa;","names":[]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// src/vercel-provider.ts
|
|
2
|
+
import {
|
|
3
|
+
NoSuchModelError
|
|
4
|
+
} from "@ai-sdk/provider";
|
|
5
|
+
import { OpenAICompatibleChatLanguageModel } from "@ai-sdk/openai-compatible";
|
|
6
|
+
import {
|
|
7
|
+
loadApiKey,
|
|
8
|
+
withoutTrailingSlash,
|
|
9
|
+
withUserAgentSuffix
|
|
10
|
+
} from "@ai-sdk/provider-utils";
|
|
11
|
+
|
|
12
|
+
// src/version.ts
|
|
13
|
+
var VERSION = true ? "0.0.0-1c33ba03-20260114162300" : "0.0.0-test";
|
|
14
|
+
|
|
15
|
+
// src/vercel-provider.ts
|
|
16
|
+
function createVercel(options = {}) {
|
|
17
|
+
var _a;
|
|
18
|
+
const baseURL = withoutTrailingSlash(
|
|
19
|
+
(_a = options.baseURL) != null ? _a : "https://api.v0.dev/v1"
|
|
20
|
+
);
|
|
21
|
+
const getHeaders = () => withUserAgentSuffix(
|
|
22
|
+
{
|
|
23
|
+
Authorization: `Bearer ${loadApiKey({
|
|
24
|
+
apiKey: options.apiKey,
|
|
25
|
+
environmentVariableName: "VERCEL_API_KEY",
|
|
26
|
+
description: "Vercel"
|
|
27
|
+
})}`,
|
|
28
|
+
...options.headers
|
|
29
|
+
},
|
|
30
|
+
`ai-sdk/vercel/${VERSION}`
|
|
31
|
+
);
|
|
32
|
+
const getCommonModelConfig = (modelType) => ({
|
|
33
|
+
provider: `vercel.${modelType}`,
|
|
34
|
+
url: ({ path }) => `${baseURL}${path}`,
|
|
35
|
+
headers: getHeaders,
|
|
36
|
+
fetch: options.fetch
|
|
37
|
+
});
|
|
38
|
+
const createChatModel = (modelId) => {
|
|
39
|
+
return new OpenAICompatibleChatLanguageModel(modelId, {
|
|
40
|
+
...getCommonModelConfig("chat")
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const provider = (modelId) => createChatModel(modelId);
|
|
44
|
+
provider.specificationVersion = "v3";
|
|
45
|
+
provider.languageModel = createChatModel;
|
|
46
|
+
provider.embeddingModel = (modelId) => {
|
|
47
|
+
throw new NoSuchModelError({ modelId, modelType: "embeddingModel" });
|
|
48
|
+
};
|
|
49
|
+
provider.textEmbeddingModel = provider.embeddingModel;
|
|
50
|
+
provider.imageModel = (modelId) => {
|
|
51
|
+
throw new NoSuchModelError({ modelId, modelType: "imageModel" });
|
|
52
|
+
};
|
|
53
|
+
return provider;
|
|
54
|
+
}
|
|
55
|
+
var vercel = createVercel();
|
|
56
|
+
export {
|
|
57
|
+
VERSION,
|
|
58
|
+
createVercel,
|
|
59
|
+
vercel
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/vercel-provider.ts","../src/version.ts"],"sourcesContent":["import {\n LanguageModelV3,\n NoSuchModelError,\n ProviderV3,\n} from '@ai-sdk/provider';\nimport { OpenAICompatibleChatLanguageModel } from '@ai-sdk/openai-compatible';\nimport {\n FetchFunction,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix,\n} from '@ai-sdk/provider-utils';\nimport { VercelChatModelId } from './vercel-chat-options';\nimport { VERSION } from './version';\n\nexport interface VercelProviderSettings {\n /**\nVercel API key.\n*/\n apiKey?: string;\n /**\nBase URL for the API calls.\n*/\n baseURL?: string;\n /**\nCustom headers to include in the requests.\n*/\n headers?: Record<string, string>;\n /**\nCustom fetch implementation. You can use it as a middleware to intercept requests,\nor to provide a custom fetch implementation for e.g. testing.\n*/\n fetch?: FetchFunction;\n}\n\nexport interface VercelProvider extends ProviderV3 {\n /**\nCreates a model for text generation.\n*/\n (modelId: VercelChatModelId): LanguageModelV3;\n\n /**\nCreates a language model for text generation.\n*/\n languageModel(modelId: VercelChatModelId): LanguageModelV3;\n\n /**\n * @deprecated Use `embeddingModel` instead.\n */\n textEmbeddingModel(modelId: string): never;\n}\n\nexport function createVercel(\n options: VercelProviderSettings = {},\n): VercelProvider {\n const baseURL = withoutTrailingSlash(\n options.baseURL ?? 'https://api.v0.dev/v1',\n );\n const getHeaders = () =>\n withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: 'VERCEL_API_KEY',\n description: 'Vercel',\n })}`,\n ...options.headers,\n },\n `ai-sdk/vercel/${VERSION}`,\n );\n\n interface CommonModelConfig {\n provider: string;\n url: ({ path }: { path: string }) => string;\n headers: () => Record<string, string>;\n fetch?: FetchFunction;\n }\n\n const getCommonModelConfig = (modelType: string): CommonModelConfig => ({\n provider: `vercel.${modelType}`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch,\n });\n\n const createChatModel = (modelId: VercelChatModelId) => {\n return new OpenAICompatibleChatLanguageModel(modelId, {\n ...getCommonModelConfig('chat'),\n });\n };\n\n const provider = (modelId: VercelChatModelId) => createChatModel(modelId);\n\n provider.specificationVersion = 'v3' as const;\n provider.languageModel = createChatModel;\n provider.embeddingModel = (modelId: string) => {\n throw new NoSuchModelError({ modelId, modelType: 'embeddingModel' });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId: string) => {\n throw new NoSuchModelError({ modelId, modelType: 'imageModel' });\n };\n\n return provider;\n}\n\nexport const vercel = createVercel();\n","// Version string of this package injected at build time.\ndeclare const __PACKAGE_VERSION__: string | undefined;\nexport const VERSION: string =\n typeof __PACKAGE_VERSION__ !== 'undefined'\n ? __PACKAGE_VERSION__\n : '0.0.0-test';\n"],"mappings":";AAAA;AAAA,EAEE;AAAA,OAEK;AACP,SAAS,yCAAyC;AAClD;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACTA,IAAM,UACX,OACI,kCACA;;;AD+CC,SAAS,aACd,UAAkC,CAAC,GACnB;AAtDlB;AAuDE,QAAM,UAAU;AAAA,KACd,aAAQ,YAAR,YAAmB;AAAA,EACrB;AACA,QAAM,aAAa,MACjB;AAAA,IACE;AAAA,MACE,eAAe,UAAU,WAAW;AAAA,QAClC,QAAQ,QAAQ;AAAA,QAChB,yBAAyB;AAAA,QACzB,aAAa;AAAA,MACf,CAAC,CAAC;AAAA,MACF,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,iBAAiB,OAAO;AAAA,EAC1B;AASF,QAAM,uBAAuB,CAAC,eAA0C;AAAA,IACtE,UAAU,UAAU,SAAS;AAAA,IAC7B,KAAK,CAAC,EAAE,KAAK,MAAM,GAAG,OAAO,GAAG,IAAI;AAAA,IACpC,SAAS;AAAA,IACT,OAAO,QAAQ;AAAA,EACjB;AAEA,QAAM,kBAAkB,CAAC,YAA+B;AACtD,WAAO,IAAI,kCAAkC,SAAS;AAAA,MACpD,GAAG,qBAAqB,MAAM;AAAA,IAChC,CAAC;AAAA,EACH;AAEA,QAAM,WAAW,CAAC,YAA+B,gBAAgB,OAAO;AAExE,WAAS,uBAAuB;AAChC,WAAS,gBAAgB;AACzB,WAAS,iBAAiB,CAAC,YAAoB;AAC7C,UAAM,IAAI,iBAAiB,EAAE,SAAS,WAAW,iBAAiB,CAAC;AAAA,EACrE;AACA,WAAS,qBAAqB,SAAS;AACvC,WAAS,aAAa,CAAC,YAAoB;AACzC,UAAM,IAAI,iBAAiB,EAAE,SAAS,WAAW,aAAa,CAAC;AAAA,EACjE;AAEA,SAAO;AACT;AAEO,IAAM,SAAS,aAAa;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ai-sdk/vercel",
|
|
3
|
+
"version": "0.0.0-1c33ba03-20260114162300",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/**/*",
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": "./package.json",
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.mjs",
|
|
19
|
+
"require": "./dist/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@ai-sdk/openai-compatible": "0.0.0-1c33ba03-20260114162300",
|
|
24
|
+
"@ai-sdk/provider-utils": "0.0.0-1c33ba03-20260114162300",
|
|
25
|
+
"@ai-sdk/provider": "3.0.3"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "20.17.24",
|
|
29
|
+
"tsup": "^8",
|
|
30
|
+
"typescript": "5.8.3",
|
|
31
|
+
"zod": "3.25.76",
|
|
32
|
+
"@vercel/ai-tsconfig": "0.0.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"zod": "^3.25.76 || ^4.1.8"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://ai-sdk.dev/docs",
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "git+https://github.com/vercel/ai.git"
|
|
47
|
+
},
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/vercel/ai/issues"
|
|
50
|
+
},
|
|
51
|
+
"keywords": [
|
|
52
|
+
"ai"
|
|
53
|
+
],
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "pnpm clean && tsup --tsconfig tsconfig.build.json",
|
|
56
|
+
"build:watch": "pnpm clean && tsup --watch",
|
|
57
|
+
"clean": "del-cli dist *.tsbuildinfo",
|
|
58
|
+
"lint": "eslint \"./**/*.ts*\"",
|
|
59
|
+
"type-check": "tsc --build",
|
|
60
|
+
"prettier-check": "prettier --check \"./**/*.ts*\"",
|
|
61
|
+
"test": "pnpm test:node && pnpm test:edge",
|
|
62
|
+
"test:update": "pnpm test:node -u",
|
|
63
|
+
"test:watch": "vitest --config vitest.node.config.js",
|
|
64
|
+
"test:edge": "vitest --config vitest.edge.config.js --run",
|
|
65
|
+
"test:node": "vitest --config vitest.node.config.js --run"
|
|
66
|
+
}
|
|
67
|
+
}
|