@ai-sdk/baseten 0.0.0-64aae7dd-20260114144918

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 ADDED
@@ -0,0 +1,680 @@
1
+ # @ai-sdk/baseten
2
+
3
+ ## 0.0.0-64aae7dd-20260114144918
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [9fbe723]
8
+ - @ai-sdk/provider-utils@0.0.0-64aae7dd-20260114144918
9
+ - @ai-sdk/provider@0.0.0-64aae7dd-20260114144918
10
+ - @ai-sdk/openai-compatible@0.0.0-64aae7dd-20260114144918
11
+
12
+ ## 1.0.10
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [bc02a3c]
17
+ - @ai-sdk/openai-compatible@2.0.9
18
+
19
+ ## 1.0.9
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [78fcb18]
24
+ - @ai-sdk/openai-compatible@2.0.8
25
+
26
+ ## 1.0.8
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [cd7bb0e]
31
+ - @ai-sdk/openai-compatible@2.0.7
32
+
33
+ ## 1.0.7
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [34d1c8a]
38
+ - @ai-sdk/provider-utils@4.0.5
39
+ - @ai-sdk/openai-compatible@2.0.6
40
+
41
+ ## 1.0.6
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [d54c380]
46
+ - @ai-sdk/openai-compatible@2.0.5
47
+
48
+ ## 1.0.5
49
+
50
+ ### Patch Changes
51
+
52
+ - Updated dependencies [d937c8f]
53
+ - @ai-sdk/provider@3.0.2
54
+ - @ai-sdk/openai-compatible@2.0.4
55
+ - @ai-sdk/provider-utils@4.0.4
56
+
57
+ ## 1.0.4
58
+
59
+ ### Patch Changes
60
+
61
+ - Updated dependencies [0b429d4]
62
+ - @ai-sdk/provider-utils@4.0.3
63
+ - @ai-sdk/openai-compatible@2.0.3
64
+
65
+ ## 1.0.3
66
+
67
+ ### Patch Changes
68
+
69
+ - 863d34f: fix: trigger release to update `@latest`
70
+ - Updated dependencies [863d34f]
71
+ - @ai-sdk/openai-compatible@2.0.2
72
+ - @ai-sdk/provider@3.0.1
73
+ - @ai-sdk/provider-utils@4.0.2
74
+
75
+ ## 1.0.2
76
+
77
+ ### Patch Changes
78
+
79
+ - Updated dependencies [29264a3]
80
+ - @ai-sdk/provider-utils@4.0.1
81
+ - @ai-sdk/openai-compatible@2.0.1
82
+
83
+ ## 1.0.1
84
+
85
+ ### Patch Changes
86
+
87
+ - c0c8a0e: Add zai/glm-4.7 model support
88
+
89
+ ## 1.0.0
90
+
91
+ ### Major Changes
92
+
93
+ - dee8b05: ai SDK 6 beta
94
+ - 6cc9cd0: Added Baseten as a Provider for AI SDK
95
+
96
+ ### Patch Changes
97
+
98
+ - 0c3b58b: fix(provider): add specificationVersion to ProviderV3
99
+ - ab9af9c: add moonshotai/Kimi-K2-Thinking model ID for Baseten provider
100
+ - 8d9e8ad: chore(provider): remove generics from EmbeddingModelV3
101
+
102
+ Before
103
+
104
+ ```ts
105
+ model.textEmbeddingModel('my-model-id');
106
+ ```
107
+
108
+ After
109
+
110
+ ```ts
111
+ model.embeddingModel('my-model-id');
112
+ ```
113
+
114
+ - 95f65c2: chore: use import \* from zod/v4
115
+ - 0c4822d: feat: `EmbeddingModelV3`
116
+ - ed329cb: feat: `Provider-V3`
117
+ - 1cad0ab: feat: add provider version to user-agent header
118
+ - 916bc46: bumped performance client to 0.0.10
119
+ - 8dac895: feat: `LanguageModelV3`
120
+ - 366f50b: chore(provider): add deprecated textEmbeddingModel and textEmbedding aliases
121
+ - 4616b86: chore: update zod peer depenedency version
122
+ - Updated dependencies
123
+ - @ai-sdk/openai-compatible@2.0.0
124
+ - @ai-sdk/provider@3.0.0
125
+ - @ai-sdk/provider-utils@4.0.0
126
+
127
+ ## 1.0.0-beta.62
128
+
129
+ ### Patch Changes
130
+
131
+ - Updated dependencies [475189e]
132
+ - @ai-sdk/provider@3.0.0-beta.32
133
+ - @ai-sdk/openai-compatible@2.0.0-beta.60
134
+ - @ai-sdk/provider-utils@4.0.0-beta.59
135
+
136
+ ## 1.0.0-beta.61
137
+
138
+ ### Patch Changes
139
+
140
+ - Updated dependencies [2625a04]
141
+ - @ai-sdk/openai-compatible@2.0.0-beta.59
142
+ - @ai-sdk/provider@3.0.0-beta.31
143
+ - @ai-sdk/provider-utils@4.0.0-beta.58
144
+
145
+ ## 1.0.0-beta.60
146
+
147
+ ### Patch Changes
148
+
149
+ - Updated dependencies [cbf52cd]
150
+ - @ai-sdk/openai-compatible@2.0.0-beta.58
151
+ - @ai-sdk/provider@3.0.0-beta.30
152
+ - @ai-sdk/provider-utils@4.0.0-beta.57
153
+
154
+ ## 1.0.0-beta.59
155
+
156
+ ### Patch Changes
157
+
158
+ - Updated dependencies [9549c9e]
159
+ - @ai-sdk/provider@3.0.0-beta.29
160
+ - @ai-sdk/openai-compatible@2.0.0-beta.57
161
+ - @ai-sdk/provider-utils@4.0.0-beta.56
162
+
163
+ ## 1.0.0-beta.58
164
+
165
+ ### Patch Changes
166
+
167
+ - Updated dependencies [50b70d6]
168
+ - @ai-sdk/provider-utils@4.0.0-beta.55
169
+ - @ai-sdk/openai-compatible@2.0.0-beta.56
170
+
171
+ ## 1.0.0-beta.57
172
+
173
+ ### Patch Changes
174
+
175
+ - Updated dependencies [9061dc0]
176
+ - @ai-sdk/openai-compatible@2.0.0-beta.55
177
+ - @ai-sdk/provider-utils@4.0.0-beta.54
178
+ - @ai-sdk/provider@3.0.0-beta.28
179
+
180
+ ## 1.0.0-beta.56
181
+
182
+ ### Patch Changes
183
+
184
+ - 366f50b: chore(provider): add deprecated textEmbeddingModel and textEmbedding aliases
185
+ - Updated dependencies [366f50b]
186
+ - @ai-sdk/openai-compatible@2.0.0-beta.54
187
+ - @ai-sdk/provider@3.0.0-beta.27
188
+ - @ai-sdk/provider-utils@4.0.0-beta.53
189
+
190
+ ## 1.0.0-beta.55
191
+
192
+ ### Patch Changes
193
+
194
+ - Updated dependencies [763d04a]
195
+ - @ai-sdk/provider-utils@4.0.0-beta.52
196
+ - @ai-sdk/openai-compatible@2.0.0-beta.53
197
+
198
+ ## 1.0.0-beta.54
199
+
200
+ ### Patch Changes
201
+
202
+ - Updated dependencies [c1efac4]
203
+ - @ai-sdk/provider-utils@4.0.0-beta.51
204
+ - @ai-sdk/openai-compatible@2.0.0-beta.52
205
+
206
+ ## 1.0.0-beta.53
207
+
208
+ ### Patch Changes
209
+
210
+ - Updated dependencies [32223c8]
211
+ - @ai-sdk/provider-utils@4.0.0-beta.50
212
+ - @ai-sdk/openai-compatible@2.0.0-beta.51
213
+
214
+ ## 1.0.0-beta.52
215
+
216
+ ### Patch Changes
217
+
218
+ - Updated dependencies [83e5744]
219
+ - @ai-sdk/provider-utils@4.0.0-beta.49
220
+ - @ai-sdk/openai-compatible@2.0.0-beta.50
221
+
222
+ ## 1.0.0-beta.51
223
+
224
+ ### Patch Changes
225
+
226
+ - Updated dependencies [960ec8f]
227
+ - @ai-sdk/provider-utils@4.0.0-beta.48
228
+ - @ai-sdk/openai-compatible@2.0.0-beta.49
229
+
230
+ ## 1.0.0-beta.50
231
+
232
+ ### Patch Changes
233
+
234
+ - Updated dependencies [e9e157f]
235
+ - @ai-sdk/provider-utils@4.0.0-beta.47
236
+ - @ai-sdk/openai-compatible@2.0.0-beta.48
237
+
238
+ ## 1.0.0-beta.49
239
+
240
+ ### Patch Changes
241
+
242
+ - Updated dependencies [81e29ab]
243
+ - @ai-sdk/provider-utils@4.0.0-beta.46
244
+ - @ai-sdk/openai-compatible@2.0.0-beta.47
245
+
246
+ ## 1.0.0-beta.48
247
+
248
+ ### Patch Changes
249
+
250
+ - Updated dependencies [3bd2689]
251
+ - @ai-sdk/openai-compatible@2.0.0-beta.46
252
+ - @ai-sdk/provider@3.0.0-beta.26
253
+ - @ai-sdk/provider-utils@4.0.0-beta.45
254
+
255
+ ## 1.0.0-beta.47
256
+
257
+ ### Patch Changes
258
+
259
+ - Updated dependencies [53f3368]
260
+ - @ai-sdk/provider@3.0.0-beta.25
261
+ - @ai-sdk/openai-compatible@2.0.0-beta.45
262
+ - @ai-sdk/provider-utils@4.0.0-beta.44
263
+
264
+ ## 1.0.0-beta.46
265
+
266
+ ### Patch Changes
267
+
268
+ - Updated dependencies [dce03c4]
269
+ - @ai-sdk/provider-utils@4.0.0-beta.43
270
+ - @ai-sdk/provider@3.0.0-beta.24
271
+ - @ai-sdk/openai-compatible@2.0.0-beta.44
272
+
273
+ ## 1.0.0-beta.45
274
+
275
+ ### Patch Changes
276
+
277
+ - Updated dependencies [3ed5519]
278
+ - @ai-sdk/provider-utils@4.0.0-beta.42
279
+ - @ai-sdk/openai-compatible@2.0.0-beta.43
280
+
281
+ ## 1.0.0-beta.44
282
+
283
+ ### Patch Changes
284
+
285
+ - Updated dependencies [1bd7d32]
286
+ - @ai-sdk/openai-compatible@2.0.0-beta.42
287
+ - @ai-sdk/provider-utils@4.0.0-beta.41
288
+ - @ai-sdk/provider@3.0.0-beta.23
289
+
290
+ ## 1.0.0-beta.43
291
+
292
+ ### Patch Changes
293
+
294
+ - Updated dependencies [544d4e8]
295
+ - @ai-sdk/openai-compatible@2.0.0-beta.41
296
+ - @ai-sdk/provider-utils@4.0.0-beta.40
297
+ - @ai-sdk/provider@3.0.0-beta.22
298
+
299
+ ## 1.0.0-beta.42
300
+
301
+ ### Patch Changes
302
+
303
+ - Updated dependencies [954c356]
304
+ - @ai-sdk/provider-utils@4.0.0-beta.39
305
+ - @ai-sdk/provider@3.0.0-beta.21
306
+ - @ai-sdk/openai-compatible@2.0.0-beta.40
307
+
308
+ ## 1.0.0-beta.41
309
+
310
+ ### Patch Changes
311
+
312
+ - Updated dependencies [03849b0]
313
+ - @ai-sdk/provider-utils@4.0.0-beta.38
314
+ - @ai-sdk/openai-compatible@2.0.0-beta.39
315
+
316
+ ## 1.0.0-beta.40
317
+
318
+ ### Patch Changes
319
+
320
+ - Updated dependencies [457318b]
321
+ - @ai-sdk/openai-compatible@2.0.0-beta.38
322
+ - @ai-sdk/provider@3.0.0-beta.20
323
+ - @ai-sdk/provider-utils@4.0.0-beta.37
324
+
325
+ ## 1.0.0-beta.39
326
+
327
+ ### Patch Changes
328
+
329
+ - 8d9e8ad: chore(provider): remove generics from EmbeddingModelV3
330
+
331
+ Before
332
+
333
+ ```ts
334
+ model.textEmbeddingModel('my-model-id');
335
+ ```
336
+
337
+ After
338
+
339
+ ```ts
340
+ model.embeddingModel('my-model-id');
341
+ ```
342
+
343
+ - Updated dependencies [8d9e8ad]
344
+ - @ai-sdk/openai-compatible@2.0.0-beta.37
345
+ - @ai-sdk/provider@3.0.0-beta.19
346
+ - @ai-sdk/provider-utils@4.0.0-beta.36
347
+
348
+ ## 1.0.0-beta.38
349
+
350
+ ### Patch Changes
351
+
352
+ - Updated dependencies [10d819b]
353
+ - @ai-sdk/provider@3.0.0-beta.18
354
+ - @ai-sdk/openai-compatible@2.0.0-beta.36
355
+ - @ai-sdk/provider-utils@4.0.0-beta.35
356
+
357
+ ## 1.0.0-beta.37
358
+
359
+ ### Patch Changes
360
+
361
+ - Updated dependencies [db913bd]
362
+ - @ai-sdk/provider@3.0.0-beta.17
363
+ - @ai-sdk/openai-compatible@2.0.0-beta.35
364
+ - @ai-sdk/provider-utils@4.0.0-beta.34
365
+
366
+ ## 1.0.0-beta.36
367
+
368
+ ### Patch Changes
369
+
370
+ - ab9af9c: add moonshotai/Kimi-K2-Thinking model ID for Baseten provider
371
+
372
+ ## 1.0.0-beta.35
373
+
374
+ ### Patch Changes
375
+
376
+ - Updated dependencies [b681d7d]
377
+ - @ai-sdk/provider@3.0.0-beta.16
378
+ - @ai-sdk/openai-compatible@2.0.0-beta.34
379
+ - @ai-sdk/provider-utils@4.0.0-beta.33
380
+
381
+ ## 1.0.0-beta.34
382
+
383
+ ### Patch Changes
384
+
385
+ - Updated dependencies [32d8dbb]
386
+ - @ai-sdk/provider-utils@4.0.0-beta.32
387
+ - @ai-sdk/openai-compatible@2.0.0-beta.33
388
+
389
+ ## 1.0.0-beta.33
390
+
391
+ ### Patch Changes
392
+
393
+ - Updated dependencies [bb36798]
394
+ - @ai-sdk/provider@3.0.0-beta.15
395
+ - @ai-sdk/openai-compatible@2.0.0-beta.32
396
+ - @ai-sdk/provider-utils@4.0.0-beta.31
397
+
398
+ ## 1.0.0-beta.32
399
+
400
+ ### Patch Changes
401
+
402
+ - Updated dependencies [4f16c37]
403
+ - @ai-sdk/provider-utils@4.0.0-beta.30
404
+ - @ai-sdk/openai-compatible@2.0.0-beta.31
405
+
406
+ ## 1.0.0-beta.31
407
+
408
+ ### Patch Changes
409
+
410
+ - Updated dependencies [af3780b]
411
+ - @ai-sdk/provider@3.0.0-beta.14
412
+ - @ai-sdk/openai-compatible@2.0.0-beta.30
413
+ - @ai-sdk/provider-utils@4.0.0-beta.29
414
+
415
+ ## 1.0.0-beta.30
416
+
417
+ ### Patch Changes
418
+
419
+ - Updated dependencies [016b111]
420
+ - @ai-sdk/provider-utils@4.0.0-beta.28
421
+ - @ai-sdk/openai-compatible@2.0.0-beta.29
422
+
423
+ ## 1.0.0-beta.29
424
+
425
+ ### Patch Changes
426
+
427
+ - Updated dependencies [37c58a0]
428
+ - @ai-sdk/provider@3.0.0-beta.13
429
+ - @ai-sdk/openai-compatible@2.0.0-beta.28
430
+ - @ai-sdk/provider-utils@4.0.0-beta.27
431
+
432
+ ## 1.0.0-beta.28
433
+
434
+ ### Patch Changes
435
+
436
+ - Updated dependencies [d1bdadb]
437
+ - @ai-sdk/provider@3.0.0-beta.12
438
+ - @ai-sdk/openai-compatible@2.0.0-beta.27
439
+ - @ai-sdk/provider-utils@4.0.0-beta.26
440
+
441
+ ## 1.0.0-beta.27
442
+
443
+ ### Patch Changes
444
+
445
+ - Updated dependencies [4c44a5b]
446
+ - @ai-sdk/provider@3.0.0-beta.11
447
+ - @ai-sdk/openai-compatible@2.0.0-beta.26
448
+ - @ai-sdk/provider-utils@4.0.0-beta.25
449
+
450
+ ## 1.0.0-beta.26
451
+
452
+ ### Patch Changes
453
+
454
+ - 0c3b58b: fix(provider): add specificationVersion to ProviderV3
455
+ - Updated dependencies [0c3b58b]
456
+ - @ai-sdk/openai-compatible@2.0.0-beta.25
457
+ - @ai-sdk/provider@3.0.0-beta.10
458
+ - @ai-sdk/provider-utils@4.0.0-beta.24
459
+
460
+ ## 1.0.0-beta.25
461
+
462
+ ### Patch Changes
463
+
464
+ - Updated dependencies [a755db5]
465
+ - @ai-sdk/provider@3.0.0-beta.9
466
+ - @ai-sdk/openai-compatible@2.0.0-beta.24
467
+ - @ai-sdk/provider-utils@4.0.0-beta.23
468
+
469
+ ## 1.0.0-beta.24
470
+
471
+ ### Patch Changes
472
+
473
+ - Updated dependencies [58920e0]
474
+ - @ai-sdk/provider-utils@4.0.0-beta.22
475
+ - @ai-sdk/openai-compatible@2.0.0-beta.23
476
+
477
+ ## 1.0.0-beta.23
478
+
479
+ ### Patch Changes
480
+
481
+ - Updated dependencies [293a6b7]
482
+ - @ai-sdk/provider-utils@4.0.0-beta.21
483
+ - @ai-sdk/openai-compatible@2.0.0-beta.22
484
+
485
+ ## 1.0.0-beta.22
486
+
487
+ ### Patch Changes
488
+
489
+ - Updated dependencies [fca786b]
490
+ - @ai-sdk/provider-utils@4.0.0-beta.20
491
+ - @ai-sdk/openai-compatible@2.0.0-beta.21
492
+
493
+ ## 1.0.0-beta.21
494
+
495
+ ### Patch Changes
496
+
497
+ - Updated dependencies [3794514]
498
+ - @ai-sdk/provider-utils@4.0.0-beta.19
499
+ - @ai-sdk/provider@3.0.0-beta.8
500
+ - @ai-sdk/openai-compatible@2.0.0-beta.20
501
+
502
+ ## 1.0.0-beta.20
503
+
504
+ ### Patch Changes
505
+
506
+ - Updated dependencies [81d4308]
507
+ - @ai-sdk/provider@3.0.0-beta.7
508
+ - @ai-sdk/openai-compatible@2.0.0-beta.19
509
+ - @ai-sdk/provider-utils@4.0.0-beta.18
510
+
511
+ ## 1.0.0-beta.19
512
+
513
+ ### Patch Changes
514
+
515
+ - Updated dependencies [703459a]
516
+ - @ai-sdk/provider-utils@4.0.0-beta.17
517
+ - @ai-sdk/openai-compatible@2.0.0-beta.18
518
+
519
+ ## 1.0.0-beta.18
520
+
521
+ ### Patch Changes
522
+
523
+ - Updated dependencies [b689220]
524
+ - @ai-sdk/openai-compatible@2.0.0-beta.17
525
+
526
+ ## 1.0.0-beta.17
527
+
528
+ ### Patch Changes
529
+
530
+ - Updated dependencies [6306603]
531
+ - @ai-sdk/provider-utils@4.0.0-beta.16
532
+ - @ai-sdk/openai-compatible@2.0.0-beta.16
533
+
534
+ ## 1.0.0-beta.16
535
+
536
+ ### Patch Changes
537
+
538
+ - Updated dependencies [f0b2157]
539
+ - @ai-sdk/provider-utils@4.0.0-beta.15
540
+ - @ai-sdk/openai-compatible@2.0.0-beta.15
541
+
542
+ ## 1.0.0-beta.15
543
+
544
+ ### Patch Changes
545
+
546
+ - Updated dependencies [3b1d015]
547
+ - @ai-sdk/provider-utils@4.0.0-beta.14
548
+ - @ai-sdk/openai-compatible@2.0.0-beta.14
549
+
550
+ ## 1.0.0-beta.14
551
+
552
+ ### Patch Changes
553
+
554
+ - Updated dependencies [d116b4b]
555
+ - @ai-sdk/provider-utils@4.0.0-beta.13
556
+ - @ai-sdk/openai-compatible@2.0.0-beta.13
557
+
558
+ ## 1.0.0-beta.13
559
+
560
+ ### Patch Changes
561
+
562
+ - Updated dependencies [7e32fea]
563
+ - @ai-sdk/provider-utils@4.0.0-beta.12
564
+ - @ai-sdk/openai-compatible@2.0.0-beta.12
565
+
566
+ ## 1.0.0-beta.12
567
+
568
+ ### Patch Changes
569
+
570
+ - 95f65c2: chore: use import \* from zod/v4
571
+ - Updated dependencies
572
+ - @ai-sdk/openai-compatible@2.0.0-beta.11
573
+ - @ai-sdk/provider-utils@4.0.0-beta.11
574
+
575
+ ## 1.0.0-beta.11
576
+
577
+ ### Major Changes
578
+
579
+ - dee8b05: ai SDK 6 beta
580
+
581
+ ### Patch Changes
582
+
583
+ - Updated dependencies [dee8b05]
584
+ - @ai-sdk/openai-compatible@2.0.0-beta.10
585
+ - @ai-sdk/provider@3.0.0-beta.6
586
+ - @ai-sdk/provider-utils@4.0.0-beta.10
587
+
588
+ ## 1.0.0-beta.10
589
+
590
+ ### Patch Changes
591
+
592
+ - Updated dependencies [521c537]
593
+ - @ai-sdk/provider-utils@3.1.0-beta.9
594
+ - @ai-sdk/openai-compatible@1.1.0-beta.9
595
+
596
+ ## 1.0.0-beta.9
597
+
598
+ ### Patch Changes
599
+
600
+ - Updated dependencies [e06565c]
601
+ - @ai-sdk/provider-utils@3.1.0-beta.8
602
+ - @ai-sdk/openai-compatible@1.1.0-beta.8
603
+
604
+ ## 1.0.0-beta.8
605
+
606
+ ### Patch Changes
607
+
608
+ - Updated dependencies
609
+ - @ai-sdk/provider@2.1.0-beta.5
610
+ - @ai-sdk/openai-compatible@1.1.0-beta.7
611
+ - @ai-sdk/provider-utils@3.1.0-beta.7
612
+
613
+ ## 1.0.0-beta.7
614
+
615
+ ### Patch Changes
616
+
617
+ - Updated dependencies
618
+ - @ai-sdk/openai-compatible@1.1.0-beta.6
619
+ - @ai-sdk/provider-utils@3.1.0-beta.6
620
+ - @ai-sdk/provider@2.1.0-beta.4
621
+
622
+ ## 1.0.0-beta.6
623
+
624
+ ### Patch Changes
625
+
626
+ - 916bc46: bumped performance client to 0.0.10
627
+
628
+ ## 1.0.0-beta.5
629
+
630
+ ### Patch Changes
631
+
632
+ - 8dac895: feat: `LanguageModelV3`
633
+ - Updated dependencies
634
+ - @ai-sdk/openai-compatible@1.1.0-beta.5
635
+ - @ai-sdk/provider-utils@3.1.0-beta.5
636
+ - @ai-sdk/provider@2.1.0-beta.3
637
+
638
+ ## 1.0.0-beta.4
639
+
640
+ ### Patch Changes
641
+
642
+ - 4616b86: chore: update zod peer depenedency version
643
+ - Updated dependencies [4616b86]
644
+ - @ai-sdk/openai-compatible@1.1.0-beta.4
645
+ - @ai-sdk/provider-utils@3.1.0-beta.4
646
+
647
+ ## 1.0.0-beta.3
648
+
649
+ ### Patch Changes
650
+
651
+ - ed329cb: feat: `Provider-V3`
652
+ - Updated dependencies
653
+ - @ai-sdk/openai-compatible@1.1.0-beta.3
654
+ - @ai-sdk/provider@2.1.0-beta.2
655
+ - @ai-sdk/provider-utils@3.1.0-beta.3
656
+
657
+ ## 1.0.0-beta.2
658
+
659
+ ### Patch Changes
660
+
661
+ - 0c4822d: feat: `EmbeddingModelV3`
662
+ - 1cad0ab: feat: add provider version to user-agent header
663
+ - Updated dependencies [0c4822d]
664
+ - @ai-sdk/openai-compatible@1.1.0-beta.2
665
+ - @ai-sdk/provider@2.1.0-beta.1
666
+ - @ai-sdk/provider-utils@3.1.0-beta.2
667
+
668
+ ## 1.0.0-beta.1
669
+
670
+ ### Patch Changes
671
+
672
+ - Updated dependencies [cbb1d35]
673
+ - @ai-sdk/provider-utils@3.1.0-beta.1
674
+ - @ai-sdk/openai-compatible@1.1.0-beta.1
675
+
676
+ ## 1.0.0-beta.0
677
+
678
+ ### Major Changes
679
+
680
+ - 6cc9cd0: Added Baseten as a Provider for AI SDK
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,35 @@
1
+ # AI SDK - Baseten Provider
2
+
3
+ The **[Baseten provider](https://ai-sdk.dev/providers/ai-sdk-providers/baseten)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model and embedding model support for the [Baseten](https://baseten.co) platform.
4
+
5
+ ## Setup
6
+
7
+ The Baseten provider is available in the `@ai-sdk/baseten` module. You can install it with
8
+
9
+ ```bash
10
+ npm i @ai-sdk/baseten
11
+ ```
12
+
13
+ ## Provider Instance
14
+
15
+ You can import the default provider instance `baseten` from `@ai-sdk/baseten`:
16
+
17
+ ```ts
18
+ import { baseten } from '@ai-sdk/baseten';
19
+ ```
20
+
21
+ ## Language Model Example (Model APIs)
22
+
23
+ ```ts
24
+ import { baseten } from '@ai-sdk/baseten';
25
+ import { generateText } from 'ai';
26
+
27
+ const { text } = await generateText({
28
+ model: baseten('deepseek-ai/DeepSeek-V3-0324'),
29
+ prompt: 'What is the meaning of life?',
30
+ });
31
+ ```
32
+
33
+ ## Documentation
34
+
35
+ Please check out the **[Baseten provider](https://ai-sdk.dev/providers/ai-sdk-providers/baseten)** for more information.
@@ -0,0 +1,65 @@
1
+ import { ProviderV3, LanguageModelV3, EmbeddingModelV3 } from '@ai-sdk/provider';
2
+ import { FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { z } from 'zod/v4';
4
+
5
+ type BasetenChatModelId = 'deepseek-ai/DeepSeek-R1-0528' | 'deepseek-ai/DeepSeek-V3-0324' | 'deepseek-ai/DeepSeek-V3.1' | 'moonshotai/Kimi-K2-Instruct-0905' | 'moonshotai/Kimi-K2-Thinking' | 'Qwen/Qwen3-235B-A22B-Instruct-2507' | 'Qwen/Qwen3-Coder-480B-A35B-Instruct' | 'openai/gpt-oss-120b' | 'zai-org/GLM-4.6' | 'zai-org/GLM-4.7' | (string & {});
6
+
7
+ type BasetenEmbeddingModelId = string & {};
8
+
9
+ type BasetenErrorData = z.infer<typeof basetenErrorSchema>;
10
+ declare const basetenErrorSchema: z.ZodObject<{
11
+ error: z.ZodString;
12
+ }, z.core.$strip>;
13
+ interface BasetenProviderSettings {
14
+ /**
15
+ * Baseten API key. Default value is taken from the `BASETEN_API_KEY`
16
+ * environment variable.
17
+ */
18
+ apiKey?: string;
19
+ /**
20
+ * Base URL for the Model APIs. Default: 'https://inference.baseten.co/v1'
21
+ */
22
+ baseURL?: string;
23
+ /**
24
+ * Model URL for custom models (chat or embeddings).
25
+ * If not supplied, the default Model APIs will be used.
26
+ */
27
+ modelURL?: string;
28
+ /**
29
+ * Custom headers to include in the requests.
30
+ */
31
+ headers?: Record<string, string>;
32
+ /**
33
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
34
+ * or to provide a custom fetch implementation for e.g. testing.
35
+ */
36
+ fetch?: FetchFunction;
37
+ }
38
+ interface BasetenProvider extends ProviderV3 {
39
+ /**
40
+ Creates a chat model for text generation.
41
+ */
42
+ (modelId?: BasetenChatModelId): LanguageModelV3;
43
+ /**
44
+ Creates a chat model for text generation.
45
+ */
46
+ chatModel(modelId?: BasetenChatModelId): LanguageModelV3;
47
+ /**
48
+ Creates a language model for text generation. Alias for chatModel.
49
+ */
50
+ languageModel(modelId?: BasetenChatModelId): LanguageModelV3;
51
+ /**
52
+ Creates a embedding model for text generation.
53
+ */
54
+ embeddingModel(modelId?: BasetenEmbeddingModelId): EmbeddingModelV3;
55
+ /**
56
+ * @deprecated Use `embeddingModel` instead.
57
+ */
58
+ textEmbeddingModel(modelId?: BasetenEmbeddingModelId): EmbeddingModelV3;
59
+ }
60
+ declare function createBaseten(options?: BasetenProviderSettings): BasetenProvider;
61
+ declare const baseten: BasetenProvider;
62
+
63
+ declare const VERSION: string;
64
+
65
+ export { type BasetenChatModelId, type BasetenErrorData, type BasetenProvider, type BasetenProviderSettings, VERSION, baseten, createBaseten };
@@ -0,0 +1,65 @@
1
+ import { ProviderV3, LanguageModelV3, EmbeddingModelV3 } from '@ai-sdk/provider';
2
+ import { FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { z } from 'zod/v4';
4
+
5
+ type BasetenChatModelId = 'deepseek-ai/DeepSeek-R1-0528' | 'deepseek-ai/DeepSeek-V3-0324' | 'deepseek-ai/DeepSeek-V3.1' | 'moonshotai/Kimi-K2-Instruct-0905' | 'moonshotai/Kimi-K2-Thinking' | 'Qwen/Qwen3-235B-A22B-Instruct-2507' | 'Qwen/Qwen3-Coder-480B-A35B-Instruct' | 'openai/gpt-oss-120b' | 'zai-org/GLM-4.6' | 'zai-org/GLM-4.7' | (string & {});
6
+
7
+ type BasetenEmbeddingModelId = string & {};
8
+
9
+ type BasetenErrorData = z.infer<typeof basetenErrorSchema>;
10
+ declare const basetenErrorSchema: z.ZodObject<{
11
+ error: z.ZodString;
12
+ }, z.core.$strip>;
13
+ interface BasetenProviderSettings {
14
+ /**
15
+ * Baseten API key. Default value is taken from the `BASETEN_API_KEY`
16
+ * environment variable.
17
+ */
18
+ apiKey?: string;
19
+ /**
20
+ * Base URL for the Model APIs. Default: 'https://inference.baseten.co/v1'
21
+ */
22
+ baseURL?: string;
23
+ /**
24
+ * Model URL for custom models (chat or embeddings).
25
+ * If not supplied, the default Model APIs will be used.
26
+ */
27
+ modelURL?: string;
28
+ /**
29
+ * Custom headers to include in the requests.
30
+ */
31
+ headers?: Record<string, string>;
32
+ /**
33
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
34
+ * or to provide a custom fetch implementation for e.g. testing.
35
+ */
36
+ fetch?: FetchFunction;
37
+ }
38
+ interface BasetenProvider extends ProviderV3 {
39
+ /**
40
+ Creates a chat model for text generation.
41
+ */
42
+ (modelId?: BasetenChatModelId): LanguageModelV3;
43
+ /**
44
+ Creates a chat model for text generation.
45
+ */
46
+ chatModel(modelId?: BasetenChatModelId): LanguageModelV3;
47
+ /**
48
+ Creates a language model for text generation. Alias for chatModel.
49
+ */
50
+ languageModel(modelId?: BasetenChatModelId): LanguageModelV3;
51
+ /**
52
+ Creates a embedding model for text generation.
53
+ */
54
+ embeddingModel(modelId?: BasetenEmbeddingModelId): EmbeddingModelV3;
55
+ /**
56
+ * @deprecated Use `embeddingModel` instead.
57
+ */
58
+ textEmbeddingModel(modelId?: BasetenEmbeddingModelId): EmbeddingModelV3;
59
+ }
60
+ declare function createBaseten(options?: BasetenProviderSettings): BasetenProvider;
61
+ declare const baseten: BasetenProvider;
62
+
63
+ declare const VERSION: string;
64
+
65
+ export { type BasetenChatModelId, type BasetenErrorData, type BasetenProvider, type BasetenProviderSettings, VERSION, baseten, createBaseten };
package/dist/index.js ADDED
@@ -0,0 +1,160 @@
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
+ baseten: () => baseten,
25
+ createBaseten: () => createBaseten
26
+ });
27
+ module.exports = __toCommonJS(src_exports);
28
+
29
+ // src/baseten-provider.ts
30
+ var import_openai_compatible = require("@ai-sdk/openai-compatible");
31
+ var import_provider = require("@ai-sdk/provider");
32
+ var import_provider_utils = require("@ai-sdk/provider-utils");
33
+ var import_v4 = require("zod/v4");
34
+ var import_performance_client = require("@basetenlabs/performance-client");
35
+
36
+ // src/version.ts
37
+ var VERSION = true ? "0.0.0-64aae7dd-20260114144918" : "0.0.0-test";
38
+
39
+ // src/baseten-provider.ts
40
+ var basetenErrorSchema = import_v4.z.object({
41
+ error: import_v4.z.string()
42
+ });
43
+ var basetenErrorStructure = {
44
+ errorSchema: basetenErrorSchema,
45
+ errorToMessage: (data) => data.error
46
+ };
47
+ var defaultBaseURL = "https://inference.baseten.co/v1";
48
+ function createBaseten(options = {}) {
49
+ var _a;
50
+ const baseURL = (0, import_provider_utils.withoutTrailingSlash)((_a = options.baseURL) != null ? _a : defaultBaseURL);
51
+ const getHeaders = () => (0, import_provider_utils.withUserAgentSuffix)(
52
+ {
53
+ Authorization: `Bearer ${(0, import_provider_utils.loadApiKey)({
54
+ apiKey: options.apiKey,
55
+ environmentVariableName: "BASETEN_API_KEY",
56
+ description: "Baseten API key"
57
+ })}`,
58
+ ...options.headers
59
+ },
60
+ `ai-sdk/baseten/${VERSION}`
61
+ );
62
+ const getCommonModelConfig = (modelType, customURL) => ({
63
+ provider: `baseten.${modelType}`,
64
+ url: ({ path }) => {
65
+ if (modelType === "embedding" && (customURL == null ? void 0 : customURL.includes("/sync")) && !(customURL == null ? void 0 : customURL.includes("/sync/v1"))) {
66
+ return `${customURL}/v1${path}`;
67
+ }
68
+ return `${customURL || baseURL}${path}`;
69
+ },
70
+ headers: getHeaders,
71
+ fetch: options.fetch
72
+ });
73
+ const createChatModel = (modelId) => {
74
+ const customURL = options.modelURL;
75
+ if (customURL) {
76
+ const isOpenAICompatible = customURL.includes("/sync/v1");
77
+ if (isOpenAICompatible) {
78
+ return new import_openai_compatible.OpenAICompatibleChatLanguageModel(modelId != null ? modelId : "placeholder", {
79
+ ...getCommonModelConfig("chat", customURL),
80
+ errorStructure: basetenErrorStructure
81
+ });
82
+ } else if (customURL.includes("/predict")) {
83
+ throw new Error(
84
+ "Not supported. You must use a /sync/v1 endpoint for chat models."
85
+ );
86
+ }
87
+ }
88
+ return new import_openai_compatible.OpenAICompatibleChatLanguageModel(modelId != null ? modelId : "chat", {
89
+ ...getCommonModelConfig("chat"),
90
+ errorStructure: basetenErrorStructure
91
+ });
92
+ };
93
+ const createEmbeddingModel = (modelId) => {
94
+ const customURL = options.modelURL;
95
+ if (!customURL) {
96
+ throw new Error(
97
+ "No model URL provided for embeddings. Please set modelURL option for embeddings."
98
+ );
99
+ }
100
+ const isOpenAICompatible = customURL.includes("/sync");
101
+ if (isOpenAICompatible) {
102
+ const model = new import_openai_compatible.OpenAICompatibleEmbeddingModel(
103
+ modelId != null ? modelId : "embeddings",
104
+ {
105
+ ...getCommonModelConfig("embedding", customURL),
106
+ errorStructure: basetenErrorStructure
107
+ }
108
+ );
109
+ const performanceClientURL = customURL.replace("/sync/v1", "/sync");
110
+ const performanceClient = new import_performance_client.PerformanceClient(
111
+ performanceClientURL,
112
+ (0, import_provider_utils.loadApiKey)({
113
+ apiKey: options.apiKey,
114
+ environmentVariableName: "BASETEN_API_KEY",
115
+ description: "Baseten API key"
116
+ })
117
+ );
118
+ model.doEmbed = async (params) => {
119
+ if (!params.values || !Array.isArray(params.values)) {
120
+ throw new Error("params.values must be an array of strings");
121
+ }
122
+ const response = await performanceClient.embed(
123
+ params.values,
124
+ modelId != null ? modelId : "embeddings"
125
+ // model_id is for Model APIs, we don't use it here for dedicated
126
+ );
127
+ const embeddings = response.data.map((item) => item.embedding);
128
+ return {
129
+ embeddings,
130
+ usage: response.usage ? { tokens: response.usage.total_tokens } : void 0,
131
+ response: { headers: {}, body: response },
132
+ warnings: []
133
+ };
134
+ };
135
+ return model;
136
+ } else {
137
+ throw new Error(
138
+ "Not supported. You must use a /sync or /sync/v1 endpoint for embeddings."
139
+ );
140
+ }
141
+ };
142
+ const provider = (modelId) => createChatModel(modelId);
143
+ provider.specificationVersion = "v3";
144
+ provider.chatModel = createChatModel;
145
+ provider.languageModel = createChatModel;
146
+ provider.imageModel = (modelId) => {
147
+ throw new import_provider.NoSuchModelError({ modelId, modelType: "imageModel" });
148
+ };
149
+ provider.embeddingModel = createEmbeddingModel;
150
+ provider.textEmbeddingModel = createEmbeddingModel;
151
+ return provider;
152
+ }
153
+ var baseten = createBaseten();
154
+ // Annotate the CommonJS export names for ESM import in node:
155
+ 0 && (module.exports = {
156
+ VERSION,
157
+ baseten,
158
+ createBaseten
159
+ });
160
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/baseten-provider.ts","../src/version.ts"],"sourcesContent":["export type { BasetenChatModelId } from './baseten-chat-options';\nexport { baseten, createBaseten } from './baseten-provider';\nexport type {\n BasetenProvider,\n BasetenProviderSettings,\n BasetenErrorData,\n} from './baseten-provider';\nexport { VERSION } from './version';\n","import {\n OpenAICompatibleChatLanguageModel,\n OpenAICompatibleEmbeddingModel,\n ProviderErrorStructure,\n} from '@ai-sdk/openai-compatible';\nimport {\n EmbeddingModelV3,\n LanguageModelV3,\n NoSuchModelError,\n ProviderV3,\n} from '@ai-sdk/provider';\nimport {\n FetchFunction,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix,\n} from '@ai-sdk/provider-utils';\nimport { z } from 'zod/v4';\nimport { BasetenChatModelId } from './baseten-chat-options';\nimport { BasetenEmbeddingModelId } from './baseten-embedding-options';\nimport { PerformanceClient } from '@basetenlabs/performance-client';\nimport { VERSION } from './version';\n\nexport type BasetenErrorData = z.infer<typeof basetenErrorSchema>;\n\nconst basetenErrorSchema = z.object({\n error: z.string(),\n});\n\nconst basetenErrorStructure: ProviderErrorStructure<BasetenErrorData> = {\n errorSchema: basetenErrorSchema,\n errorToMessage: data => data.error,\n};\n\nexport interface BasetenProviderSettings {\n /**\n * Baseten API key. Default value is taken from the `BASETEN_API_KEY`\n * environment variable.\n */\n apiKey?: string;\n\n /**\n * Base URL for the Model APIs. Default: 'https://inference.baseten.co/v1'\n */\n baseURL?: string;\n\n /**\n * Model URL for custom models (chat or embeddings).\n * If not supplied, the default Model APIs will be used.\n */\n modelURL?: string;\n /**\n * Custom headers to include in the requests.\n */\n headers?: Record<string, string>;\n\n /**\n * Custom fetch implementation. You can use it as a middleware to intercept requests,\n * or to provide a custom fetch implementation for e.g. testing.\n */\n fetch?: FetchFunction;\n}\n\nexport interface BasetenProvider extends ProviderV3 {\n /**\nCreates a chat model for text generation.\n*/\n (modelId?: BasetenChatModelId): LanguageModelV3;\n\n /**\nCreates a chat model for text generation.\n*/\n chatModel(modelId?: BasetenChatModelId): LanguageModelV3;\n\n /**\nCreates a language model for text generation. Alias for chatModel.\n*/\n languageModel(modelId?: BasetenChatModelId): LanguageModelV3;\n\n /**\nCreates a embedding model for text generation.\n*/\n embeddingModel(modelId?: BasetenEmbeddingModelId): EmbeddingModelV3;\n\n /**\n * @deprecated Use `embeddingModel` instead.\n */\n textEmbeddingModel(modelId?: BasetenEmbeddingModelId): EmbeddingModelV3;\n}\n\n// by default, we use the Model APIs\nconst defaultBaseURL = 'https://inference.baseten.co/v1';\n\nexport function createBaseten(\n options: BasetenProviderSettings = {},\n): BasetenProvider {\n const baseURL = withoutTrailingSlash(options.baseURL ?? defaultBaseURL);\n const getHeaders = () =>\n withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: 'BASETEN_API_KEY',\n description: 'Baseten API key',\n })}`,\n ...options.headers,\n },\n `ai-sdk/baseten/${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 = (\n modelType: string,\n customURL?: string,\n ): CommonModelConfig => ({\n provider: `baseten.${modelType}`,\n url: ({ path }) => {\n // For embeddings with /sync URLs (but not /sync/v1), we need to add /v1\n if (\n modelType === 'embedding' &&\n customURL?.includes('/sync') &&\n !customURL?.includes('/sync/v1')\n ) {\n return `${customURL}/v1${path}`;\n }\n return `${customURL || baseURL}${path}`;\n },\n headers: getHeaders,\n fetch: options.fetch,\n });\n\n const createChatModel = (modelId?: BasetenChatModelId) => {\n // Use modelURL if provided, otherwise use default Model APIs\n const customURL = options.modelURL;\n\n if (customURL) {\n // Check if this is a /sync/v1 endpoint (OpenAI-compatible) or /predict endpoint (custom)\n const isOpenAICompatible = customURL.includes('/sync/v1');\n\n if (isOpenAICompatible) {\n // For /sync/v1 endpoints, use standard OpenAI-compatible format\n return new OpenAICompatibleChatLanguageModel(modelId ?? 'placeholder', {\n ...getCommonModelConfig('chat', customURL),\n errorStructure: basetenErrorStructure,\n });\n } else if (customURL.includes('/predict')) {\n throw new Error(\n 'Not supported. You must use a /sync/v1 endpoint for chat models.',\n );\n }\n }\n\n // Use default OpenAI-compatible format for Model APIs\n return new OpenAICompatibleChatLanguageModel(modelId ?? 'chat', {\n ...getCommonModelConfig('chat'),\n errorStructure: basetenErrorStructure,\n });\n };\n\n const createEmbeddingModel = (modelId?: BasetenEmbeddingModelId) => {\n // Use modelURL if provided\n const customURL = options.modelURL;\n if (!customURL) {\n throw new Error(\n 'No model URL provided for embeddings. Please set modelURL option for embeddings.',\n );\n }\n\n // Check if this is a /sync or /sync/v1 endpoint (OpenAI-compatible)\n // We support both /sync and /sync/v1, stripping /v1 before passing to Performance Client, as Performance Client adds /v1 itself\n const isOpenAICompatible = customURL.includes('/sync');\n\n if (isOpenAICompatible) {\n // Create the model using OpenAICompatibleEmbeddingModel and override doEmbed\n const model = new OpenAICompatibleEmbeddingModel(\n modelId ?? 'embeddings',\n {\n ...getCommonModelConfig('embedding', customURL),\n errorStructure: basetenErrorStructure,\n },\n );\n\n // Strip /v1 from URL if present before passing to Performance Client to avoid double /v1\n const performanceClientURL = customURL.replace('/sync/v1', '/sync');\n\n // Initialize the B10 Performance Client once for reuse\n const performanceClient = new PerformanceClient(\n performanceClientURL,\n loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: 'BASETEN_API_KEY',\n description: 'Baseten API key',\n }),\n );\n\n // Override the doEmbed method to use the pre-created Performance Client\n model.doEmbed = async params => {\n if (!params.values || !Array.isArray(params.values)) {\n throw new Error('params.values must be an array of strings');\n }\n\n // Performance Client handles batching internally, so we don't need to limit in 128 here\n const response = await performanceClient.embed(\n params.values,\n modelId ?? 'embeddings', // model_id is for Model APIs, we don't use it here for dedicated\n );\n // Transform the response to match the expected format\n const embeddings = response.data.map((item: any) => item.embedding);\n\n return {\n embeddings,\n usage: response.usage\n ? { tokens: response.usage.total_tokens }\n : undefined,\n response: { headers: {}, body: response },\n warnings: [],\n };\n };\n\n return model;\n } else {\n throw new Error(\n 'Not supported. You must use a /sync or /sync/v1 endpoint for embeddings.',\n );\n }\n };\n\n const provider = (modelId?: BasetenChatModelId) => createChatModel(modelId);\n\n provider.specificationVersion = 'v3' as const;\n provider.chatModel = createChatModel;\n provider.languageModel = createChatModel;\n provider.imageModel = (modelId: string) => {\n throw new NoSuchModelError({ modelId, modelType: 'imageModel' });\n };\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n return provider;\n}\n\nexport const baseten = createBaseten();\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":"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","names":[]}
package/dist/index.mjs ADDED
@@ -0,0 +1,140 @@
1
+ // src/baseten-provider.ts
2
+ import {
3
+ OpenAICompatibleChatLanguageModel,
4
+ OpenAICompatibleEmbeddingModel
5
+ } from "@ai-sdk/openai-compatible";
6
+ import {
7
+ NoSuchModelError
8
+ } from "@ai-sdk/provider";
9
+ import {
10
+ loadApiKey,
11
+ withoutTrailingSlash,
12
+ withUserAgentSuffix
13
+ } from "@ai-sdk/provider-utils";
14
+ import { z } from "zod/v4";
15
+ import { PerformanceClient } from "@basetenlabs/performance-client";
16
+
17
+ // src/version.ts
18
+ var VERSION = true ? "0.0.0-64aae7dd-20260114144918" : "0.0.0-test";
19
+
20
+ // src/baseten-provider.ts
21
+ var basetenErrorSchema = z.object({
22
+ error: z.string()
23
+ });
24
+ var basetenErrorStructure = {
25
+ errorSchema: basetenErrorSchema,
26
+ errorToMessage: (data) => data.error
27
+ };
28
+ var defaultBaseURL = "https://inference.baseten.co/v1";
29
+ function createBaseten(options = {}) {
30
+ var _a;
31
+ const baseURL = withoutTrailingSlash((_a = options.baseURL) != null ? _a : defaultBaseURL);
32
+ const getHeaders = () => withUserAgentSuffix(
33
+ {
34
+ Authorization: `Bearer ${loadApiKey({
35
+ apiKey: options.apiKey,
36
+ environmentVariableName: "BASETEN_API_KEY",
37
+ description: "Baseten API key"
38
+ })}`,
39
+ ...options.headers
40
+ },
41
+ `ai-sdk/baseten/${VERSION}`
42
+ );
43
+ const getCommonModelConfig = (modelType, customURL) => ({
44
+ provider: `baseten.${modelType}`,
45
+ url: ({ path }) => {
46
+ if (modelType === "embedding" && (customURL == null ? void 0 : customURL.includes("/sync")) && !(customURL == null ? void 0 : customURL.includes("/sync/v1"))) {
47
+ return `${customURL}/v1${path}`;
48
+ }
49
+ return `${customURL || baseURL}${path}`;
50
+ },
51
+ headers: getHeaders,
52
+ fetch: options.fetch
53
+ });
54
+ const createChatModel = (modelId) => {
55
+ const customURL = options.modelURL;
56
+ if (customURL) {
57
+ const isOpenAICompatible = customURL.includes("/sync/v1");
58
+ if (isOpenAICompatible) {
59
+ return new OpenAICompatibleChatLanguageModel(modelId != null ? modelId : "placeholder", {
60
+ ...getCommonModelConfig("chat", customURL),
61
+ errorStructure: basetenErrorStructure
62
+ });
63
+ } else if (customURL.includes("/predict")) {
64
+ throw new Error(
65
+ "Not supported. You must use a /sync/v1 endpoint for chat models."
66
+ );
67
+ }
68
+ }
69
+ return new OpenAICompatibleChatLanguageModel(modelId != null ? modelId : "chat", {
70
+ ...getCommonModelConfig("chat"),
71
+ errorStructure: basetenErrorStructure
72
+ });
73
+ };
74
+ const createEmbeddingModel = (modelId) => {
75
+ const customURL = options.modelURL;
76
+ if (!customURL) {
77
+ throw new Error(
78
+ "No model URL provided for embeddings. Please set modelURL option for embeddings."
79
+ );
80
+ }
81
+ const isOpenAICompatible = customURL.includes("/sync");
82
+ if (isOpenAICompatible) {
83
+ const model = new OpenAICompatibleEmbeddingModel(
84
+ modelId != null ? modelId : "embeddings",
85
+ {
86
+ ...getCommonModelConfig("embedding", customURL),
87
+ errorStructure: basetenErrorStructure
88
+ }
89
+ );
90
+ const performanceClientURL = customURL.replace("/sync/v1", "/sync");
91
+ const performanceClient = new PerformanceClient(
92
+ performanceClientURL,
93
+ loadApiKey({
94
+ apiKey: options.apiKey,
95
+ environmentVariableName: "BASETEN_API_KEY",
96
+ description: "Baseten API key"
97
+ })
98
+ );
99
+ model.doEmbed = async (params) => {
100
+ if (!params.values || !Array.isArray(params.values)) {
101
+ throw new Error("params.values must be an array of strings");
102
+ }
103
+ const response = await performanceClient.embed(
104
+ params.values,
105
+ modelId != null ? modelId : "embeddings"
106
+ // model_id is for Model APIs, we don't use it here for dedicated
107
+ );
108
+ const embeddings = response.data.map((item) => item.embedding);
109
+ return {
110
+ embeddings,
111
+ usage: response.usage ? { tokens: response.usage.total_tokens } : void 0,
112
+ response: { headers: {}, body: response },
113
+ warnings: []
114
+ };
115
+ };
116
+ return model;
117
+ } else {
118
+ throw new Error(
119
+ "Not supported. You must use a /sync or /sync/v1 endpoint for embeddings."
120
+ );
121
+ }
122
+ };
123
+ const provider = (modelId) => createChatModel(modelId);
124
+ provider.specificationVersion = "v3";
125
+ provider.chatModel = createChatModel;
126
+ provider.languageModel = createChatModel;
127
+ provider.imageModel = (modelId) => {
128
+ throw new NoSuchModelError({ modelId, modelType: "imageModel" });
129
+ };
130
+ provider.embeddingModel = createEmbeddingModel;
131
+ provider.textEmbeddingModel = createEmbeddingModel;
132
+ return provider;
133
+ }
134
+ var baseten = createBaseten();
135
+ export {
136
+ VERSION,
137
+ baseten,
138
+ createBaseten
139
+ };
140
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/baseten-provider.ts","../src/version.ts"],"sourcesContent":["import {\n OpenAICompatibleChatLanguageModel,\n OpenAICompatibleEmbeddingModel,\n ProviderErrorStructure,\n} from '@ai-sdk/openai-compatible';\nimport {\n EmbeddingModelV3,\n LanguageModelV3,\n NoSuchModelError,\n ProviderV3,\n} from '@ai-sdk/provider';\nimport {\n FetchFunction,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix,\n} from '@ai-sdk/provider-utils';\nimport { z } from 'zod/v4';\nimport { BasetenChatModelId } from './baseten-chat-options';\nimport { BasetenEmbeddingModelId } from './baseten-embedding-options';\nimport { PerformanceClient } from '@basetenlabs/performance-client';\nimport { VERSION } from './version';\n\nexport type BasetenErrorData = z.infer<typeof basetenErrorSchema>;\n\nconst basetenErrorSchema = z.object({\n error: z.string(),\n});\n\nconst basetenErrorStructure: ProviderErrorStructure<BasetenErrorData> = {\n errorSchema: basetenErrorSchema,\n errorToMessage: data => data.error,\n};\n\nexport interface BasetenProviderSettings {\n /**\n * Baseten API key. Default value is taken from the `BASETEN_API_KEY`\n * environment variable.\n */\n apiKey?: string;\n\n /**\n * Base URL for the Model APIs. Default: 'https://inference.baseten.co/v1'\n */\n baseURL?: string;\n\n /**\n * Model URL for custom models (chat or embeddings).\n * If not supplied, the default Model APIs will be used.\n */\n modelURL?: string;\n /**\n * Custom headers to include in the requests.\n */\n headers?: Record<string, string>;\n\n /**\n * Custom fetch implementation. You can use it as a middleware to intercept requests,\n * or to provide a custom fetch implementation for e.g. testing.\n */\n fetch?: FetchFunction;\n}\n\nexport interface BasetenProvider extends ProviderV3 {\n /**\nCreates a chat model for text generation.\n*/\n (modelId?: BasetenChatModelId): LanguageModelV3;\n\n /**\nCreates a chat model for text generation.\n*/\n chatModel(modelId?: BasetenChatModelId): LanguageModelV3;\n\n /**\nCreates a language model for text generation. Alias for chatModel.\n*/\n languageModel(modelId?: BasetenChatModelId): LanguageModelV3;\n\n /**\nCreates a embedding model for text generation.\n*/\n embeddingModel(modelId?: BasetenEmbeddingModelId): EmbeddingModelV3;\n\n /**\n * @deprecated Use `embeddingModel` instead.\n */\n textEmbeddingModel(modelId?: BasetenEmbeddingModelId): EmbeddingModelV3;\n}\n\n// by default, we use the Model APIs\nconst defaultBaseURL = 'https://inference.baseten.co/v1';\n\nexport function createBaseten(\n options: BasetenProviderSettings = {},\n): BasetenProvider {\n const baseURL = withoutTrailingSlash(options.baseURL ?? defaultBaseURL);\n const getHeaders = () =>\n withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: 'BASETEN_API_KEY',\n description: 'Baseten API key',\n })}`,\n ...options.headers,\n },\n `ai-sdk/baseten/${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 = (\n modelType: string,\n customURL?: string,\n ): CommonModelConfig => ({\n provider: `baseten.${modelType}`,\n url: ({ path }) => {\n // For embeddings with /sync URLs (but not /sync/v1), we need to add /v1\n if (\n modelType === 'embedding' &&\n customURL?.includes('/sync') &&\n !customURL?.includes('/sync/v1')\n ) {\n return `${customURL}/v1${path}`;\n }\n return `${customURL || baseURL}${path}`;\n },\n headers: getHeaders,\n fetch: options.fetch,\n });\n\n const createChatModel = (modelId?: BasetenChatModelId) => {\n // Use modelURL if provided, otherwise use default Model APIs\n const customURL = options.modelURL;\n\n if (customURL) {\n // Check if this is a /sync/v1 endpoint (OpenAI-compatible) or /predict endpoint (custom)\n const isOpenAICompatible = customURL.includes('/sync/v1');\n\n if (isOpenAICompatible) {\n // For /sync/v1 endpoints, use standard OpenAI-compatible format\n return new OpenAICompatibleChatLanguageModel(modelId ?? 'placeholder', {\n ...getCommonModelConfig('chat', customURL),\n errorStructure: basetenErrorStructure,\n });\n } else if (customURL.includes('/predict')) {\n throw new Error(\n 'Not supported. You must use a /sync/v1 endpoint for chat models.',\n );\n }\n }\n\n // Use default OpenAI-compatible format for Model APIs\n return new OpenAICompatibleChatLanguageModel(modelId ?? 'chat', {\n ...getCommonModelConfig('chat'),\n errorStructure: basetenErrorStructure,\n });\n };\n\n const createEmbeddingModel = (modelId?: BasetenEmbeddingModelId) => {\n // Use modelURL if provided\n const customURL = options.modelURL;\n if (!customURL) {\n throw new Error(\n 'No model URL provided for embeddings. Please set modelURL option for embeddings.',\n );\n }\n\n // Check if this is a /sync or /sync/v1 endpoint (OpenAI-compatible)\n // We support both /sync and /sync/v1, stripping /v1 before passing to Performance Client, as Performance Client adds /v1 itself\n const isOpenAICompatible = customURL.includes('/sync');\n\n if (isOpenAICompatible) {\n // Create the model using OpenAICompatibleEmbeddingModel and override doEmbed\n const model = new OpenAICompatibleEmbeddingModel(\n modelId ?? 'embeddings',\n {\n ...getCommonModelConfig('embedding', customURL),\n errorStructure: basetenErrorStructure,\n },\n );\n\n // Strip /v1 from URL if present before passing to Performance Client to avoid double /v1\n const performanceClientURL = customURL.replace('/sync/v1', '/sync');\n\n // Initialize the B10 Performance Client once for reuse\n const performanceClient = new PerformanceClient(\n performanceClientURL,\n loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: 'BASETEN_API_KEY',\n description: 'Baseten API key',\n }),\n );\n\n // Override the doEmbed method to use the pre-created Performance Client\n model.doEmbed = async params => {\n if (!params.values || !Array.isArray(params.values)) {\n throw new Error('params.values must be an array of strings');\n }\n\n // Performance Client handles batching internally, so we don't need to limit in 128 here\n const response = await performanceClient.embed(\n params.values,\n modelId ?? 'embeddings', // model_id is for Model APIs, we don't use it here for dedicated\n );\n // Transform the response to match the expected format\n const embeddings = response.data.map((item: any) => item.embedding);\n\n return {\n embeddings,\n usage: response.usage\n ? { tokens: response.usage.total_tokens }\n : undefined,\n response: { headers: {}, body: response },\n warnings: [],\n };\n };\n\n return model;\n } else {\n throw new Error(\n 'Not supported. You must use a /sync or /sync/v1 endpoint for embeddings.',\n );\n }\n };\n\n const provider = (modelId?: BasetenChatModelId) => createChatModel(modelId);\n\n provider.specificationVersion = 'v3' as const;\n provider.chatModel = createChatModel;\n provider.languageModel = createChatModel;\n provider.imageModel = (modelId: string) => {\n throw new NoSuchModelError({ modelId, modelType: 'imageModel' });\n };\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n return provider;\n}\n\nexport const baseten = createBaseten();\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":"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","names":[]}
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@ai-sdk/baseten",
3
+ "version": "0.0.0-64aae7dd-20260114144918",
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
+ "@basetenlabs/performance-client": "^0.0.10",
24
+ "@ai-sdk/openai-compatible": "0.0.0-64aae7dd-20260114144918",
25
+ "@ai-sdk/provider": "0.0.0-64aae7dd-20260114144918",
26
+ "@ai-sdk/provider-utils": "0.0.0-64aae7dd-20260114144918"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "20.17.24",
30
+ "tsup": "^8",
31
+ "typescript": "5.8.3",
32
+ "zod": "3.25.76",
33
+ "@vercel/ai-tsconfig": "0.0.0"
34
+ },
35
+ "peerDependencies": {
36
+ "zod": "^3.25.76 || ^4.1.8"
37
+ },
38
+ "engines": {
39
+ "node": ">=18"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "homepage": "https://ai-sdk.dev/docs",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/vercel/ai.git"
48
+ },
49
+ "bugs": {
50
+ "url": "https://github.com/vercel/ai/issues"
51
+ },
52
+ "keywords": [
53
+ "ai"
54
+ ],
55
+ "scripts": {
56
+ "build": "pnpm clean && tsup --tsconfig tsconfig.build.json",
57
+ "build:watch": "pnpm clean && tsup --watch",
58
+ "clean": "rm -rf dist *.tsbuildinfo",
59
+ "lint": "eslint \"./**/*.ts*\"",
60
+ "type-check": "tsc --build",
61
+ "prettier-check": "prettier --check \"./**/*.ts*\"",
62
+ "test": "pnpm test:node && pnpm test:edge",
63
+ "test:update": "pnpm test:node -u",
64
+ "test:watch": "vitest --config vitest.node.config.js",
65
+ "test:edge": "vitest --config vitest.edge.config.js --run",
66
+ "test:node": "vitest --config vitest.node.config.js --run"
67
+ }
68
+ }