aimodels 0.3.12 → 0.4.1

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/dist/index.js CHANGED
@@ -1,45 +1,2241 @@
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 });
1
+ // src/data.js
2
+ var models = {
3
+ "claude-3-opus-20240229": {
4
+ "id": "claude-3-opus-20240229",
5
+ "name": "Claude 3 Opus",
6
+ "license": "proprietary",
7
+ "providerIds": [
8
+ "anthropic",
9
+ "aws",
10
+ "google"
11
+ ],
12
+ "capabilities": [
13
+ "chat",
14
+ "txt-in",
15
+ "txt-out",
16
+ "img-in",
17
+ "json-out",
18
+ "fn-out"
19
+ ],
20
+ "context": {
21
+ "type": "token",
22
+ "total": 2e5,
23
+ "maxOutput": 4096,
24
+ "outputIsFixed": 1
25
+ },
26
+ "aliases": [
27
+ "claude-3-opus-latest",
28
+ "claude-3-opus"
29
+ ],
30
+ "creatorId": "anthropic"
31
+ },
32
+ "claude-3-sonnet-20240229": {
33
+ "id": "claude-3-sonnet-20240229",
34
+ "name": "Claude 3 Sonnet",
35
+ "license": "proprietary",
36
+ "providerIds": [
37
+ "anthropic",
38
+ "aws",
39
+ "google"
40
+ ],
41
+ "capabilities": [
42
+ "chat",
43
+ "txt-in",
44
+ "txt-out",
45
+ "img-in",
46
+ "json-out",
47
+ "fn-out"
48
+ ],
49
+ "context": {
50
+ "type": "token",
51
+ "total": 2e5,
52
+ "maxOutput": 4096,
53
+ "outputIsFixed": 1
54
+ },
55
+ "aliases": [
56
+ "claude-3-sonnet-latest",
57
+ "claude-3-sonnet"
58
+ ],
59
+ "creatorId": "anthropic"
60
+ },
61
+ "claude-3-haiku-20240307": {
62
+ "id": "claude-3-haiku-20240307",
63
+ "name": "Claude 3 Haiku",
64
+ "license": "proprietary",
65
+ "providerIds": [
66
+ "anthropic",
67
+ "aws",
68
+ "google"
69
+ ],
70
+ "capabilities": [
71
+ "chat",
72
+ "txt-in",
73
+ "txt-out",
74
+ "img-in",
75
+ "json-out",
76
+ "fn-out"
77
+ ],
78
+ "context": {
79
+ "type": "token",
80
+ "total": 2e5,
81
+ "maxOutput": 4096,
82
+ "outputIsFixed": 1
83
+ },
84
+ "aliases": [
85
+ "claude-3-haiku"
86
+ ],
87
+ "creatorId": "anthropic"
88
+ },
89
+ "claude-3-5-sonnet-20241022": {
90
+ "id": "claude-3-5-sonnet-20241022",
91
+ "name": "Claude 3.5 Sonnet",
92
+ "license": "proprietary",
93
+ "providerIds": [
94
+ "anthropic",
95
+ "aws",
96
+ "google"
97
+ ],
98
+ "capabilities": [
99
+ "chat",
100
+ "txt-in",
101
+ "txt-out",
102
+ "img-in",
103
+ "json-out",
104
+ "fn-out"
105
+ ],
106
+ "context": {
107
+ "type": "token",
108
+ "total": 2e5,
109
+ "maxOutput": 8192,
110
+ "outputIsFixed": 1
111
+ },
112
+ "aliases": [
113
+ "claude-3-5-sonnet-latest",
114
+ "claude-3-5-sonnet"
115
+ ],
116
+ "creatorId": "anthropic"
117
+ },
118
+ "claude-3-5-sonnet-20240620": {
119
+ "id": "claude-3-5-sonnet-20240620",
120
+ "name": "Claude 3.5 Sonnet (2024-06-20)",
121
+ "license": "proprietary",
122
+ "providerIds": [
123
+ "anthropic",
124
+ "aws",
125
+ "google"
126
+ ],
127
+ "capabilities": [
128
+ "chat",
129
+ "txt-in",
130
+ "txt-out",
131
+ "img-in",
132
+ "json-out",
133
+ "fn-out"
134
+ ],
135
+ "context": {
136
+ "type": "token",
137
+ "total": 2e5,
138
+ "maxOutput": 8192,
139
+ "outputIsFixed": 1
140
+ },
141
+ "creatorId": "anthropic"
142
+ },
143
+ "claude-3-5-haiku-20241022": {
144
+ "id": "claude-3-5-haiku-20241022",
145
+ "name": "Claude 3.5 Haiku",
146
+ "license": "proprietary",
147
+ "providerIds": [
148
+ "anthropic",
149
+ "aws",
150
+ "google"
151
+ ],
152
+ "capabilities": [
153
+ "chat",
154
+ "txt-in",
155
+ "txt-out",
156
+ "json-out",
157
+ "fn-out"
158
+ ],
159
+ "context": {
160
+ "type": "token",
161
+ "total": 2e5,
162
+ "maxOutput": 8192,
163
+ "outputIsFixed": 1
164
+ },
165
+ "aliases": [
166
+ "claude-3-5-haiku-latest",
167
+ "claude-3-5-haiku"
168
+ ],
169
+ "creatorId": "anthropic"
170
+ },
171
+ "claude-3-7-sonnet-20250219": {
172
+ "id": "claude-3-7-sonnet-20250219",
173
+ "name": "Claude 3.7 Sonnet",
174
+ "license": "proprietary",
175
+ "providerIds": [
176
+ "anthropic",
177
+ "aws",
178
+ "google"
179
+ ],
180
+ "capabilities": [
181
+ "chat",
182
+ "txt-in",
183
+ "txt-out",
184
+ "img-in",
185
+ "json-out",
186
+ "fn-out",
187
+ "reason"
188
+ ],
189
+ "context": {
190
+ "type": "token",
191
+ "total": 2e5,
192
+ "maxOutput": 8192,
193
+ "outputIsFixed": 1,
194
+ "extended": {
195
+ "reasoning": {
196
+ "maxOutput": 64e3
197
+ },
198
+ "experimental": {
199
+ "maxOutput": 128e3
200
+ }
201
+ }
202
+ },
203
+ "aliases": [
204
+ "claude-3-7-sonnet-latest",
205
+ "claude-3-7-sonnet"
206
+ ],
207
+ "creatorId": "anthropic"
208
+ },
209
+ "command-r7b-12-2024": {
210
+ "id": "command-r7b-12-2024",
211
+ "name": "Command R7B",
212
+ "creator": "cohere",
213
+ "license": "proprietary",
214
+ "providerIds": [
215
+ "cohere"
216
+ ],
217
+ "capabilities": [
218
+ "chat",
219
+ "txt-in",
220
+ "txt-out",
221
+ "json-out",
222
+ "fn-out"
223
+ ],
224
+ "context": {
225
+ "type": "token",
226
+ "total": 128e3,
227
+ "maxOutput": 4096
228
+ },
229
+ "creatorId": "cohere"
230
+ },
231
+ "command-r-plus-08-2024": {
232
+ "id": "command-r-plus-08-2024",
233
+ "name": "Command R+",
234
+ "creator": "cohere",
235
+ "license": "proprietary",
236
+ "providerIds": [
237
+ "cohere",
238
+ "bedrock",
239
+ "azure",
240
+ "oracle"
241
+ ],
242
+ "capabilities": [
243
+ "chat",
244
+ "txt-in",
245
+ "txt-out",
246
+ "json-out",
247
+ "fn-out"
248
+ ],
249
+ "context": {
250
+ "type": "token",
251
+ "total": 128e3,
252
+ "maxOutput": 4096
253
+ },
254
+ "aliases": [
255
+ "command-r-plus"
256
+ ],
257
+ "creatorId": "cohere"
258
+ },
259
+ "command-r-03-2024": {
260
+ "id": "command-r-03-2024",
261
+ "name": "Command R",
262
+ "creator": "cohere",
263
+ "license": "proprietary",
264
+ "providerIds": [
265
+ "cohere",
266
+ "bedrock",
267
+ "azure",
268
+ "oracle"
269
+ ],
270
+ "capabilities": [
271
+ "chat",
272
+ "txt-in",
273
+ "txt-out",
274
+ "reason",
275
+ "json-out",
276
+ "fn-out"
277
+ ],
278
+ "context": {
279
+ "type": "token",
280
+ "total": 128e3,
281
+ "maxOutput": 4096
282
+ },
283
+ "aliases": [
284
+ "command-r"
285
+ ],
286
+ "creatorId": "cohere"
287
+ },
288
+ "command": {
289
+ "id": "command",
290
+ "name": "Command",
291
+ "creator": "cohere",
292
+ "license": "proprietary",
293
+ "providerIds": [
294
+ "cohere",
295
+ "bedrock",
296
+ "oracle"
297
+ ],
298
+ "capabilities": [
299
+ "chat",
300
+ "txt-in",
301
+ "txt-out"
302
+ ],
303
+ "context": {
304
+ "type": "token",
305
+ "total": 4096,
306
+ "maxOutput": 4096
307
+ },
308
+ "creatorId": "cohere"
309
+ },
310
+ "command-light": {
311
+ "id": "command-light",
312
+ "name": "Command Light",
313
+ "creator": "cohere",
314
+ "license": "proprietary",
315
+ "providerIds": [
316
+ "cohere",
317
+ "bedrock",
318
+ "oracle"
319
+ ],
320
+ "capabilities": [
321
+ "chat",
322
+ "txt-in",
323
+ "txt-out"
324
+ ],
325
+ "context": {
326
+ "type": "token",
327
+ "total": 4096,
328
+ "maxOutput": 4096
329
+ },
330
+ "creatorId": "cohere"
331
+ },
332
+ "embed-english-v3.0": {
333
+ "id": "embed-english-v3.0",
334
+ "name": "Embed English v3.0",
335
+ "creator": "cohere",
336
+ "license": "proprietary",
337
+ "providerIds": [
338
+ "cohere",
339
+ "bedrock",
340
+ "azure",
341
+ "oracle"
342
+ ],
343
+ "capabilities": [
344
+ "txt-in",
345
+ "img-in",
346
+ "vec-out"
347
+ ],
348
+ "context": {
349
+ "type": "token",
350
+ "total": 512,
351
+ "maxOutput": 1024
352
+ },
353
+ "creatorId": "cohere"
354
+ },
355
+ "embed-english-light-v3.0": {
356
+ "id": "embed-english-light-v3.0",
357
+ "name": "Embed English Light v3.0",
358
+ "creator": "cohere",
359
+ "license": "proprietary",
360
+ "providerIds": [
361
+ "cohere",
362
+ "oracle"
363
+ ],
364
+ "capabilities": [
365
+ "txt-in",
366
+ "img-in",
367
+ "vec-out"
368
+ ],
369
+ "context": {
370
+ "type": "token",
371
+ "total": 512,
372
+ "maxOutput": 384
373
+ },
374
+ "creatorId": "cohere"
375
+ },
376
+ "embed-multilingual-v3.0": {
377
+ "id": "embed-multilingual-v3.0",
378
+ "name": "Embed Multilingual v3.0",
379
+ "creator": "cohere",
380
+ "license": "proprietary",
381
+ "providerIds": [
382
+ "cohere",
383
+ "bedrock",
384
+ "azure",
385
+ "oracle"
386
+ ],
387
+ "capabilities": [
388
+ "txt-in",
389
+ "img-in",
390
+ "vec-out"
391
+ ],
392
+ "context": {
393
+ "type": "token",
394
+ "total": 512,
395
+ "maxOutput": 1024
396
+ },
397
+ "creatorId": "cohere"
398
+ },
399
+ "embed-multilingual-light-v3.0": {
400
+ "id": "embed-multilingual-light-v3.0",
401
+ "name": "Embed Multilingual Light v3.0",
402
+ "creator": "cohere",
403
+ "license": "proprietary",
404
+ "providerIds": [
405
+ "cohere",
406
+ "oracle"
407
+ ],
408
+ "capabilities": [
409
+ "txt-in",
410
+ "img-in",
411
+ "vec-out"
412
+ ],
413
+ "context": {
414
+ "type": "token",
415
+ "total": 512,
416
+ "maxOutput": 384
417
+ },
418
+ "creatorId": "cohere"
419
+ },
420
+ "rerank-v3.5": {
421
+ "id": "rerank-v3.5",
422
+ "name": "Rerank v3.5",
423
+ "creator": "cohere",
424
+ "license": "proprietary",
425
+ "providerIds": [
426
+ "cohere",
427
+ "bedrock",
428
+ "azure"
429
+ ],
430
+ "capabilities": [
431
+ "txt-in",
432
+ "txt-out"
433
+ ],
434
+ "context": {
435
+ "type": "token",
436
+ "total": 4096,
437
+ "maxOutput": null
438
+ },
439
+ "creatorId": "cohere"
440
+ },
441
+ "rerank-english-v3.0": {
442
+ "id": "rerank-english-v3.0",
443
+ "name": "Rerank English v3.0",
444
+ "creator": "cohere",
445
+ "license": "proprietary",
446
+ "providerIds": [
447
+ "cohere",
448
+ "azure"
449
+ ],
450
+ "capabilities": [
451
+ "txt-in",
452
+ "txt-out"
453
+ ],
454
+ "context": {
455
+ "type": "token",
456
+ "total": 4096,
457
+ "maxOutput": null
458
+ },
459
+ "creatorId": "cohere"
460
+ },
461
+ "rerank-multilingual-v3.0": {
462
+ "id": "rerank-multilingual-v3.0",
463
+ "name": "Rerank Multilingual v3.0",
464
+ "creator": "cohere",
465
+ "license": "proprietary",
466
+ "providerIds": [
467
+ "cohere",
468
+ "azure"
469
+ ],
470
+ "capabilities": [
471
+ "txt-in",
472
+ "txt-out"
473
+ ],
474
+ "context": {
475
+ "type": "token",
476
+ "total": 4096,
477
+ "maxOutput": null
478
+ },
479
+ "creatorId": "cohere"
480
+ },
481
+ "deepseek-chat": {
482
+ "id": "deepseek-chat",
483
+ "name": "DeepSeek V3",
484
+ "license": "apache-2.0",
485
+ "providerIds": [
486
+ "deepseek"
487
+ ],
488
+ "capabilities": [
489
+ "chat",
490
+ "txt-in",
491
+ "txt-out",
492
+ "json-out",
493
+ "fn-out"
494
+ ],
495
+ "context": {
496
+ "type": "token",
497
+ "total": 131072,
498
+ "maxOutput": 8192
499
+ },
500
+ "creatorId": "deepseek"
501
+ },
502
+ "deepseek-reasoner": {
503
+ "id": "deepseek-reasoner",
504
+ "name": "DeepSeek R1",
505
+ "license": "apache-2.0",
506
+ "providerIds": [
507
+ "deepseek"
508
+ ],
509
+ "capabilities": [
510
+ "chat",
511
+ "txt-in",
512
+ "txt-out",
513
+ "json-out",
514
+ "fn-out",
515
+ "reason"
516
+ ],
517
+ "context": {
518
+ "type": "token",
519
+ "total": 131072,
520
+ "maxOutput": 8192
521
+ },
522
+ "creatorId": "deepseek"
523
+ },
524
+ "gemini-2.0-flash": {
525
+ "id": "gemini-2.0-flash",
526
+ "name": "Gemini 2.0 Flash",
527
+ "license": "proprietary",
528
+ "providerIds": [
529
+ "google"
530
+ ],
531
+ "capabilities": [
532
+ "chat",
533
+ "txt-in",
534
+ "txt-out",
535
+ "json-out",
536
+ "fn-out",
537
+ "img-in",
538
+ "audio-in",
539
+ "reason"
540
+ ],
541
+ "context": {
542
+ "type": "token",
543
+ "total": 1048576,
544
+ "maxOutput": 8192
545
+ },
546
+ "aliases": [
547
+ "gemini-2.0-flash-001"
548
+ ],
549
+ "creatorId": "google"
550
+ },
551
+ "gemini-2.0-flash-lite": {
552
+ "id": "gemini-2.0-flash-lite",
553
+ "name": "Gemini 2.0 Flash Lite",
554
+ "license": "proprietary",
555
+ "providerIds": [
556
+ "google"
557
+ ],
558
+ "capabilities": [
559
+ "chat",
560
+ "txt-in",
561
+ "txt-out",
562
+ "json-out",
563
+ "fn-out",
564
+ "img-in",
565
+ "audio-in"
566
+ ],
567
+ "context": {
568
+ "type": "token",
569
+ "total": 1048576,
570
+ "maxOutput": 8192
571
+ },
572
+ "aliases": [
573
+ "gemini-2.0-flash-lite-preview-02-05"
574
+ ],
575
+ "creatorId": "google"
576
+ },
577
+ "gemini-1.5-flash": {
578
+ "id": "gemini-1.5-flash",
579
+ "name": "Gemini 1.5 Flash",
580
+ "license": "proprietary",
581
+ "providerIds": [
582
+ "google"
583
+ ],
584
+ "capabilities": [
585
+ "chat",
586
+ "txt-in",
587
+ "txt-out",
588
+ "json-out",
589
+ "fn-out",
590
+ "img-in",
591
+ "audio-in"
592
+ ],
593
+ "context": {
594
+ "type": "token",
595
+ "total": 2097152,
596
+ "maxOutput": 8192
597
+ },
598
+ "creatorId": "google"
599
+ },
600
+ "gemini-1.5-flash-8b": {
601
+ "id": "gemini-1.5-flash-8b",
602
+ "name": "Gemini 1.5 Flash 8B",
603
+ "license": "proprietary",
604
+ "providerIds": [
605
+ "google"
606
+ ],
607
+ "capabilities": [
608
+ "chat",
609
+ "txt-in",
610
+ "txt-out",
611
+ "json-out",
612
+ "fn-out",
613
+ "img-in",
614
+ "audio-in"
615
+ ],
616
+ "context": {
617
+ "type": "token",
618
+ "total": 2097152,
619
+ "maxOutput": 8192
620
+ },
621
+ "creatorId": "google"
622
+ },
623
+ "gemini-1.5-pro": {
624
+ "id": "gemini-1.5-pro",
625
+ "name": "Gemini 1.5 Pro",
626
+ "license": "proprietary",
627
+ "providerIds": [
628
+ "google"
629
+ ],
630
+ "capabilities": [
631
+ "chat",
632
+ "txt-in",
633
+ "txt-out",
634
+ "json-out",
635
+ "fn-out",
636
+ "img-in",
637
+ "audio-in",
638
+ "reason"
639
+ ],
640
+ "context": {
641
+ "type": "token",
642
+ "total": 2097152,
643
+ "maxOutput": 8192
644
+ },
645
+ "aliases": [
646
+ "gemini-1.5-pro-latest",
647
+ "gemini-1.5-pro-001",
648
+ "gemini-1.5-pro-002"
649
+ ],
650
+ "creatorId": "google"
651
+ },
652
+ "text-embedding-004": {
653
+ "id": "text-embedding-004",
654
+ "name": "Text Embedding 004",
655
+ "license": "proprietary",
656
+ "providerIds": [
657
+ "google"
658
+ ],
659
+ "capabilities": [
660
+ "txt-in",
661
+ "vec-out"
662
+ ],
663
+ "context": {
664
+ "type": "token",
665
+ "total": 2048,
666
+ "maxOutput": 768
667
+ },
668
+ "creatorId": "google"
669
+ },
670
+ "gemma-7b-it": {
671
+ "id": "gemma-7b-it",
672
+ "name": "Gemma 7B Instruct",
673
+ "license": "apache-2.0",
674
+ "providerIds": [
675
+ "google"
676
+ ],
677
+ "capabilities": [
678
+ "chat",
679
+ "txt-in",
680
+ "txt-out",
681
+ "json-out",
682
+ "fn-out"
683
+ ],
684
+ "context": {
685
+ "type": "token",
686
+ "total": 8192,
687
+ "maxOutput": 4096
688
+ },
689
+ "creatorId": "google"
690
+ },
691
+ "gemma-2b-it": {
692
+ "id": "gemma-2b-it",
693
+ "name": "Gemma 2B Instruct",
694
+ "license": "apache-2.0",
695
+ "providerIds": [
696
+ "google"
697
+ ],
698
+ "capabilities": [
699
+ "chat",
700
+ "txt-in",
701
+ "txt-out",
702
+ "json-out",
703
+ "fn-out"
704
+ ],
705
+ "context": {
706
+ "type": "token",
707
+ "total": 8192,
708
+ "maxOutput": 4096
709
+ },
710
+ "creatorId": "google"
711
+ },
712
+ "llama3-70b-8192": {
713
+ "id": "llama3-70b-8192",
714
+ "name": "Llama 3 70B",
715
+ "license": "llama-3-community",
716
+ "providerIds": [
717
+ "groq"
718
+ ],
719
+ "capabilities": [
720
+ "chat",
721
+ "txt-in",
722
+ "txt-out",
723
+ "json-out",
724
+ "fn-out"
725
+ ],
726
+ "context": {
727
+ "type": "token",
728
+ "total": 8192,
729
+ "maxOutput": 4096
730
+ },
731
+ "creatorId": "meta"
732
+ },
733
+ "llama3-8b-8192": {
734
+ "id": "llama3-8b-8192",
735
+ "name": "Llama 3 8B",
736
+ "license": "llama-3-community",
737
+ "providerIds": [
738
+ "groq"
739
+ ],
740
+ "capabilities": [
741
+ "chat",
742
+ "txt-in",
743
+ "txt-out",
744
+ "json-out",
745
+ "fn-out"
746
+ ],
747
+ "context": {
748
+ "type": "token",
749
+ "total": 8192,
750
+ "maxOutput": 4096
751
+ },
752
+ "creatorId": "meta"
753
+ },
754
+ "llama-3.2-11b-vision-preview": {
755
+ "id": "llama-3.2-11b-vision-preview",
756
+ "name": "Llama 3.2 11B Vision",
757
+ "license": "llama-3-community",
758
+ "providerIds": [
759
+ "groq"
760
+ ],
761
+ "capabilities": [
762
+ "chat",
763
+ "txt-in",
764
+ "txt-out",
765
+ "img-in"
766
+ ],
767
+ "context": {
768
+ "type": "token",
769
+ "total": 4096,
770
+ "maxOutput": 4096
771
+ },
772
+ "creatorId": "meta"
773
+ },
774
+ "llama-3.2-90b-vision-preview": {
775
+ "id": "llama-3.2-90b-vision-preview",
776
+ "name": "Llama 3.2 90B Vision",
777
+ "license": "llama-3-community",
778
+ "providerIds": [
779
+ "groq"
780
+ ],
781
+ "capabilities": [
782
+ "chat",
783
+ "txt-in",
784
+ "txt-out",
785
+ "img-in"
786
+ ],
787
+ "context": {
788
+ "type": "token",
789
+ "total": 4096,
790
+ "maxOutput": 4096
791
+ },
792
+ "creatorId": "meta"
793
+ },
794
+ "llama-guard-3-8b": {
795
+ "id": "llama-guard-3-8b",
796
+ "name": "LlamaGuard 3 8B",
797
+ "license": "llama-3-community",
798
+ "providerIds": [
799
+ "groq"
800
+ ],
801
+ "capabilities": [
802
+ "chat",
803
+ "txt-in",
804
+ "txt-out"
805
+ ],
806
+ "context": {
807
+ "type": "token",
808
+ "total": 4096,
809
+ "maxOutput": 4096
810
+ },
811
+ "creatorId": "meta"
812
+ },
813
+ "mistral-large-2402": {
814
+ "id": "mistral-large-2402",
815
+ "name": "Mistral Large",
816
+ "license": "proprietary",
817
+ "providerIds": [
818
+ "mistral",
819
+ "azure"
820
+ ],
821
+ "capabilities": [
822
+ "chat",
823
+ "txt-in",
824
+ "txt-out",
825
+ "json-out",
826
+ "fn-out"
827
+ ],
828
+ "context": {
829
+ "type": "token",
830
+ "total": 32768,
831
+ "maxOutput": 4096
832
+ },
833
+ "creatorId": "mistral"
834
+ },
835
+ "mistral-small-2402": {
836
+ "id": "mistral-small-2402",
837
+ "name": "Mistral Small",
838
+ "license": "proprietary",
839
+ "providerIds": [
840
+ "mistral",
841
+ "azure"
842
+ ],
843
+ "capabilities": [
844
+ "chat",
845
+ "txt-in",
846
+ "txt-out",
847
+ "json-out",
848
+ "fn-out"
849
+ ],
850
+ "context": {
851
+ "type": "token",
852
+ "total": 32768,
853
+ "maxOutput": 4096
854
+ },
855
+ "creatorId": "mistral"
856
+ },
857
+ "mistral-medium": {
858
+ "id": "mistral-medium",
859
+ "name": "Mistral Medium",
860
+ "license": "proprietary",
861
+ "providerIds": [
862
+ "mistral"
863
+ ],
864
+ "capabilities": [
865
+ "chat",
866
+ "txt-in",
867
+ "txt-out"
868
+ ],
869
+ "context": {
870
+ "type": "token",
871
+ "total": 32768,
872
+ "maxOutput": 4096
873
+ },
874
+ "creatorId": "mistral"
875
+ },
876
+ "open-mistral-7b": {
877
+ "id": "open-mistral-7b",
878
+ "name": "Open Mistral 7B",
879
+ "license": "apache-2.0",
880
+ "providerIds": [
881
+ "mistral",
882
+ "groq"
883
+ ],
884
+ "capabilities": [
885
+ "chat",
886
+ "txt-in",
887
+ "txt-out"
888
+ ],
889
+ "context": {
890
+ "type": "token",
891
+ "total": 32768,
892
+ "maxOutput": 4096
893
+ },
894
+ "creatorId": "mistral"
895
+ },
896
+ "open-mixtral-8x7b": {
897
+ "id": "open-mixtral-8x7b",
898
+ "name": "Open Mixtral 8x7B",
899
+ "license": "apache-2.0",
900
+ "providerIds": [
901
+ "mistral",
902
+ "groq"
903
+ ],
904
+ "capabilities": [
905
+ "chat",
906
+ "txt-in",
907
+ "txt-out"
908
+ ],
909
+ "context": {
910
+ "type": "token",
911
+ "total": 32768,
912
+ "maxOutput": 4096
913
+ },
914
+ "creatorId": "mistral"
915
+ },
916
+ "gpt-4": {
917
+ "id": "gpt-4",
918
+ "name": "GPT-4",
919
+ "license": "proprietary",
920
+ "providerIds": [
921
+ "openai",
922
+ "azure"
923
+ ],
924
+ "capabilities": [
925
+ "chat",
926
+ "txt-in",
927
+ "txt-out",
928
+ "json-out",
929
+ "fn-out"
930
+ ],
931
+ "context": {
932
+ "type": "token",
933
+ "total": 8192,
934
+ "maxOutput": 4096
935
+ },
936
+ "creatorId": "openai"
937
+ },
938
+ "gpt-4-turbo-preview": {
939
+ "id": "gpt-4-turbo-preview",
940
+ "extends": "gpt-4",
941
+ "overrides": {
942
+ "name": "GPT-4 Turbo",
943
+ "context": {
944
+ "type": "token",
945
+ "total": 128e3,
946
+ "maxOutput": 4096
947
+ }
948
+ },
949
+ "creatorId": "openai"
950
+ },
951
+ "gpt-3.5-turbo": {
952
+ "id": "gpt-3.5-turbo",
953
+ "name": "GPT-3.5 Turbo",
954
+ "license": "proprietary",
955
+ "providerIds": [
956
+ "openai",
957
+ "azure"
958
+ ],
959
+ "capabilities": [
960
+ "chat",
961
+ "txt-in",
962
+ "txt-out",
963
+ "json-out",
964
+ "fn-out"
965
+ ],
966
+ "context": {
967
+ "type": "token",
968
+ "total": 16385,
969
+ "maxOutput": 4096
970
+ },
971
+ "creatorId": "openai"
972
+ },
973
+ "gpt-3.5-turbo-16k": {
974
+ "id": "gpt-3.5-turbo-16k",
975
+ "extends": "gpt-3.5-turbo",
976
+ "overrides": {
977
+ "name": "GPT-3.5 Turbo 16K",
978
+ "context": {
979
+ "type": "token",
980
+ "total": 16385,
981
+ "maxOutput": 4096
982
+ }
983
+ },
984
+ "creatorId": "openai"
985
+ },
986
+ "gpt-3.5-turbo-instruct": {
987
+ "id": "gpt-3.5-turbo-instruct",
988
+ "name": "GPT-3.5 Turbo Instruct",
989
+ "license": "proprietary",
990
+ "providerIds": [
991
+ "openai",
992
+ "azure"
993
+ ],
994
+ "capabilities": [
995
+ "txt-in",
996
+ "txt-out"
997
+ ],
998
+ "context": {
999
+ "type": "token",
1000
+ "total": 4096,
1001
+ "maxOutput": 4096
1002
+ },
1003
+ "creatorId": "openai"
1004
+ },
1005
+ "gpt-4o": {
1006
+ "id": "gpt-4o",
1007
+ "name": "GPT-4o",
1008
+ "license": "proprietary",
1009
+ "providerIds": [
1010
+ "openai",
1011
+ "azure"
1012
+ ],
1013
+ "capabilities": [
1014
+ "chat",
1015
+ "txt-in",
1016
+ "txt-out",
1017
+ "img-in",
1018
+ "json-out",
1019
+ "fn-out"
1020
+ ],
1021
+ "context": {
1022
+ "type": "token",
1023
+ "total": 128e3,
1024
+ "maxOutput": 16384
1025
+ },
1026
+ "creatorId": "openai"
1027
+ },
1028
+ "chatgpt-4o-latest": {
1029
+ "id": "chatgpt-4o-latest",
1030
+ "extends": "gpt-4o",
1031
+ "overrides": {
1032
+ "name": "GPT-4o used in ChatGPT"
1033
+ },
1034
+ "creatorId": "openai"
1035
+ },
1036
+ "gpt-4o-2024-11-20": {
1037
+ "id": "gpt-4o-2024-11-20",
1038
+ "extends": "gpt-4o",
1039
+ "overrides": {
1040
+ "name": "GPT-4o (2024-11-20)"
1041
+ },
1042
+ "creatorId": "openai"
1043
+ },
1044
+ "gpt-4o-2024-08-06": {
1045
+ "id": "gpt-4o-2024-08-06",
1046
+ "extends": "gpt-4o",
1047
+ "overrides": {
1048
+ "name": "GPT-4o (2024-08-06)"
1049
+ },
1050
+ "creatorId": "openai"
1051
+ },
1052
+ "gpt-4o-2024-05-13": {
1053
+ "id": "gpt-4o-2024-05-13",
1054
+ "extends": "gpt-4o",
1055
+ "overrides": {
1056
+ "name": "GPT-4o (2024-05-13)",
1057
+ "context": {
1058
+ "type": "token",
1059
+ "total": 128e3,
1060
+ "maxOutput": 4096
1061
+ }
1062
+ },
1063
+ "creatorId": "openai"
1064
+ },
1065
+ "gpt-4o-mini": {
1066
+ "id": "gpt-4o-mini",
1067
+ "extends": "gpt-4o",
1068
+ "overrides": {
1069
+ "name": "GPT-4o Mini",
1070
+ "context": {
1071
+ "type": "token",
1072
+ "total": 128e3,
1073
+ "maxOutput": 16384
1074
+ }
1075
+ },
1076
+ "creatorId": "openai"
1077
+ },
1078
+ "gpt-4o-audio-preview": {
1079
+ "id": "gpt-4o-audio-preview",
1080
+ "extends": "gpt-4o",
1081
+ "overrides": {
1082
+ "name": "GPT-4o Audio",
1083
+ "capabilities": [
1084
+ "chat",
1085
+ "txt-in",
1086
+ "txt-out",
1087
+ "audio-in",
1088
+ "json-out",
1089
+ "fn-out"
1090
+ ],
1091
+ "context": {
1092
+ "type": "token",
1093
+ "total": 128e3,
1094
+ "maxOutput": 16384
1095
+ }
1096
+ },
1097
+ "creatorId": "openai"
1098
+ },
1099
+ "gpt-4o-audio-preview-2024-12-17": {
1100
+ "id": "gpt-4o-audio-preview-2024-12-17",
1101
+ "extends": "gpt-4o-audio-preview",
1102
+ "overrides": {
1103
+ "name": "GPT-4o Audio (2024-12-17)"
1104
+ },
1105
+ "creatorId": "openai"
1106
+ },
1107
+ "gpt-4o-audio-preview-2024-10-01": {
1108
+ "id": "gpt-4o-audio-preview-2024-10-01",
1109
+ "extends": "gpt-4o-audio-preview",
1110
+ "overrides": {
1111
+ "name": "GPT-4o Audio (2024-10-01)"
1112
+ },
1113
+ "creatorId": "openai"
1114
+ },
1115
+ "gpt-4o-mini-audio-preview": {
1116
+ "id": "gpt-4o-mini-audio-preview",
1117
+ "extends": "gpt-4o-mini",
1118
+ "overrides": {
1119
+ "name": "GPT-4o Mini Audio",
1120
+ "capabilities": [
1121
+ "chat",
1122
+ "txt-in",
1123
+ "txt-out",
1124
+ "audio-in",
1125
+ "audio-out",
1126
+ "json-out",
1127
+ "fn-out"
1128
+ ],
1129
+ "context": {
1130
+ "type": "token",
1131
+ "total": 128e3,
1132
+ "maxOutput": 16384
1133
+ }
1134
+ },
1135
+ "creatorId": "openai"
1136
+ },
1137
+ "gpt-4o-mini-audio-preview-2024-12-17": {
1138
+ "id": "gpt-4o-mini-audio-preview-2024-12-17",
1139
+ "extends": "gpt-4o-mini-audio-preview",
1140
+ "overrides": {
1141
+ "name": "GPT-4o Mini Audio (2024-12-17)"
1142
+ },
1143
+ "creatorId": "openai"
1144
+ },
1145
+ "gpt-4o-realtime-preview": {
1146
+ "id": "gpt-4o-realtime-preview",
1147
+ "extends": "gpt-4o",
1148
+ "overrides": {
1149
+ "name": "GPT-4o Realtime",
1150
+ "capabilities": [
1151
+ "chat",
1152
+ "txt-in",
1153
+ "txt-out",
1154
+ "audio-in",
1155
+ "json-out",
1156
+ "fn-out"
1157
+ ],
1158
+ "context": {
1159
+ "type": "token",
1160
+ "total": 128e3,
1161
+ "maxOutput": 4096
1162
+ }
1163
+ },
1164
+ "creatorId": "openai"
1165
+ },
1166
+ "gpt-4o-realtime-preview-2024-12-17": {
1167
+ "id": "gpt-4o-realtime-preview-2024-12-17",
1168
+ "extends": "gpt-4o-realtime-preview",
1169
+ "overrides": {
1170
+ "name": "GPT-4o Realtime (2024-12-17)"
1171
+ },
1172
+ "creatorId": "openai"
1173
+ },
1174
+ "gpt-4o-realtime-preview-2024-10-01": {
1175
+ "id": "gpt-4o-realtime-preview-2024-10-01",
1176
+ "extends": "gpt-4o-realtime-preview",
1177
+ "overrides": {
1178
+ "name": "GPT-4o Realtime (2024-10-01)"
1179
+ },
1180
+ "creatorId": "openai"
1181
+ },
1182
+ "gpt-4o-mini-realtime-preview": {
1183
+ "id": "gpt-4o-mini-realtime-preview",
1184
+ "extends": "gpt-4o-mini",
1185
+ "overrides": {
1186
+ "name": "GPT-4o Mini Realtime",
1187
+ "capabilities": [
1188
+ "chat",
1189
+ "txt-in",
1190
+ "txt-out",
1191
+ "audio-in",
1192
+ "json-out",
1193
+ "fn-out"
1194
+ ],
1195
+ "context": {
1196
+ "type": "token",
1197
+ "total": 128e3,
1198
+ "maxOutput": 4096
1199
+ }
1200
+ },
1201
+ "creatorId": "openai"
1202
+ },
1203
+ "gpt-4o-mini-realtime-preview-2024-12-17": {
1204
+ "id": "gpt-4o-mini-realtime-preview-2024-12-17",
1205
+ "extends": "gpt-4o-mini-realtime-preview",
1206
+ "overrides": {
1207
+ "name": "GPT-4o Mini Realtime (2024-12-17)"
1208
+ },
1209
+ "creatorId": "openai"
1210
+ },
1211
+ "o1": {
1212
+ "id": "o1",
1213
+ "name": "OpenAI O1",
1214
+ "license": "proprietary",
1215
+ "providerIds": [
1216
+ "openai",
1217
+ "azure"
1218
+ ],
1219
+ "capabilities": [
1220
+ "chat",
1221
+ "txt-in",
1222
+ "txt-out",
1223
+ "img-in",
1224
+ "json-out",
1225
+ "fn-out",
1226
+ "reason"
1227
+ ],
1228
+ "context": {
1229
+ "type": "token",
1230
+ "total": 2e5,
1231
+ "maxOutput": 1e5
1232
+ },
1233
+ "creatorId": "openai"
1234
+ },
1235
+ "o1-2024-12-17": {
1236
+ "id": "o1-2024-12-17",
1237
+ "extends": "o1",
1238
+ "overrides": {
1239
+ "name": "OpenAI O1 (2024-12-17)"
1240
+ },
1241
+ "creatorId": "openai"
1242
+ },
1243
+ "o1-mini": {
1244
+ "id": "o1-mini",
1245
+ "extends": "o1",
1246
+ "overrides": {
1247
+ "name": "OpenAI O1 Mini",
1248
+ "capabilities": [
1249
+ "chat",
1250
+ "txt-in",
1251
+ "txt-out",
1252
+ "json-out",
1253
+ "fn-out",
1254
+ "reason"
1255
+ ],
1256
+ "context": {
1257
+ "type": "token",
1258
+ "total": 128e3,
1259
+ "maxOutput": 65536
1260
+ }
1261
+ },
1262
+ "creatorId": "openai"
1263
+ },
1264
+ "o1-mini-2024-09-12": {
1265
+ "id": "o1-mini-2024-09-12",
1266
+ "extends": "o1-mini",
1267
+ "overrides": {
1268
+ "name": "OpenAI O1 Mini (2024-09-12)"
1269
+ },
1270
+ "creatorId": "openai"
1271
+ },
1272
+ "o1-preview": {
1273
+ "id": "o1-preview",
1274
+ "extends": "o1",
1275
+ "overrides": {
1276
+ "name": "OpenAI O1 Preview",
1277
+ "context": {
1278
+ "type": "token",
1279
+ "total": 128e3,
1280
+ "maxOutput": 32768
1281
+ }
1282
+ },
1283
+ "creatorId": "openai"
1284
+ },
1285
+ "o1-preview-2024-09-12": {
1286
+ "id": "o1-preview-2024-09-12",
1287
+ "extends": "o1-preview",
1288
+ "overrides": {
1289
+ "name": "OpenAI O1 Preview (2024-09-12)"
1290
+ },
1291
+ "creatorId": "openai"
1292
+ },
1293
+ "o3-mini": {
1294
+ "id": "o3-mini",
1295
+ "name": "OpenAI O3 Mini",
1296
+ "license": "proprietary",
1297
+ "providerIds": [
1298
+ "openai",
1299
+ "azure"
1300
+ ],
1301
+ "capabilities": [
1302
+ "chat",
1303
+ "txt-in",
1304
+ "txt-out",
1305
+ "json-out",
1306
+ "fn-out",
1307
+ "reason"
1308
+ ],
1309
+ "context": {
1310
+ "type": "token",
1311
+ "total": 2e5,
1312
+ "maxOutput": 1e5
1313
+ },
1314
+ "creatorId": "openai"
1315
+ },
1316
+ "o3-mini-2025-01-31": {
1317
+ "id": "o3-mini-2025-01-31",
1318
+ "extends": "o3-mini",
1319
+ "overrides": {
1320
+ "name": "OpenAI O3 Mini (2025-01-31)"
1321
+ },
1322
+ "creatorId": "openai"
1323
+ },
1324
+ "whisper-1": {
1325
+ "id": "whisper-1",
1326
+ "name": "Whisper",
1327
+ "license": "proprietary",
1328
+ "providerIds": [
1329
+ "openai",
1330
+ "azure"
1331
+ ],
1332
+ "capabilities": [
1333
+ "audio-in",
1334
+ "txt-out"
1335
+ ],
1336
+ "context": {
1337
+ "type": "audio-in",
1338
+ "total": null,
1339
+ "maxOutput": null
1340
+ },
1341
+ "creatorId": "openai"
1342
+ },
1343
+ "tts-1": {
1344
+ "id": "tts-1",
1345
+ "name": "TTS-1",
1346
+ "license": "proprietary",
1347
+ "providerIds": [
1348
+ "openai",
1349
+ "azure"
1350
+ ],
1351
+ "capabilities": [
1352
+ "txt-in",
1353
+ "audio-out"
1354
+ ],
1355
+ "context": {
1356
+ "type": "audio-out",
1357
+ "total": null,
1358
+ "maxOutput": null
1359
+ },
1360
+ "creatorId": "openai"
1361
+ },
1362
+ "tts-1-hd": {
1363
+ "id": "tts-1-hd",
1364
+ "extends": "tts-1",
1365
+ "overrides": {
1366
+ "name": "TTS-1 HD"
1367
+ },
1368
+ "creatorId": "openai"
1369
+ },
1370
+ "dall-e-2": {
1371
+ "id": "dall-e-2",
1372
+ "name": "DALL-E 2",
1373
+ "license": "proprietary",
1374
+ "providerIds": [
1375
+ "openai",
1376
+ "azure"
1377
+ ],
1378
+ "capabilities": [
1379
+ "img-out"
1380
+ ],
1381
+ "context": {
1382
+ "maxOutput": 1,
1383
+ "sizes": [
1384
+ "256x256",
1385
+ "512x512",
1386
+ "1024x1024"
1387
+ ],
1388
+ "qualities": [
1389
+ "standard"
1390
+ ]
1391
+ },
1392
+ "creatorId": "openai"
1393
+ },
1394
+ "dall-e-3": {
1395
+ "id": "dall-e-3",
1396
+ "name": "DALL-E 3",
1397
+ "license": "proprietary",
1398
+ "providerIds": [
1399
+ "openai",
1400
+ "azure"
1401
+ ],
1402
+ "capabilities": [
1403
+ "txt-in",
1404
+ "img-out"
1405
+ ],
1406
+ "context": {
1407
+ "maxOutput": 1,
1408
+ "sizes": [
1409
+ "1024x1024",
1410
+ "1024x1792",
1411
+ "1792x1024"
1412
+ ],
1413
+ "qualities": [
1414
+ "standard",
1415
+ "hd"
1416
+ ]
1417
+ },
1418
+ "creatorId": "openai"
1419
+ },
1420
+ "text-embedding-ada-002": {
1421
+ "id": "text-embedding-ada-002",
1422
+ "name": "Text Embedding Ada 002",
1423
+ "license": "proprietary",
1424
+ "providerIds": [
1425
+ "openai",
1426
+ "azure"
1427
+ ],
1428
+ "capabilities": [
1429
+ "txt-in",
1430
+ "vec-out"
1431
+ ],
1432
+ "context": {
1433
+ "type": "embedding",
1434
+ "total": 8191,
1435
+ "unit": "tokens",
1436
+ "dimensions": 1536,
1437
+ "embeddingType": "text",
1438
+ "normalized": true
1439
+ },
1440
+ "creatorId": "openai"
1441
+ },
1442
+ "text-embedding-3-small": {
1443
+ "id": "text-embedding-3-small",
1444
+ "name": "Text Embedding 3 Small",
1445
+ "license": "proprietary",
1446
+ "providerIds": [
1447
+ "openai",
1448
+ "azure"
1449
+ ],
1450
+ "capabilities": [
1451
+ "txt-in",
1452
+ "vec-out"
1453
+ ],
1454
+ "context": {
1455
+ "type": "embedding",
1456
+ "total": 8191,
1457
+ "unit": "tokens",
1458
+ "dimensions": 1536,
1459
+ "embeddingType": "text",
1460
+ "normalized": true
1461
+ },
1462
+ "creatorId": "openai"
1463
+ },
1464
+ "text-embedding-3-large": {
1465
+ "id": "text-embedding-3-large",
1466
+ "name": "Text Embedding 3 Large",
1467
+ "license": "proprietary",
1468
+ "providerIds": [
1469
+ "openai",
1470
+ "azure"
1471
+ ],
1472
+ "capabilities": [
1473
+ "txt-in",
1474
+ "vec-out"
1475
+ ],
1476
+ "context": {
1477
+ "type": "embedding",
1478
+ "total": 8191,
1479
+ "unit": "tokens",
1480
+ "dimensions": 3072,
1481
+ "embeddingType": "text",
1482
+ "normalized": true
1483
+ },
1484
+ "creatorId": "openai"
1485
+ },
1486
+ "grok-2-vision-1212": {
1487
+ "id": "grok-2-vision-1212",
1488
+ "name": "Grok 2 Vision",
1489
+ "creator": "xai",
1490
+ "license": "proprietary",
1491
+ "providerIds": [
1492
+ "xai"
1493
+ ],
1494
+ "capabilities": [
1495
+ "chat",
1496
+ "txt-in",
1497
+ "txt-out",
1498
+ "img-in"
1499
+ ],
1500
+ "context": {
1501
+ "type": "token",
1502
+ "total": 32768,
1503
+ "maxOutput": 4096
1504
+ },
1505
+ "aliases": [
1506
+ "grok-2-vision",
1507
+ "grok-2-vision-latest"
1508
+ ],
1509
+ "creatorId": "xai"
1510
+ },
1511
+ "grok-2-1212": {
1512
+ "id": "grok-2-1212",
1513
+ "name": "Grok 2",
1514
+ "creator": "xai",
1515
+ "license": "proprietary",
1516
+ "providerIds": [
1517
+ "xai"
1518
+ ],
1519
+ "capabilities": [
1520
+ "chat",
1521
+ "txt-in",
1522
+ "txt-out"
1523
+ ],
1524
+ "context": {
1525
+ "type": "token",
1526
+ "total": 131072,
1527
+ "maxOutput": 4096
1528
+ },
1529
+ "aliases": [
1530
+ "grok-2",
1531
+ "grok-2-latest"
1532
+ ],
1533
+ "creatorId": "xai"
1534
+ },
1535
+ "grok-vision-beta": {
1536
+ "id": "grok-vision-beta",
1537
+ "name": "Grok Vision Beta",
1538
+ "creator": "xai",
1539
+ "license": "proprietary",
1540
+ "providerIds": [
1541
+ "xai"
1542
+ ],
1543
+ "capabilities": [
1544
+ "chat",
1545
+ "txt-in",
1546
+ "txt-out",
1547
+ "img-in"
1548
+ ],
1549
+ "context": {
1550
+ "type": "token",
1551
+ "total": 8192,
1552
+ "maxOutput": 4096
1553
+ },
1554
+ "creatorId": "xai"
1555
+ },
1556
+ "grok-beta": {
1557
+ "id": "grok-beta",
1558
+ "name": "Grok Beta",
1559
+ "creator": "xai",
1560
+ "license": "proprietary",
1561
+ "providerIds": [
1562
+ "xai"
1563
+ ],
1564
+ "capabilities": [
1565
+ "chat",
1566
+ "txt-in",
1567
+ "txt-out"
1568
+ ],
1569
+ "context": {
1570
+ "type": "token",
1571
+ "total": 131072,
1572
+ "maxOutput": 4096
1573
+ },
1574
+ "creatorId": "xai"
1575
+ }
1576
+ };
1577
+ var providers = {
1578
+ "anthropic": {
1579
+ "id": "anthropic",
1580
+ "name": "Anthropic",
1581
+ "apiUrl": "https://api.anthropic.com/v1",
1582
+ "apiDocsUrl": "https://docs.anthropic.com/en/api",
1583
+ "pricing": {
1584
+ "claude-3-opus-20240229": {
1585
+ "type": "token",
1586
+ "input": 15,
1587
+ "output": 75
1588
+ },
1589
+ "claude-3-sonnet-20240229": {
1590
+ "type": "token",
1591
+ "input": 3,
1592
+ "output": 15
1593
+ },
1594
+ "claude-3-haiku-20240307": {
1595
+ "type": "token",
1596
+ "input": 0.25,
1597
+ "output": 1.25
1598
+ },
1599
+ "claude-3-5-sonnet-20241022": {
1600
+ "type": "token",
1601
+ "input": 3,
1602
+ "output": 15
1603
+ },
1604
+ "claude-3-5-sonnet-20240620": {
1605
+ "type": "token",
1606
+ "input": 3,
1607
+ "output": 15
1608
+ },
1609
+ "claude-3-5-haiku-20241022": {
1610
+ "type": "token",
1611
+ "input": 0.8,
1612
+ "output": 4
1613
+ }
1614
+ }
1615
+ },
1616
+ "aws": {
1617
+ "id": "aws",
1618
+ "name": "Amazon Web Services",
1619
+ "apiUrl": "https://bedrock-runtime.us-east-1.amazonaws.com",
1620
+ "apiDocsUrl": "https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html",
1621
+ "pricing": {
1622
+ "claude-3-opus-20240229": {
1623
+ "type": "token",
1624
+ "input": 0.015,
1625
+ "output": 0.075
1626
+ }
1627
+ }
1628
+ },
1629
+ "azure": {
1630
+ "id": "azure",
1631
+ "name": "Azure",
1632
+ "apiUrl": "",
1633
+ "apiDocsUrl": "https://learn.microsoft.com/en-us/azure/ai-services/openai/reference",
1634
+ "pricing": {
1635
+ "gpt-4": {
1636
+ "type": "token",
1637
+ "input": 0,
1638
+ "output": 0
1639
+ },
1640
+ "gpt-4-32k": {
1641
+ "type": "token",
1642
+ "input": 0,
1643
+ "output": 0
1644
+ },
1645
+ "gpt-4-vision": {
1646
+ "type": "token",
1647
+ "input": 0,
1648
+ "output": 0
1649
+ },
1650
+ "gpt-4o": {
1651
+ "type": "token",
1652
+ "input": 0,
1653
+ "output": 0
1654
+ },
1655
+ "gpt-3.5-turbo": {
1656
+ "type": "token",
1657
+ "input": 0,
1658
+ "output": 0
1659
+ },
1660
+ "gpt-3.5-turbo-16k": {
1661
+ "type": "token",
1662
+ "input": 0,
1663
+ "output": 0
1664
+ },
1665
+ "text-embedding-ada-002": {
1666
+ "type": "token",
1667
+ "input": 0,
1668
+ "output": 0
1669
+ },
1670
+ "whisper": {
1671
+ "type": "minute",
1672
+ "price": 0
1673
+ },
1674
+ "dall-e-3": {
1675
+ "type": "image",
1676
+ "price": 0,
1677
+ "size": "1024x1024",
1678
+ "unit": "per_image"
1679
+ }
1680
+ }
1681
+ },
1682
+ "bedrock": {
1683
+ "id": "bedrock",
1684
+ "name": "AWS Bedrock",
1685
+ "apiUrl": "https://bedrock-runtime.us-east-1.amazonaws.com",
1686
+ "apiDocsUrl": "https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html",
1687
+ "pricing": {
1688
+ "command-r-plus-08-2024": {
1689
+ "type": "token",
1690
+ "input": 0.015,
1691
+ "output": 0.075
1692
+ }
1693
+ }
1694
+ },
1695
+ "cohere": {
1696
+ "id": "cohere",
1697
+ "name": "Cohere",
1698
+ "apiUrl": "https://api.cohere.ai/v1",
1699
+ "apiDocsUrl": "https://docs.cohere.com/reference",
1700
+ "pricing": {
1701
+ "command-r7b-12-2024": {
1702
+ "type": "token",
1703
+ "input": 0.0375,
1704
+ "output": 0.15
1705
+ },
1706
+ "command-r-plus-08-2024": {
1707
+ "type": "token",
1708
+ "input": 2.5,
1709
+ "output": 10
1710
+ },
1711
+ "command-r-03-2024": {
1712
+ "type": "token",
1713
+ "input": 0.15,
1714
+ "output": 0.6
1715
+ },
1716
+ "command": {
1717
+ "type": "token",
1718
+ "input": 1500,
1719
+ "output": 2e3
1720
+ },
1721
+ "command-light": {
1722
+ "type": "token",
1723
+ "input": 300,
1724
+ "output": 600
1725
+ },
1726
+ "embed-english-v3.0": {
1727
+ "type": "token",
1728
+ "input": 0.1,
1729
+ "output": 0
1730
+ },
1731
+ "embed-english-light-v3.0": {
1732
+ "type": "token",
1733
+ "input": 30,
1734
+ "output": 0
1735
+ },
1736
+ "embed-multilingual-v3.0": {
1737
+ "type": "token",
1738
+ "input": 100,
1739
+ "output": 0
1740
+ },
1741
+ "embed-multilingual-light-v3.0": {
1742
+ "type": "token",
1743
+ "input": 30,
1744
+ "output": 0
1745
+ },
1746
+ "rerank-v3.5": {
1747
+ "type": "token",
1748
+ "input": 100,
1749
+ "output": 0
1750
+ },
1751
+ "rerank-english-v3.0": {
1752
+ "type": "token",
1753
+ "input": 100,
1754
+ "output": 0
1755
+ },
1756
+ "rerank-multilingual-v3.0": {
1757
+ "type": "token",
1758
+ "input": 100,
1759
+ "output": 0
1760
+ }
1761
+ }
1762
+ },
1763
+ "deepseek": {
1764
+ "id": "deepseek",
1765
+ "name": "DeepSeek",
1766
+ "apiUrl": "https://api.deepseek.com/v1",
1767
+ "apiDocsUrl": "https://platform.deepseek.com/docs",
1768
+ "pricing": {
1769
+ "deepseek-chat": {
1770
+ "type": "token",
1771
+ "input": 0.2,
1772
+ "output": 0.2
1773
+ },
1774
+ "deepseek-reasoner": {
1775
+ "type": "token",
1776
+ "input": 0.3,
1777
+ "output": 0.3
1778
+ }
1779
+ }
1780
+ },
1781
+ "google": {
1782
+ "id": "google",
1783
+ "name": "Google",
1784
+ "apiUrl": "https://generativelanguage.googleapis.com/v1",
1785
+ "apiDocsUrl": "https://ai.google.dev/docs",
1786
+ "pricing": {
1787
+ "gemini-2.0-flash": {
1788
+ "type": "token",
1789
+ "input": 0.1,
1790
+ "output": 0.4
1791
+ },
1792
+ "gemini-2.0-flash-lite": {
1793
+ "type": "token",
1794
+ "input": 0.075,
1795
+ "output": 0.3
1796
+ },
1797
+ "gemini-1.5-flash": {
1798
+ "type": "token",
1799
+ "input": 0.075,
1800
+ "output": 0.3
1801
+ },
1802
+ "gemini-1.5-flash-8b": {
1803
+ "type": "token",
1804
+ "input": 0.0375,
1805
+ "output": 0.15
1806
+ },
1807
+ "gemini-1.5-pro": {
1808
+ "type": "token",
1809
+ "input": 1.25,
1810
+ "output": 5
1811
+ },
1812
+ "text-embedding-004": {
1813
+ "type": "token",
1814
+ "input": 0,
1815
+ "output": 0
1816
+ }
1817
+ }
1818
+ },
1819
+ "groq": {
1820
+ "id": "groq",
1821
+ "name": "Groq",
1822
+ "apiUrl": "https://api.groq.com/openai/v1",
1823
+ "apiDocsUrl": "https://console.groq.com/docs/api-reference",
1824
+ "pricing": {
1825
+ "llama3-70b-8192": {
1826
+ "type": "token",
1827
+ "input": 0.7,
1828
+ "output": 0.7
1829
+ },
1830
+ "llama3-8b-8192": {
1831
+ "type": "token",
1832
+ "input": 0.1,
1833
+ "output": 0.1
1834
+ },
1835
+ "mixtral-8x7b-32768": {
1836
+ "type": "token",
1837
+ "input": 0.5,
1838
+ "output": 0.5
1839
+ },
1840
+ "gemma2-9b-it": {
1841
+ "type": "token",
1842
+ "input": 0.2,
1843
+ "output": 0.2
1844
+ },
1845
+ "whisper-large-v3": {
1846
+ "type": "minute",
1847
+ "price": 6e-3
1848
+ },
1849
+ "whisper-large-v3-turbo": {
1850
+ "type": "minute",
1851
+ "price": 6e-3
1852
+ }
1853
+ }
1854
+ },
1855
+ "mistral": {
1856
+ "id": "mistral",
1857
+ "name": "Mistral",
1858
+ "apiUrl": "https://api.mistral.ai/v1",
1859
+ "apiDocsUrl": "https://docs.mistral.ai/",
1860
+ "pricing": {
1861
+ "mixtral-8x7b-32768": {
1862
+ "type": "token",
1863
+ "input": 0.7,
1864
+ "output": 0.7
1865
+ },
1866
+ "mistral-large-latest": {
1867
+ "type": "token",
1868
+ "input": 0.7,
1869
+ "output": 0.7
1870
+ }
1871
+ }
1872
+ },
1873
+ "ollama": {
1874
+ "id": "ollama",
1875
+ "name": "Ollama"
1876
+ },
1877
+ "openai": {
1878
+ "id": "openai",
1879
+ "name": "OpenAI",
1880
+ "apiUrl": "https://api.openai.com/v1",
1881
+ "apiDocsUrl": "https://platform.openai.com/docs/api-reference",
1882
+ "pricing": {
1883
+ "chatgpt-4o-latest": {
1884
+ "type": "token",
1885
+ "input": 5,
1886
+ "output": 15
1887
+ },
1888
+ "gpt-4": {
1889
+ "type": "token",
1890
+ "input": 30,
1891
+ "output": 60
1892
+ },
1893
+ "gpt-4-0613": {
1894
+ "type": "token",
1895
+ "input": 30,
1896
+ "output": 60
1897
+ },
1898
+ "gpt-4-32k": {
1899
+ "type": "token",
1900
+ "input": 60,
1901
+ "output": 120
1902
+ },
1903
+ "gpt-4-turbo": {
1904
+ "type": "token",
1905
+ "input": 10,
1906
+ "output": 30
1907
+ },
1908
+ "gpt-4-turbo-2024-04-09": {
1909
+ "type": "token",
1910
+ "input": 10,
1911
+ "output": 30
1912
+ },
1913
+ "gpt-3.5-turbo": {
1914
+ "type": "token",
1915
+ "input": 0.5,
1916
+ "output": 1.5
1917
+ },
1918
+ "gpt-3.5-turbo-0125": {
1919
+ "type": "token",
1920
+ "input": 0.5,
1921
+ "output": 1.5
1922
+ },
1923
+ "gpt-3.5-turbo-instruct": {
1924
+ "type": "token",
1925
+ "input": 1.5,
1926
+ "output": 2
1927
+ },
1928
+ "gpt-3.5-turbo-16k-0613": {
1929
+ "type": "token",
1930
+ "input": 3,
1931
+ "output": 4
1932
+ },
1933
+ "davinci-002": {
1934
+ "type": "token",
1935
+ "input": 2,
1936
+ "output": 2
1937
+ },
1938
+ "babbage-002": {
1939
+ "type": "token",
1940
+ "input": 0.4,
1941
+ "output": 0.4
1942
+ },
1943
+ "gpt-4o": {
1944
+ "type": "token",
1945
+ "input": 2.5,
1946
+ "input_cached": 1.25,
1947
+ "output": 10
1948
+ },
1949
+ "gpt-4o-2024-08-06": {
1950
+ "type": "token",
1951
+ "input": 2.5,
1952
+ "input_cached": 1.25,
1953
+ "output": 10
1954
+ },
1955
+ "gpt-4o-audio-preview": {
1956
+ "type": "token",
1957
+ "input": 2.5,
1958
+ "output": 10
1959
+ },
1960
+ "gpt-4o-audio-preview-2024-12-17": {
1961
+ "type": "token",
1962
+ "input": 2.5,
1963
+ "output": 10
1964
+ },
1965
+ "gpt-4o-realtime-preview": {
1966
+ "type": "token",
1967
+ "input": 5,
1968
+ "input_cached": 2.5,
1969
+ "output": 20
1970
+ },
1971
+ "gpt-4o-realtime-preview-2024-12-17": {
1972
+ "type": "token",
1973
+ "input": 5,
1974
+ "input_cached": 2.5,
1975
+ "output": 20
1976
+ },
1977
+ "gpt-4o-mini": {
1978
+ "type": "token",
1979
+ "input": 0.15,
1980
+ "input_cached": 0.075,
1981
+ "output": 0.6
1982
+ },
1983
+ "gpt-4o-mini-2024-07-18": {
1984
+ "type": "token",
1985
+ "input": 0.15,
1986
+ "input_cached": 0.075,
1987
+ "output": 0.6
1988
+ },
1989
+ "gpt-4o-mini-audio-preview": {
1990
+ "type": "token",
1991
+ "input": 0.15,
1992
+ "output": 0.6
1993
+ },
1994
+ "gpt-4o-mini-audio-preview-2024-12-17": {
1995
+ "type": "token",
1996
+ "input": 0.15,
1997
+ "output": 0.6
1998
+ },
1999
+ "gpt-4o-mini-realtime-preview": {
2000
+ "type": "token",
2001
+ "input": 0.6,
2002
+ "input_cached": 0.3,
2003
+ "output": 2.4
2004
+ },
2005
+ "gpt-4o-mini-realtime-preview-2024-12-17": {
2006
+ "type": "token",
2007
+ "input": 0.6,
2008
+ "input_cached": 0.3,
2009
+ "output": 2.4
2010
+ },
2011
+ "o1": {
2012
+ "type": "token",
2013
+ "input": 15,
2014
+ "input_cached": 7.5,
2015
+ "output": 60
2016
+ },
2017
+ "o1-2024-12-17": {
2018
+ "type": "token",
2019
+ "input": 15,
2020
+ "input_cached": 7.5,
2021
+ "output": 60
2022
+ },
2023
+ "o3-mini": {
2024
+ "type": "token",
2025
+ "input": 1.1,
2026
+ "input_cached": 0.55,
2027
+ "output": 4.4
2028
+ },
2029
+ "o3-mini-2025-01-31": {
2030
+ "type": "token",
2031
+ "input": 1.1,
2032
+ "input_cached": 0.55,
2033
+ "output": 4.4
2034
+ },
2035
+ "o1-mini": {
2036
+ "type": "token",
2037
+ "input": 1.1,
2038
+ "input_cached": 0.55,
2039
+ "output": 4.4
2040
+ },
2041
+ "o1-mini-2024-09-12": {
2042
+ "type": "token",
2043
+ "input": 1.1,
2044
+ "input_cached": 0.55,
2045
+ "output": 4.4
2046
+ },
2047
+ "whisper-1": {
2048
+ "type": "minute",
2049
+ "price": 6e-3
2050
+ },
2051
+ "tts-1": {
2052
+ "type": "character",
2053
+ "price": 15e-6
2054
+ },
2055
+ "tts-1-hd": {
2056
+ "type": "character",
2057
+ "price": 3e-5
2058
+ },
2059
+ "dall-e-2": {
2060
+ "type": "image",
2061
+ "price": 0.016,
2062
+ "size": "256x256",
2063
+ "unit": "per_image"
2064
+ },
2065
+ "dall-e-2-512": {
2066
+ "type": "image",
2067
+ "price": 0.018,
2068
+ "size": "512x512",
2069
+ "unit": "per_image"
2070
+ },
2071
+ "dall-e-2-1024": {
2072
+ "type": "image",
2073
+ "price": 0.02,
2074
+ "size": "1024x1024",
2075
+ "unit": "per_image"
2076
+ },
2077
+ "dall-e-3": {
2078
+ "type": "image",
2079
+ "price": 0.04,
2080
+ "size": "1024x1024",
2081
+ "unit": "per_image"
2082
+ },
2083
+ "dall-e-3-hd": {
2084
+ "type": "image",
2085
+ "price": 0.08,
2086
+ "size": "1024x1024",
2087
+ "unit": "per_image"
2088
+ }
2089
+ }
2090
+ },
2091
+ "oracle": {
2092
+ "id": "oracle",
2093
+ "name": "Oracle Cloud",
2094
+ "apiUrl": "https://ai.oraclecloud.com",
2095
+ "apiDocsUrl": "https://docs.oracle.com/en-us/iaas/Content/generative-ai/overview.htm",
2096
+ "pricing": {
2097
+ "command-r-plus-08-2024": {
2098
+ "type": "token",
2099
+ "input": 0.015,
2100
+ "output": 0.075
2101
+ }
2102
+ }
2103
+ },
2104
+ "xai": {
2105
+ "id": "xai",
2106
+ "name": "X.AI",
2107
+ "apiUrl": "https://x.ai/api",
2108
+ "apiDocsUrl": "https://x.ai/docs",
2109
+ "pricing": {
2110
+ "grok-2-vision-1212": {
2111
+ "type": "token",
2112
+ "input": 2,
2113
+ "output": 10
2114
+ },
2115
+ "grok-2-1212": {
2116
+ "type": "token",
2117
+ "input": 2,
2118
+ "output": 10
2119
+ },
2120
+ "grok-vision-beta": {
2121
+ "type": "token",
2122
+ "input": 5,
2123
+ "output": 15
2124
+ },
2125
+ "grok-beta": {
2126
+ "type": "token",
2127
+ "input": 5,
2128
+ "output": 15
2129
+ }
2130
+ }
2131
+ }
9
2132
  };
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 });
2133
+ var organizations = {
2134
+ "openai": {
2135
+ "name": "OpenAI",
2136
+ "websiteUrl": "https://openai.com",
2137
+ "country": "USA",
2138
+ "founded": 2015
2139
+ },
2140
+ "anthropic": {
2141
+ "name": "Anthropic",
2142
+ "websiteUrl": "https://anthropic.com",
2143
+ "country": "USA",
2144
+ "founded": 2021
2145
+ },
2146
+ "meta": {
2147
+ "name": "Meta",
2148
+ "websiteUrl": "https://ai.meta.com",
2149
+ "country": "USA",
2150
+ "founded": 2004
2151
+ },
2152
+ "mistral": {
2153
+ "name": "Mistral AI",
2154
+ "websiteUrl": "https://mistral.ai",
2155
+ "country": "FRA",
2156
+ "founded": 2023
2157
+ },
2158
+ "cohere": {
2159
+ "name": "Cohere",
2160
+ "websiteUrl": "https://cohere.com",
2161
+ "country": "CAN",
2162
+ "founded": 2019
2163
+ },
2164
+ "deepseek": {
2165
+ "name": "DeepSeek",
2166
+ "websiteUrl": "https://deepseek.com",
2167
+ "country": "CHN",
2168
+ "founded": 2023
2169
+ },
2170
+ "google": {
2171
+ "name": "Google",
2172
+ "websiteUrl": "https://ai.google.dev",
2173
+ "country": "USA",
2174
+ "founded": 1998
2175
+ },
2176
+ "xai": {
2177
+ "name": "X.AI",
2178
+ "websiteUrl": "https://x.ai",
2179
+ "country": "USA",
2180
+ "founded": 2023
2181
+ },
2182
+ "groq": {
2183
+ "name": "Groq",
2184
+ "websiteUrl": "https://groq.com",
2185
+ "country": "USA",
2186
+ "founded": 2016
2187
+ },
2188
+ "azure": {
2189
+ "name": "Azure",
2190
+ "websiteUrl": "https://azure.microsoft.com/en-us/products/ai-services/openai-service",
2191
+ "country": "USA",
2192
+ "founded": 1975
2193
+ },
2194
+ "aws": {
2195
+ "name": "Amazon Web Services",
2196
+ "websiteUrl": "https://aws.amazon.com",
2197
+ "country": "USA",
2198
+ "founded": 2006
2199
+ },
2200
+ "bedrock": {
2201
+ "name": "AWS Bedrock",
2202
+ "websiteUrl": "https://aws.amazon.com/bedrock",
2203
+ "country": "USA",
2204
+ "founded": 2023
2205
+ },
2206
+ "oracle": {
2207
+ "name": "Oracle Cloud",
2208
+ "websiteUrl": "https://www.oracle.com/cloud/ai-services",
2209
+ "country": "USA",
2210
+ "founded": 1977
15
2211
  }
16
- return to;
17
2212
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- AIModels: () => AIModels,
24
- ModelCollection: () => ModelCollection,
25
- creators: () => creators_default,
26
- models: () => models
27
- });
28
- module.exports = __toCommonJS(index_exports);
29
2213
 
30
- // src/types/models.ts
2214
+ // src/types/modelCollection.ts
31
2215
  var ModelCollection = class _ModelCollection extends Array {
2216
+ // Static data stores - accessible from Model
2217
+ static providersData = {};
2218
+ static orgsData = {};
2219
+ static modelSources = {};
32
2220
  /** Create a new ModelCollection from an array of models */
33
- constructor(models2 = []) {
2221
+ constructor(models3 = []) {
34
2222
  super();
35
- if (models2.length > 0) {
36
- this.push(...models2);
2223
+ if (models3.length > 0) {
2224
+ this.push(...models3);
37
2225
  }
38
2226
  Object.setPrototypeOf(this, _ModelCollection.prototype);
39
2227
  }
2228
+ /** Set the shared providers data */
2229
+ static setProviders(providers2) {
2230
+ _ModelCollection.providersData = providers2;
2231
+ }
2232
+ /** Set the shared creators data */
2233
+ static setOrgs(orgs) {
2234
+ _ModelCollection.orgsData = orgs;
2235
+ }
40
2236
  /** Filter models by one or more capabilities (all must be present) */
41
2237
  can(...capabilities) {
42
- return this.filter((model) => capabilities.every((cap) => model.can.includes(cap)));
2238
+ return this.filter((model) => capabilities.every((cap) => model.capabilities.includes(cap)));
43
2239
  }
44
2240
  /**
45
2241
  * Fluent capability filters for better readability
@@ -105,19 +2301,19 @@ var ModelCollection = class _ModelCollection extends Array {
105
2301
  }
106
2302
  /** Get models available from a specific provider */
107
2303
  fromProvider(provider) {
108
- return this.filter((model) => model.providers.includes(provider));
2304
+ return this.filter((model) => model.providerIds.includes(provider));
109
2305
  }
110
2306
  /** Get models available from a specific creator */
111
2307
  fromCreator(creator) {
112
2308
  return new _ModelCollection(
113
- this.filter((model) => model.creator === creator)
2309
+ this.filter((model) => model.creatorId === creator)
114
2310
  );
115
2311
  }
116
2312
  /** Filter models by minimum context window size */
117
2313
  withMinContext(tokens) {
118
2314
  return this.filter((model) => {
119
2315
  const context = model.context;
120
- if (context.type !== "token" && context.type !== "character") {
2316
+ if (context?.type !== "token" && context?.type !== "character") {
121
2317
  return false;
122
2318
  }
123
2319
  if (context.total === null) {
@@ -127,2183 +2323,247 @@ var ModelCollection = class _ModelCollection extends Array {
127
2323
  });
128
2324
  }
129
2325
  /** Get all providers from all models in the collection deduplicated */
130
- getProviders() {
131
- return [...new Set(this.flatMap((model) => model.providers))];
2326
+ get providers() {
2327
+ const providerIds = [...new Set(this.flatMap((model) => model.providerIds))];
2328
+ const providers2 = [];
2329
+ for (const id of providerIds) {
2330
+ const provider = _ModelCollection.providersData[id];
2331
+ const organization = _ModelCollection.orgsData[id];
2332
+ providers2.push({
2333
+ ...organization,
2334
+ ...provider
2335
+ });
2336
+ }
2337
+ return providers2;
132
2338
  }
133
- getCreators() {
134
- return [...new Set(this.map((model) => model.creator))];
2339
+ /** Get all orgs from all models in the collection deduplicated */
2340
+ get orgs() {
2341
+ const creatorIds = [...new Set(this.map((model) => model.creatorId).filter((id) => id !== void 0))];
2342
+ return creatorIds.map((id) => _ModelCollection.orgsData[id]).filter((c) => c !== void 0);
2343
+ }
2344
+ /** Get a specific provider by ID */
2345
+ getProvider(id) {
2346
+ const provider = _ModelCollection.providersData[id];
2347
+ const organization = _ModelCollection.orgsData[id];
2348
+ return {
2349
+ ...organization,
2350
+ ...provider
2351
+ };
2352
+ }
2353
+ /** Get a specific creator by ID */
2354
+ getCreator(id) {
2355
+ return _ModelCollection.orgsData[id];
2356
+ }
2357
+ /** Get providers for a specific model */
2358
+ getProvidersForModel(modelId) {
2359
+ const model = this.id(modelId);
2360
+ if (!model || !model.providerIds) return [];
2361
+ return model.providerIds.map((id) => _ModelCollection.providersData[id]).filter((p) => p !== void 0);
2362
+ }
2363
+ /** Get creator for a specific model */
2364
+ getCreatorForModel(modelId) {
2365
+ const model = this.id(modelId);
2366
+ if (!model || !model.creatorId) return void 0;
2367
+ return _ModelCollection.orgsData[model.creatorId];
135
2368
  }
136
2369
  };
137
2370
 
138
- // src/data/models/openai-models.json
139
- var openai_models_default = {
140
- creator: "openai",
141
- models: [
142
- {
143
- id: "gpt-4",
144
- name: "GPT-4",
145
- license: "proprietary",
146
- providers: [
147
- "openai",
148
- "azure"
149
- ],
150
- can: [
151
- "chat",
152
- "txt-in",
153
- "txt-out",
154
- "json-out",
155
- "fn-out"
156
- ],
157
- context: {
158
- type: "token",
159
- total: 8192,
160
- maxOutput: 4096
161
- }
162
- },
163
- {
164
- id: "gpt-4-turbo-preview",
165
- extends: "gpt-4",
166
- overrides: {
167
- name: "GPT-4 Turbo",
168
- context: {
169
- type: "token",
170
- total: 128e3,
171
- maxOutput: 4096
172
- }
173
- }
174
- },
175
- {
176
- id: "gpt-3.5-turbo",
177
- name: "GPT-3.5 Turbo",
178
- license: "proprietary",
179
- providers: [
180
- "openai",
181
- "azure"
182
- ],
183
- can: [
184
- "chat",
185
- "txt-in",
186
- "txt-out",
187
- "json-out",
188
- "fn-out"
189
- ],
190
- context: {
191
- type: "token",
192
- total: 16385,
193
- maxOutput: 4096
194
- }
195
- },
196
- {
197
- id: "gpt-3.5-turbo-16k",
198
- extends: "gpt-3.5-turbo",
199
- overrides: {
200
- name: "GPT-3.5 Turbo 16K",
201
- context: {
202
- type: "token",
203
- total: 16385,
204
- maxOutput: 4096
205
- }
206
- }
207
- },
208
- {
209
- id: "gpt-3.5-turbo-instruct",
210
- name: "GPT-3.5 Turbo Instruct",
211
- license: "proprietary",
212
- providers: [
213
- "openai",
214
- "azure"
215
- ],
216
- can: [
217
- "txt-in",
218
- "txt-out"
219
- ],
220
- context: {
221
- type: "token",
222
- total: 4096,
223
- maxOutput: 4096
224
- }
225
- },
226
- {
227
- id: "gpt-4o",
228
- name: "GPT-4o",
229
- license: "proprietary",
230
- providers: [
231
- "openai",
232
- "azure"
233
- ],
234
- can: [
235
- "chat",
236
- "txt-in",
237
- "txt-out",
238
- "img-in",
239
- "json-out",
240
- "fn-out"
241
- ],
242
- context: {
243
- type: "token",
244
- total: 128e3,
245
- maxOutput: 16384
246
- }
247
- },
248
- {
249
- id: "chatgpt-4o-latest",
250
- extends: "gpt-4o",
251
- overrides: {
252
- name: "GPT-4o used in ChatGPT"
253
- }
254
- },
255
- {
256
- id: "gpt-4o-2024-11-20",
257
- extends: "gpt-4o",
258
- overrides: {
259
- name: "GPT-4o (2024-11-20)"
260
- }
261
- },
262
- {
263
- id: "gpt-4o-2024-08-06",
264
- extends: "gpt-4o",
265
- overrides: {
266
- name: "GPT-4o (2024-08-06)"
267
- }
268
- },
269
- {
270
- id: "gpt-4o-2024-05-13",
271
- extends: "gpt-4o",
272
- overrides: {
273
- name: "GPT-4o (2024-05-13)",
274
- context: {
275
- type: "token",
276
- total: 128e3,
277
- maxOutput: 4096
278
- }
279
- }
280
- },
281
- {
282
- id: "gpt-4o-mini",
283
- extends: "gpt-4o",
284
- overrides: {
285
- name: "GPT-4o Mini",
286
- context: {
287
- type: "token",
288
- total: 128e3,
289
- maxOutput: 16384
290
- }
291
- }
292
- },
293
- {
294
- id: "gpt-4o-audio-preview",
295
- extends: "gpt-4o",
296
- overrides: {
297
- name: "GPT-4o Audio",
298
- can: [
299
- "chat",
300
- "txt-in",
301
- "txt-out",
302
- "audio-in",
303
- "json-out",
304
- "fn-out"
305
- ],
306
- context: {
307
- type: "token",
308
- total: 128e3,
309
- maxOutput: 16384
310
- }
311
- }
312
- },
313
- {
314
- id: "gpt-4o-audio-preview-2024-12-17",
315
- extends: "gpt-4o-audio-preview",
316
- overrides: {
317
- name: "GPT-4o Audio (2024-12-17)"
318
- }
319
- },
320
- {
321
- id: "gpt-4o-audio-preview-2024-10-01",
322
- extends: "gpt-4o-audio-preview",
323
- overrides: {
324
- name: "GPT-4o Audio (2024-10-01)"
325
- }
326
- },
327
- {
328
- id: "gpt-4o-mini-audio-preview",
329
- extends: "gpt-4o-mini",
330
- overrides: {
331
- name: "GPT-4o Mini Audio",
332
- can: [
333
- "chat",
334
- "txt-in",
335
- "txt-out",
336
- "audio-in",
337
- "audio-out",
338
- "json-out",
339
- "fn-out"
340
- ],
341
- context: {
342
- type: "token",
343
- total: 128e3,
344
- maxOutput: 16384
345
- }
346
- }
347
- },
348
- {
349
- id: "gpt-4o-mini-audio-preview-2024-12-17",
350
- extends: "gpt-4o-mini-audio-preview",
351
- overrides: {
352
- name: "GPT-4o Mini Audio (2024-12-17)"
353
- }
354
- },
355
- {
356
- id: "gpt-4o-realtime-preview",
357
- extends: "gpt-4o",
358
- overrides: {
359
- name: "GPT-4o Realtime",
360
- can: [
361
- "chat",
362
- "txt-in",
363
- "txt-out",
364
- "audio-in",
365
- "json-out",
366
- "fn-out"
367
- ],
368
- context: {
369
- type: "token",
370
- total: 128e3,
371
- maxOutput: 4096
372
- }
373
- }
374
- },
375
- {
376
- id: "gpt-4o-realtime-preview-2024-12-17",
377
- extends: "gpt-4o-realtime-preview",
378
- overrides: {
379
- name: "GPT-4o Realtime (2024-12-17)"
380
- }
381
- },
382
- {
383
- id: "gpt-4o-realtime-preview-2024-10-01",
384
- extends: "gpt-4o-realtime-preview",
385
- overrides: {
386
- name: "GPT-4o Realtime (2024-10-01)"
387
- }
388
- },
389
- {
390
- id: "gpt-4o-mini-realtime-preview",
391
- extends: "gpt-4o-mini",
392
- overrides: {
393
- name: "GPT-4o Mini Realtime",
394
- can: [
395
- "chat",
396
- "txt-in",
397
- "txt-out",
398
- "audio-in",
399
- "json-out",
400
- "fn-out"
401
- ],
402
- context: {
403
- type: "token",
404
- total: 128e3,
405
- maxOutput: 4096
406
- }
407
- }
408
- },
409
- {
410
- id: "gpt-4o-mini-realtime-preview-2024-12-17",
411
- extends: "gpt-4o-mini-realtime-preview",
412
- overrides: {
413
- name: "GPT-4o Mini Realtime (2024-12-17)"
414
- }
415
- },
416
- {
417
- id: "o1",
418
- name: "OpenAI O1",
419
- license: "proprietary",
420
- providers: [
421
- "openai",
422
- "azure"
423
- ],
424
- can: [
425
- "chat",
426
- "txt-in",
427
- "txt-out",
428
- "img-in",
429
- "json-out",
430
- "fn-out",
431
- "reason"
432
- ],
433
- context: {
434
- type: "token",
435
- total: 2e5,
436
- maxOutput: 1e5
437
- }
438
- },
439
- {
440
- id: "o1-2024-12-17",
441
- extends: "o1",
442
- overrides: {
443
- name: "OpenAI O1 (2024-12-17)"
444
- }
445
- },
446
- {
447
- id: "o1-mini",
448
- extends: "o1",
449
- overrides: {
450
- name: "OpenAI O1 Mini",
451
- can: [
452
- "chat",
453
- "txt-in",
454
- "txt-out",
455
- "json-out",
456
- "fn-out",
457
- "reason"
458
- ],
459
- context: {
460
- type: "token",
461
- total: 128e3,
462
- maxOutput: 65536
463
- }
464
- }
465
- },
466
- {
467
- id: "o1-mini-2024-09-12",
468
- extends: "o1-mini",
469
- overrides: {
470
- name: "OpenAI O1 Mini (2024-09-12)"
471
- }
472
- },
473
- {
474
- id: "o1-preview",
475
- extends: "o1",
476
- overrides: {
477
- name: "OpenAI O1 Preview",
478
- context: {
479
- type: "token",
480
- total: 128e3,
481
- maxOutput: 32768
482
- }
483
- }
484
- },
485
- {
486
- id: "o1-preview-2024-09-12",
487
- extends: "o1-preview",
488
- overrides: {
489
- name: "OpenAI O1 Preview (2024-09-12)"
490
- }
491
- },
492
- {
493
- id: "o3-mini",
494
- name: "OpenAI O3 Mini",
495
- license: "proprietary",
496
- providers: [
497
- "openai",
498
- "azure"
499
- ],
500
- can: [
501
- "chat",
502
- "txt-in",
503
- "txt-out",
504
- "json-out",
505
- "fn-out",
506
- "reason"
507
- ],
508
- context: {
509
- type: "token",
510
- total: 2e5,
511
- maxOutput: 1e5
512
- }
513
- },
514
- {
515
- id: "o3-mini-2025-01-31",
516
- extends: "o3-mini",
517
- overrides: {
518
- name: "OpenAI O3 Mini (2025-01-31)"
519
- }
520
- },
521
- {
522
- id: "whisper-1",
523
- name: "Whisper",
524
- license: "proprietary",
525
- providers: [
526
- "openai",
527
- "azure"
528
- ],
529
- can: [
530
- "audio-in",
531
- "txt-out"
532
- ],
533
- context: {
534
- type: "audio-in",
535
- total: null,
536
- maxOutput: null
537
- }
538
- },
539
- {
540
- id: "tts-1",
541
- name: "TTS-1",
542
- license: "proprietary",
543
- providers: [
544
- "openai",
545
- "azure"
546
- ],
547
- can: [
548
- "txt-in",
549
- "audio-out"
550
- ],
551
- context: {
552
- type: "audio-out",
553
- total: null,
554
- maxOutput: null
555
- }
556
- },
557
- {
558
- id: "tts-1-hd",
559
- extends: "tts-1",
560
- overrides: {
561
- name: "TTS-1 HD"
562
- }
563
- },
564
- {
565
- id: "dall-e-2",
566
- name: "DALL-E 2",
567
- license: "proprietary",
568
- providers: [
569
- "openai",
570
- "azure"
571
- ],
572
- can: [
573
- "img-out"
574
- ],
575
- context: {
576
- maxOutput: 1,
577
- sizes: [
578
- "256x256",
579
- "512x512",
580
- "1024x1024"
581
- ],
582
- qualities: [
583
- "standard"
584
- ]
585
- }
586
- },
587
- {
588
- id: "dall-e-3",
589
- name: "DALL-E 3",
590
- license: "proprietary",
591
- providers: [
592
- "openai",
593
- "azure"
594
- ],
595
- can: [
596
- "txt-in",
597
- "img-out"
598
- ],
599
- context: {
600
- maxOutput: 1,
601
- sizes: [
602
- "1024x1024",
603
- "1024x1792",
604
- "1792x1024"
605
- ],
606
- qualities: [
607
- "standard",
608
- "hd"
609
- ]
610
- }
611
- },
612
- {
613
- id: "text-embedding-ada-002",
614
- name: "Text Embedding Ada 002",
615
- license: "proprietary",
616
- providers: [
617
- "openai",
618
- "azure"
619
- ],
620
- can: [
621
- "txt-in",
622
- "vec-out"
623
- ],
624
- context: {
625
- type: "embedding",
626
- total: 8191,
627
- unit: "tokens",
628
- dimensions: 1536,
629
- embeddingType: "text",
630
- normalized: true
631
- }
632
- },
633
- {
634
- id: "text-embedding-3-small",
635
- name: "Text Embedding 3 Small",
636
- license: "proprietary",
637
- providers: [
638
- "openai",
639
- "azure"
640
- ],
641
- can: [
642
- "txt-in",
643
- "vec-out"
644
- ],
645
- context: {
646
- type: "embedding",
647
- total: 8191,
648
- unit: "tokens",
649
- dimensions: 1536,
650
- embeddingType: "text",
651
- normalized: true
652
- }
653
- },
654
- {
655
- id: "text-embedding-3-large",
656
- name: "Text Embedding 3 Large",
657
- license: "proprietary",
658
- providers: [
659
- "openai",
660
- "azure"
661
- ],
662
- can: [
663
- "txt-in",
664
- "vec-out"
665
- ],
666
- context: {
667
- type: "embedding",
668
- total: 8191,
669
- unit: "tokens",
670
- dimensions: 3072,
671
- embeddingType: "text",
672
- normalized: true
2371
+ // src/types/model.ts
2372
+ var Model = class _Model {
2373
+ // Reference to the source data
2374
+ source;
2375
+ constructor(source) {
2376
+ this.source = source;
2377
+ }
2378
+ // Basic property getters (direct from source)
2379
+ get id() {
2380
+ return this.source.id;
2381
+ }
2382
+ get extends() {
2383
+ return this.source.extends;
2384
+ }
2385
+ get overrides() {
2386
+ return this.source.overrides;
2387
+ }
2388
+ // Helper method to resolve a property through the inheritance chain
2389
+ resolveProperty(propertyName) {
2390
+ if (this.source[propertyName] !== void 0) {
2391
+ return this.source[propertyName];
2392
+ }
2393
+ if (this.source.overrides && propertyName in this.source.overrides) {
2394
+ return this.source.overrides[propertyName];
2395
+ }
2396
+ if (this.source.extends) {
2397
+ const baseSource = ModelCollection.modelSources[this.source.extends];
2398
+ if (baseSource) {
2399
+ const baseModel = new _Model(baseSource);
2400
+ return baseModel.resolveProperty(propertyName);
673
2401
  }
674
2402
  }
675
- ]
676
- };
677
-
678
- // src/data/models/anthropic-models.json
679
- var anthropic_models_default = {
680
- creator: "anthropic",
681
- models: [
682
- {
683
- id: "claude-3-opus-20240229",
684
- name: "Claude 3 Opus",
685
- license: "proprietary",
686
- providers: ["anthropic", "aws", "google"],
687
- can: [
688
- "chat",
689
- "txt-in",
690
- "txt-out",
691
- "img-in",
692
- "json-out",
693
- "fn-out"
694
- ],
695
- context: {
696
- type: "token",
697
- total: 2e5,
698
- maxOutput: 4096,
699
- outputIsFixed: 1
700
- },
701
- aliases: ["claude-3-opus-latest", "claude-3-opus"]
702
- },
703
- {
704
- id: "claude-3-sonnet-20240229",
705
- name: "Claude 3 Sonnet",
706
- license: "proprietary",
707
- providers: ["anthropic", "aws", "google"],
708
- can: [
709
- "chat",
710
- "txt-in",
711
- "txt-out",
712
- "img-in",
713
- "json-out",
714
- "fn-out"
715
- ],
716
- context: {
717
- type: "token",
718
- total: 2e5,
719
- maxOutput: 4096,
720
- outputIsFixed: 1
721
- },
722
- aliases: ["claude-3-sonnet-latest", "claude-3-sonnet"]
723
- },
724
- {
725
- id: "claude-3-haiku-20240307",
726
- name: "Claude 3 Haiku",
727
- license: "proprietary",
728
- providers: ["anthropic", "aws", "google"],
729
- can: [
730
- "chat",
731
- "txt-in",
732
- "txt-out",
733
- "img-in",
734
- "json-out",
735
- "fn-out"
736
- ],
737
- context: {
738
- type: "token",
739
- total: 2e5,
740
- maxOutput: 4096,
741
- outputIsFixed: 1
742
- },
743
- aliases: ["claude-3-haiku"]
744
- },
745
- {
746
- id: "claude-3-5-sonnet-20241022",
747
- name: "Claude 3.5 Sonnet",
748
- license: "proprietary",
749
- providers: ["anthropic", "aws", "google"],
750
- can: [
751
- "chat",
752
- "txt-in",
753
- "txt-out",
754
- "img-in",
755
- "json-out",
756
- "fn-out"
757
- ],
758
- context: {
759
- type: "token",
760
- total: 2e5,
761
- maxOutput: 8192,
762
- outputIsFixed: 1
763
- },
764
- aliases: ["claude-3-5-sonnet-latest", "claude-3-5-sonnet"]
765
- },
766
- {
767
- id: "claude-3-5-sonnet-20240620",
768
- name: "Claude 3.5 Sonnet (2024-06-20)",
769
- license: "proprietary",
770
- providers: ["anthropic", "aws", "google"],
771
- can: [
772
- "chat",
773
- "txt-in",
774
- "txt-out",
775
- "img-in",
776
- "json-out",
777
- "fn-out"
778
- ],
779
- context: {
780
- type: "token",
781
- total: 2e5,
782
- maxOutput: 8192,
783
- outputIsFixed: 1
784
- }
785
- },
786
- {
787
- id: "claude-3-5-haiku-20241022",
788
- name: "Claude 3.5 Haiku",
789
- license: "proprietary",
790
- providers: ["anthropic", "aws", "google"],
791
- can: [
792
- "chat",
793
- "txt-in",
794
- "txt-out",
795
- "json-out",
796
- "fn-out"
797
- ],
798
- context: {
799
- type: "token",
800
- total: 2e5,
801
- maxOutput: 8192,
802
- outputIsFixed: 1
803
- },
804
- aliases: ["claude-3-5-haiku-latest", "claude-3-5-haiku"]
805
- },
806
- {
807
- id: "claude-3-7-sonnet-20250219",
808
- name: "Claude 3.7 Sonnet",
809
- license: "proprietary",
810
- providers: ["anthropic", "aws", "google"],
811
- can: [
812
- "chat",
813
- "txt-in",
814
- "txt-out",
815
- "img-in",
816
- "json-out",
817
- "fn-out",
818
- "reason"
819
- ],
820
- context: {
821
- type: "token",
822
- total: 2e5,
823
- maxOutput: 8192,
824
- outputIsFixed: 1,
825
- extended: {
826
- reasoning: {
827
- maxOutput: 64e3
828
- },
829
- experimental: {
830
- maxOutput: 128e3
831
- }
832
- }
833
- },
834
- aliases: ["claude-3-7-sonnet-latest", "claude-3-7-sonnet"]
835
- }
836
- ]
837
- };
838
-
839
- // src/data/models/meta-models.json
840
- var meta_models_default = {
841
- creator: "meta",
842
- models: [
843
- {
844
- id: "llama3-70b-8192",
845
- name: "Llama 3 70B",
846
- license: "llama-3-community",
847
- providers: ["groq"],
848
- can: ["chat", "txt-in", "txt-out", "json-out", "fn-out"],
849
- context: {
850
- type: "token",
851
- total: 8192,
852
- maxOutput: 4096
853
- }
854
- },
855
- {
856
- id: "llama3-8b-8192",
857
- name: "Llama 3 8B",
858
- license: "llama-3-community",
859
- providers: ["groq"],
860
- can: ["chat", "txt-in", "txt-out", "json-out", "fn-out"],
861
- context: {
862
- type: "token",
863
- total: 8192,
864
- maxOutput: 4096
865
- }
866
- },
867
- {
868
- id: "llama-3.2-11b-vision-preview",
869
- name: "Llama 3.2 11B Vision",
870
- license: "llama-3-community",
871
- providers: ["groq"],
872
- can: ["chat", "txt-in", "txt-out", "img-in"],
873
- context: {
874
- type: "token",
875
- total: 4096,
876
- maxOutput: 4096
877
- }
878
- },
879
- {
880
- id: "llama-3.2-90b-vision-preview",
881
- name: "Llama 3.2 90B Vision",
882
- license: "llama-3-community",
883
- providers: ["groq"],
884
- can: ["chat", "txt-in", "txt-out", "img-in"],
885
- context: {
886
- type: "token",
887
- total: 4096,
888
- maxOutput: 4096
889
- }
890
- },
891
- {
892
- id: "llama-guard-3-8b",
893
- name: "LlamaGuard 3 8B",
894
- license: "llama-3-community",
895
- providers: ["groq"],
896
- can: ["chat", "txt-in", "txt-out"],
897
- context: {
898
- type: "token",
899
- total: 4096,
900
- maxOutput: 4096
901
- }
902
- }
903
- ]
904
- };
905
-
906
- // src/data/models/mistral-models.json
907
- var mistral_models_default = {
908
- creator: "mistral",
909
- models: [
910
- {
911
- id: "mistral-large-2402",
912
- name: "Mistral Large",
913
- license: "proprietary",
914
- providers: ["mistral", "azure"],
915
- can: [
916
- "chat",
917
- "txt-in",
918
- "txt-out",
919
- "json-out",
920
- "fn-out"
921
- ],
922
- context: {
923
- type: "token",
924
- total: 32768,
925
- maxOutput: 4096
926
- }
927
- },
928
- {
929
- id: "mistral-small-2402",
930
- name: "Mistral Small",
931
- license: "proprietary",
932
- providers: ["mistral", "azure"],
933
- can: [
934
- "chat",
935
- "txt-in",
936
- "txt-out",
937
- "json-out",
938
- "fn-out"
939
- ],
940
- context: {
941
- type: "token",
942
- total: 32768,
943
- maxOutput: 4096
944
- }
945
- },
946
- {
947
- id: "mistral-medium",
948
- name: "Mistral Medium",
949
- license: "proprietary",
950
- providers: ["mistral"],
951
- can: [
952
- "chat",
953
- "txt-in",
954
- "txt-out"
955
- ],
956
- context: {
957
- type: "token",
958
- total: 32768,
959
- maxOutput: 4096
960
- }
961
- },
962
- {
963
- id: "open-mistral-7b",
964
- name: "Open Mistral 7B",
965
- license: "apache-2.0",
966
- providers: ["mistral", "groq"],
967
- can: [
968
- "chat",
969
- "txt-in",
970
- "txt-out"
971
- ],
972
- context: {
973
- type: "token",
974
- total: 32768,
975
- maxOutput: 4096
976
- }
977
- },
978
- {
979
- id: "open-mixtral-8x7b",
980
- name: "Open Mixtral 8x7B",
981
- license: "apache-2.0",
982
- providers: ["mistral", "groq"],
983
- can: [
984
- "chat",
985
- "txt-in",
986
- "txt-out"
987
- ],
988
- context: {
989
- type: "token",
990
- total: 32768,
991
- maxOutput: 4096
992
- }
993
- }
994
- ]
995
- };
996
-
997
- // src/data/models/google-models.json
998
- var google_models_default = {
999
- creator: "google",
1000
- models: [
1001
- {
1002
- id: "gemini-2.0-flash",
1003
- name: "Gemini 2.0 Flash",
1004
- license: "proprietary",
1005
- providers: ["google"],
1006
- can: ["chat", "txt-in", "txt-out", "json-out", "fn-out", "img-in", "audio-in", "reason"],
1007
- context: {
1008
- type: "token",
1009
- total: 1048576,
1010
- maxOutput: 8192
1011
- },
1012
- aliases: ["gemini-2.0-flash-001"]
1013
- },
1014
- {
1015
- id: "gemini-2.0-flash-lite",
1016
- name: "Gemini 2.0 Flash Lite",
1017
- license: "proprietary",
1018
- providers: ["google"],
1019
- can: ["chat", "txt-in", "txt-out", "json-out", "fn-out", "img-in", "audio-in"],
1020
- context: {
1021
- type: "token",
1022
- total: 1048576,
1023
- maxOutput: 8192
1024
- },
1025
- aliases: ["gemini-2.0-flash-lite-preview-02-05"]
1026
- },
1027
- {
1028
- id: "gemini-1.5-flash",
1029
- name: "Gemini 1.5 Flash",
1030
- license: "proprietary",
1031
- providers: ["google"],
1032
- can: ["chat", "txt-in", "txt-out", "json-out", "fn-out", "img-in", "audio-in"],
1033
- context: {
1034
- type: "token",
1035
- total: 2097152,
1036
- maxOutput: 8192
1037
- }
1038
- },
1039
- {
1040
- id: "gemini-1.5-flash-8b",
1041
- name: "Gemini 1.5 Flash 8B",
1042
- license: "proprietary",
1043
- providers: ["google"],
1044
- can: ["chat", "txt-in", "txt-out", "json-out", "fn-out", "img-in", "audio-in"],
1045
- context: {
1046
- type: "token",
1047
- total: 2097152,
1048
- maxOutput: 8192
1049
- }
1050
- },
1051
- {
1052
- id: "gemini-1.5-pro",
1053
- name: "Gemini 1.5 Pro",
1054
- license: "proprietary",
1055
- providers: ["google"],
1056
- can: ["chat", "txt-in", "txt-out", "json-out", "fn-out", "img-in", "audio-in", "reason"],
1057
- context: {
1058
- type: "token",
1059
- total: 2097152,
1060
- maxOutput: 8192
1061
- },
1062
- aliases: ["gemini-1.5-pro-latest", "gemini-1.5-pro-001", "gemini-1.5-pro-002"]
1063
- },
1064
- {
1065
- id: "text-embedding-004",
1066
- name: "Text Embedding 004",
1067
- license: "proprietary",
1068
- providers: ["google"],
1069
- can: ["txt-in", "vec-out"],
1070
- context: {
1071
- type: "token",
1072
- total: 2048,
1073
- maxOutput: 768
1074
- }
1075
- },
1076
- {
1077
- id: "gemma-7b-it",
1078
- name: "Gemma 7B Instruct",
1079
- license: "apache-2.0",
1080
- providers: ["google"],
1081
- can: ["chat", "txt-in", "txt-out", "json-out", "fn-out"],
1082
- context: {
1083
- type: "token",
1084
- total: 8192,
1085
- maxOutput: 4096
1086
- }
1087
- },
1088
- {
1089
- id: "gemma-2b-it",
1090
- name: "Gemma 2B Instruct",
1091
- license: "apache-2.0",
1092
- providers: ["google"],
1093
- can: ["chat", "txt-in", "txt-out", "json-out", "fn-out"],
1094
- context: {
1095
- type: "token",
1096
- total: 8192,
1097
- maxOutput: 4096
1098
- }
1099
- }
1100
- ]
1101
- };
1102
-
1103
- // src/data/models/deepseek-models.json
1104
- var deepseek_models_default = {
1105
- creator: "deepseek",
1106
- models: [
1107
- {
1108
- id: "deepseek-chat",
1109
- name: "DeepSeek V3",
1110
- license: "apache-2.0",
1111
- providers: ["deepseek"],
1112
- can: [
1113
- "chat",
1114
- "txt-in",
1115
- "txt-out",
1116
- "json-out",
1117
- "fn-out"
1118
- ],
1119
- context: {
1120
- type: "token",
1121
- total: 131072,
1122
- maxOutput: 8192
1123
- }
1124
- },
1125
- {
1126
- id: "deepseek-reasoner",
1127
- name: "DeepSeek R1",
1128
- license: "apache-2.0",
1129
- providers: ["deepseek"],
1130
- can: [
1131
- "chat",
1132
- "txt-in",
1133
- "txt-out",
1134
- "json-out",
1135
- "fn-out",
1136
- "reason"
1137
- ],
1138
- context: {
1139
- type: "token",
1140
- total: 131072,
1141
- maxOutput: 8192
1142
- }
1143
- }
1144
- ]
1145
- };
1146
-
1147
- // src/data/models/xai-models.json
1148
- var xai_models_default = {
1149
- creator: "xai",
1150
- models: [
1151
- {
1152
- id: "grok-2-vision-1212",
1153
- name: "Grok 2 Vision",
1154
- creator: "xai",
1155
- license: "proprietary",
1156
- providers: ["xai"],
1157
- can: ["chat", "txt-in", "txt-out", "img-in"],
1158
- context: {
1159
- type: "token",
1160
- total: 32768,
1161
- maxOutput: 4096
1162
- },
1163
- aliases: ["grok-2-vision", "grok-2-vision-latest"]
1164
- },
1165
- {
1166
- id: "grok-2-1212",
1167
- name: "Grok 2",
1168
- creator: "xai",
1169
- license: "proprietary",
1170
- providers: ["xai"],
1171
- can: ["chat", "txt-in", "txt-out"],
1172
- context: {
1173
- type: "token",
1174
- total: 131072,
1175
- maxOutput: 4096
1176
- },
1177
- aliases: ["grok-2", "grok-2-latest"]
1178
- },
1179
- {
1180
- id: "grok-vision-beta",
1181
- name: "Grok Vision Beta",
1182
- creator: "xai",
1183
- license: "proprietary",
1184
- providers: ["xai"],
1185
- can: ["chat", "txt-in", "txt-out", "img-in"],
1186
- context: {
1187
- type: "token",
1188
- total: 8192,
1189
- maxOutput: 4096
1190
- }
1191
- },
1192
- {
1193
- id: "grok-beta",
1194
- name: "Grok Beta",
1195
- creator: "xai",
1196
- license: "proprietary",
1197
- providers: ["xai"],
1198
- can: ["chat", "txt-in", "txt-out"],
1199
- context: {
1200
- type: "token",
1201
- total: 131072,
1202
- maxOutput: 4096
1203
- }
1204
- }
1205
- ]
1206
- };
1207
-
1208
- // src/data/models/cohere-models.json
1209
- var cohere_models_default = {
1210
- creator: "cohere",
1211
- models: [
1212
- {
1213
- id: "command-r7b-12-2024",
1214
- name: "Command R7B",
1215
- creator: "cohere",
1216
- license: "proprietary",
1217
- providers: [
1218
- "cohere"
1219
- ],
1220
- can: [
1221
- "chat",
1222
- "txt-in",
1223
- "txt-out",
1224
- "json-out",
1225
- "fn-out"
1226
- ],
1227
- context: {
1228
- type: "token",
1229
- total: 128e3,
1230
- maxOutput: 4096
1231
- }
1232
- },
1233
- {
1234
- id: "command-r-plus-08-2024",
1235
- name: "Command R+",
1236
- creator: "cohere",
1237
- license: "proprietary",
1238
- providers: [
1239
- "cohere",
1240
- "bedrock",
1241
- "azure",
1242
- "oracle"
1243
- ],
1244
- can: [
1245
- "chat",
1246
- "txt-in",
1247
- "txt-out",
1248
- "json-out",
1249
- "fn-out"
1250
- ],
1251
- context: {
1252
- type: "token",
1253
- total: 128e3,
1254
- maxOutput: 4096
1255
- },
1256
- aliases: [
1257
- "command-r-plus"
1258
- ]
1259
- },
1260
- {
1261
- id: "command-r-03-2024",
1262
- name: "Command R",
1263
- creator: "cohere",
1264
- license: "proprietary",
1265
- providers: [
1266
- "cohere",
1267
- "bedrock",
1268
- "azure",
1269
- "oracle"
1270
- ],
1271
- can: [
1272
- "chat",
1273
- "txt-in",
1274
- "txt-out",
1275
- "reason",
1276
- "json-out",
1277
- "fn-out"
1278
- ],
1279
- context: {
1280
- type: "token",
1281
- total: 128e3,
1282
- maxOutput: 4096
1283
- },
1284
- aliases: [
1285
- "command-r"
1286
- ]
1287
- },
1288
- {
1289
- id: "command",
1290
- name: "Command",
1291
- creator: "cohere",
1292
- license: "proprietary",
1293
- providers: [
1294
- "cohere",
1295
- "bedrock",
1296
- "oracle"
1297
- ],
1298
- can: [
1299
- "chat",
1300
- "txt-in",
1301
- "txt-out"
1302
- ],
1303
- context: {
1304
- type: "token",
1305
- total: 4096,
1306
- maxOutput: 4096
1307
- }
1308
- },
1309
- {
1310
- id: "command-light",
1311
- name: "Command Light",
1312
- creator: "cohere",
1313
- license: "proprietary",
1314
- providers: [
1315
- "cohere",
1316
- "bedrock",
1317
- "oracle"
1318
- ],
1319
- can: [
1320
- "chat",
1321
- "txt-in",
1322
- "txt-out"
1323
- ],
1324
- context: {
1325
- type: "token",
1326
- total: 4096,
1327
- maxOutput: 4096
1328
- }
1329
- },
1330
- {
1331
- id: "embed-english-v3.0",
1332
- name: "Embed English v3.0",
1333
- creator: "cohere",
1334
- license: "proprietary",
1335
- providers: [
1336
- "cohere",
1337
- "bedrock",
1338
- "azure",
1339
- "oracle"
1340
- ],
1341
- can: [
1342
- "txt-in",
1343
- "img-in",
1344
- "vec-out"
1345
- ],
1346
- context: {
1347
- type: "token",
1348
- total: 512,
1349
- maxOutput: 1024
1350
- }
1351
- },
1352
- {
1353
- id: "embed-english-light-v3.0",
1354
- name: "Embed English Light v3.0",
1355
- creator: "cohere",
1356
- license: "proprietary",
1357
- providers: [
1358
- "cohere",
1359
- "oracle"
1360
- ],
1361
- can: [
1362
- "txt-in",
1363
- "img-in",
1364
- "vec-out"
1365
- ],
1366
- context: {
1367
- type: "token",
1368
- total: 512,
1369
- maxOutput: 384
1370
- }
1371
- },
1372
- {
1373
- id: "embed-multilingual-v3.0",
1374
- name: "Embed Multilingual v3.0",
1375
- creator: "cohere",
1376
- license: "proprietary",
1377
- providers: [
1378
- "cohere",
1379
- "bedrock",
1380
- "azure",
1381
- "oracle"
1382
- ],
1383
- can: [
1384
- "txt-in",
1385
- "img-in",
1386
- "vec-out"
1387
- ],
1388
- context: {
1389
- type: "token",
1390
- total: 512,
1391
- maxOutput: 1024
1392
- }
1393
- },
1394
- {
1395
- id: "embed-multilingual-light-v3.0",
1396
- name: "Embed Multilingual Light v3.0",
1397
- creator: "cohere",
1398
- license: "proprietary",
1399
- providers: [
1400
- "cohere",
1401
- "oracle"
1402
- ],
1403
- can: [
1404
- "txt-in",
1405
- "img-in",
1406
- "vec-out"
1407
- ],
1408
- context: {
1409
- type: "token",
1410
- total: 512,
1411
- maxOutput: 384
1412
- }
1413
- },
1414
- {
1415
- id: "rerank-v3.5",
1416
- name: "Rerank v3.5",
1417
- creator: "cohere",
1418
- license: "proprietary",
1419
- providers: [
1420
- "cohere",
1421
- "bedrock",
1422
- "azure"
1423
- ],
1424
- can: [
1425
- "txt-in",
1426
- "txt-out"
1427
- ],
1428
- context: {
1429
- type: "token",
1430
- total: 4096,
1431
- maxOutput: null
1432
- }
1433
- },
1434
- {
1435
- id: "rerank-english-v3.0",
1436
- name: "Rerank English v3.0",
1437
- creator: "cohere",
1438
- license: "proprietary",
1439
- providers: [
1440
- "cohere",
1441
- "azure"
1442
- ],
1443
- can: [
1444
- "txt-in",
1445
- "txt-out"
1446
- ],
1447
- context: {
1448
- type: "token",
1449
- total: 4096,
1450
- maxOutput: null
1451
- }
1452
- },
1453
- {
1454
- id: "rerank-multilingual-v3.0",
1455
- name: "Rerank Multilingual v3.0",
1456
- creator: "cohere",
1457
- license: "proprietary",
1458
- providers: [
1459
- "cohere",
1460
- "azure"
1461
- ],
1462
- can: [
1463
- "txt-in",
1464
- "txt-out"
1465
- ],
1466
- context: {
1467
- type: "token",
1468
- total: 4096,
1469
- maxOutput: null
1470
- }
1471
- }
1472
- ]
1473
- };
1474
-
1475
- // src/builders/models.ts
1476
- function validateModel(raw) {
1477
- if (typeof raw !== "object" || raw === null) {
1478
- throw new Error("Model data must be an object");
1479
- }
1480
- const model = raw;
1481
- const stringFields = ["id", "name", "creator", "license"];
1482
- for (const field of stringFields) {
1483
- if (typeof model[field] !== "string") {
1484
- throw new Error(`Model ${field} must be a string`);
1485
- }
1486
- }
1487
- if (model.extends !== void 0 && typeof model.extends !== "string") {
1488
- throw new Error("Model extends must be a string");
1489
- }
1490
- if (model.overrides !== void 0) {
1491
- if (typeof model.overrides !== "object" || model.overrides === null) {
1492
- throw new Error("Model overrides must be an object");
1493
- }
1494
- const validOverrideFields = ["name", "creator", "license", "providers", "can", "languages", "aliases", "context"];
1495
- const invalidFields = Object.keys(model.overrides).filter((field) => !validOverrideFields.includes(field));
1496
- if (invalidFields.length > 0) {
1497
- throw new Error(`Invalid override fields: ${invalidFields.join(", ")}`);
1498
- }
1499
- }
1500
- if (!Array.isArray(model.providers)) {
1501
- throw new Error("Model providers must be an array");
1502
- }
1503
- if (!model.providers.every((p) => typeof p === "string")) {
1504
- throw new Error("Model providers must be strings");
2403
+ return void 0;
1505
2404
  }
1506
- if (!Array.isArray(model.can)) {
1507
- throw new Error("Model capabilities must be an array");
2405
+ // Enhanced property getters (with inheritance resolution)
2406
+ get name() {
2407
+ return this.resolveProperty("name") || this.id;
1508
2408
  }
1509
- const validCapabilities = [
1510
- "chat",
1511
- "reason",
1512
- "txt-in",
1513
- "txt-out",
1514
- "img-in",
1515
- "img-out",
1516
- "audio-in",
1517
- "audio-out",
1518
- "json-out",
1519
- "fn-out",
1520
- "vec-out"
1521
- ];
1522
- if (!model.can.every((c) => validCapabilities.includes(c))) {
1523
- throw new Error(`Model has invalid capabilities: ${model.can.join(", ")}`);
1524
- }
1525
- if (model.aliases !== void 0) {
1526
- if (!Array.isArray(model.aliases)) {
1527
- throw new Error("Model aliases must be an array");
1528
- }
1529
- if (!model.aliases.every((a) => typeof a === "string")) {
1530
- throw new Error("Model aliases must be strings");
1531
- }
2409
+ // The array of capabilities - accessed through capabilities property
2410
+ get capabilities() {
2411
+ return this.resolveProperty("capabilities") || [];
1532
2412
  }
1533
- if (typeof model.context !== "object" || model.context === null) {
1534
- throw new Error("Model context must be an object");
2413
+ get context() {
2414
+ return this.resolveProperty("context");
1535
2415
  }
1536
- const context = model.context;
1537
- if (Array.isArray(context.sizes) && Array.isArray(context.qualities)) {
1538
- if (typeof context.maxOutput !== "number") {
1539
- throw new Error("Image model context.maxOutput must be a number");
1540
- }
1541
- } else if (context.type === "embedding") {
1542
- if (typeof context.total !== "number") {
1543
- throw new Error("Embedding model context.total must be a number");
1544
- }
1545
- if (typeof context.unit !== "string") {
1546
- throw new Error("Embedding model context.unit must be a string");
1547
- }
1548
- if (typeof context.dimensions !== "number") {
1549
- throw new Error("Embedding model context.dimensions must be a number");
1550
- }
1551
- } else {
1552
- if (typeof context.total !== "number" && context.total !== null) {
1553
- throw new Error("Token model context.total must be a number or null");
1554
- }
1555
- if (typeof context.maxOutput !== "number" && context.maxOutput !== null) {
1556
- throw new Error("Token model context.maxOutput must be a number or null");
1557
- }
2416
+ get license() {
2417
+ return this.resolveProperty("license");
1558
2418
  }
1559
- return {
1560
- id: model.id,
1561
- name: model.name,
1562
- creator: model.creator,
1563
- license: model.license,
1564
- providers: model.providers,
1565
- can: model.can,
1566
- context: model.context,
1567
- ...model.languages ? { languages: model.languages } : {},
1568
- ...model.aliases ? { aliases: model.aliases } : {},
1569
- ...model.extends ? { extends: model.extends } : {},
1570
- ...model.overrides ? { overrides: model.overrides } : {}
1571
- };
1572
- }
1573
- function resolveModel(model, allModels2, visited = /* @__PURE__ */ new Set()) {
1574
- if (!model.extends) {
1575
- return model;
2419
+ get languages() {
2420
+ return this.resolveProperty("languages");
1576
2421
  }
1577
- if (visited.has(model.id)) {
1578
- throw new Error(`Circular dependency detected for model ${model.id}`);
2422
+ get aliases() {
2423
+ return this.resolveProperty("aliases");
1579
2424
  }
1580
- visited.add(model.id);
1581
- const baseModel = allModels2[model.extends];
1582
- if (!baseModel) {
1583
- throw new Error(`Base model ${model.extends} not found for ${model.id}`);
2425
+ // Getters for related objects
2426
+ get providerIds() {
2427
+ return this.resolveProperty("providerIds") || [];
1584
2428
  }
1585
- const resolvedBase = resolveModel(baseModel, allModels2, visited);
1586
- if (!model.overrides) {
1587
- return {
1588
- ...resolvedBase,
1589
- id: model.id,
1590
- extends: model.extends
1591
- };
1592
- }
1593
- const resolved = {
1594
- ...resolvedBase,
1595
- ...model.overrides,
1596
- id: model.id,
1597
- extends: model.extends
1598
- };
1599
- if (!resolved.name || !resolved.creator || !resolved.license || !resolved.providers || !resolved.can || !resolved.context) {
1600
- throw new Error(`Missing required fields in resolved model ${model.id}`);
1601
- }
1602
- return resolved;
1603
- }
1604
- function buildAllModels() {
1605
- const allModelData = [
1606
- openai_models_default,
1607
- anthropic_models_default,
1608
- meta_models_default,
1609
- mistral_models_default,
1610
- google_models_default,
1611
- deepseek_models_default,
1612
- xai_models_default,
1613
- cohere_models_default
1614
- ];
1615
- const allModels2 = allModelData.flatMap(
1616
- (data) => data.models.map((model) => {
1617
- if (typeof model.id !== "string") {
1618
- throw new Error(`Model id must be a string`);
1619
- }
1620
- if (model.extends !== void 0 && typeof model.extends !== "string") {
1621
- throw new Error("Model extends must be a string");
1622
- }
1623
- if (model.overrides !== void 0 && (typeof model.overrides !== "object" || model.overrides === null)) {
1624
- throw new Error("Model overrides must be an object");
1625
- }
1626
- return {
1627
- ...model,
1628
- creator: data.creator
1629
- };
1630
- })
1631
- );
1632
- const modelMap = Object.fromEntries(
1633
- allModels2.map((model) => [model.id, model])
1634
- );
1635
- const resolvedModels = allModels2.map(
1636
- (model) => resolveModel(model, modelMap)
1637
- );
1638
- return resolvedModels.map((model) => validateModel(model));
1639
- }
1640
-
1641
- // src/data/providers/openai-provider.json
1642
- var openai_provider_default = {
1643
- id: "openai",
1644
- name: "OpenAI",
1645
- websiteUrl: "https://openai.com/",
1646
- apiUrl: "https://api.openai.com/v1",
1647
- defaultModel: "gpt-4o",
1648
- models: {
1649
- "chatgpt-4o-latest": {
1650
- type: "token",
1651
- input: 5,
1652
- output: 15
1653
- },
1654
- "gpt-4": {
1655
- type: "token",
1656
- input: 30,
1657
- output: 60
1658
- },
1659
- "gpt-4-0613": {
1660
- type: "token",
1661
- input: 30,
1662
- output: 60
1663
- },
1664
- "gpt-4-32k": {
1665
- type: "token",
1666
- input: 60,
1667
- output: 120
1668
- },
1669
- "gpt-4-turbo": {
1670
- type: "token",
1671
- input: 10,
1672
- output: 30
1673
- },
1674
- "gpt-4-turbo-2024-04-09": {
1675
- type: "token",
1676
- input: 10,
1677
- output: 30
1678
- },
1679
- "gpt-3.5-turbo": {
1680
- type: "token",
1681
- input: 0.5,
1682
- output: 1.5
1683
- },
1684
- "gpt-3.5-turbo-0125": {
1685
- type: "token",
1686
- input: 0.5,
1687
- output: 1.5
1688
- },
1689
- "gpt-3.5-turbo-instruct": {
1690
- type: "token",
1691
- input: 1.5,
1692
- output: 2
1693
- },
1694
- "gpt-3.5-turbo-16k-0613": {
1695
- type: "token",
1696
- input: 3,
1697
- output: 4
1698
- },
1699
- "davinci-002": {
1700
- type: "token",
1701
- input: 2,
1702
- output: 2
1703
- },
1704
- "babbage-002": {
1705
- type: "token",
1706
- input: 0.4,
1707
- output: 0.4
1708
- },
1709
- "gpt-4o": {
1710
- type: "token",
1711
- input: 2.5,
1712
- input_cached: 1.25,
1713
- output: 10
1714
- },
1715
- "gpt-4o-2024-08-06": {
1716
- type: "token",
1717
- input: 2.5,
1718
- input_cached: 1.25,
1719
- output: 10
1720
- },
1721
- "gpt-4o-audio-preview": {
1722
- type: "token",
1723
- input: 2.5,
1724
- output: 10
1725
- },
1726
- "gpt-4o-audio-preview-2024-12-17": {
1727
- type: "token",
1728
- input: 2.5,
1729
- output: 10
1730
- },
1731
- "gpt-4o-realtime-preview": {
1732
- type: "token",
1733
- input: 5,
1734
- input_cached: 2.5,
1735
- output: 20
1736
- },
1737
- "gpt-4o-realtime-preview-2024-12-17": {
1738
- type: "token",
1739
- input: 5,
1740
- input_cached: 2.5,
1741
- output: 20
1742
- },
1743
- "gpt-4o-mini": {
1744
- type: "token",
1745
- input: 0.15,
1746
- input_cached: 0.075,
1747
- output: 0.6
1748
- },
1749
- "gpt-4o-mini-2024-07-18": {
1750
- type: "token",
1751
- input: 0.15,
1752
- input_cached: 0.075,
1753
- output: 0.6
1754
- },
1755
- "gpt-4o-mini-audio-preview": {
1756
- type: "token",
1757
- input: 0.15,
1758
- output: 0.6
1759
- },
1760
- "gpt-4o-mini-audio-preview-2024-12-17": {
1761
- type: "token",
1762
- input: 0.15,
1763
- output: 0.6
1764
- },
1765
- "gpt-4o-mini-realtime-preview": {
1766
- type: "token",
1767
- input: 0.6,
1768
- input_cached: 0.3,
1769
- output: 2.4
1770
- },
1771
- "gpt-4o-mini-realtime-preview-2024-12-17": {
1772
- type: "token",
1773
- input: 0.6,
1774
- input_cached: 0.3,
1775
- output: 2.4
1776
- },
1777
- o1: {
1778
- type: "token",
1779
- input: 15,
1780
- input_cached: 7.5,
1781
- output: 60
1782
- },
1783
- "o1-2024-12-17": {
1784
- type: "token",
1785
- input: 15,
1786
- input_cached: 7.5,
1787
- output: 60
1788
- },
1789
- "o3-mini": {
1790
- type: "token",
1791
- input: 1.1,
1792
- input_cached: 0.55,
1793
- output: 4.4
1794
- },
1795
- "o3-mini-2025-01-31": {
1796
- type: "token",
1797
- input: 1.1,
1798
- input_cached: 0.55,
1799
- output: 4.4
1800
- },
1801
- "o1-mini": {
1802
- type: "token",
1803
- input: 1.1,
1804
- input_cached: 0.55,
1805
- output: 4.4
1806
- },
1807
- "o1-mini-2024-09-12": {
1808
- type: "token",
1809
- input: 1.1,
1810
- input_cached: 0.55,
1811
- output: 4.4
1812
- },
1813
- "whisper-1": {
1814
- type: "minute",
1815
- price: 6e-3
1816
- },
1817
- "tts-1": {
1818
- type: "character",
1819
- price: 15e-6
1820
- },
1821
- "tts-1-hd": {
1822
- type: "character",
1823
- price: 3e-5
1824
- },
1825
- "dall-e-2": {
1826
- type: "image",
1827
- price: 0.016,
1828
- size: "256x256",
1829
- unit: "per_image"
1830
- },
1831
- "dall-e-2-512": {
1832
- type: "image",
1833
- price: 0.018,
1834
- size: "512x512",
1835
- unit: "per_image"
1836
- },
1837
- "dall-e-2-1024": {
1838
- type: "image",
1839
- price: 0.02,
1840
- size: "1024x1024",
1841
- unit: "per_image"
1842
- },
1843
- "dall-e-3": {
1844
- type: "image",
1845
- price: 0.04,
1846
- size: "1024x1024",
1847
- unit: "per_image"
1848
- },
1849
- "dall-e-3-hd": {
1850
- type: "image",
1851
- price: 0.08,
1852
- size: "1024x1024",
1853
- unit: "per_image"
1854
- }
1855
- }
1856
- };
1857
-
1858
- // src/data/providers/anthropic-provider.json
1859
- var anthropic_provider_default = {
1860
- id: "anthropic",
1861
- name: "Anthropic",
1862
- websiteUrl: "https://www.anthropic.com/",
1863
- apiUrl: "https://api.anthropic.com/v1",
1864
- defaultModel: "claude-3-5-sonnet-20241022",
1865
- models: {
1866
- "claude-3-opus-20240229": {
1867
- type: "token",
1868
- input: 15,
1869
- output: 75
1870
- },
1871
- "claude-3-sonnet-20240229": {
1872
- type: "token",
1873
- input: 3,
1874
- output: 15
1875
- },
1876
- "claude-3-haiku-20240307": {
1877
- type: "token",
1878
- input: 0.25,
1879
- output: 1.25
1880
- },
1881
- "claude-3-5-sonnet-20241022": {
1882
- type: "token",
1883
- input: 3,
1884
- output: 15
1885
- },
1886
- "claude-3-5-sonnet-20240620": {
1887
- type: "token",
1888
- input: 3,
1889
- output: 15
1890
- },
1891
- "claude-3-5-haiku-20241022": {
1892
- type: "token",
1893
- input: 0.8,
1894
- output: 4
2429
+ get providers() {
2430
+ const providers2 = [];
2431
+ for (const id of this.providerIds) {
2432
+ const provider = ModelCollection.providersData[id];
2433
+ const organization = ModelCollection.orgsData[id];
2434
+ providers2.push({
2435
+ ...organization,
2436
+ ...provider
2437
+ });
1895
2438
  }
2439
+ return providers2;
1896
2440
  }
1897
- };
1898
-
1899
- // src/data/providers/mistral-provider.json
1900
- var mistral_provider_default = {
1901
- id: "mistral",
1902
- name: "Mistral",
1903
- websiteUrl: "https://mistral.ai/",
1904
- apiUrl: "https://api.mistral.ai/v1",
1905
- defaultModel: "mixtral-8x7b-32768",
1906
- models: {
1907
- "mixtral-8x7b-32768": {
1908
- type: "token",
1909
- input: 0.7,
1910
- output: 0.7
1911
- },
1912
- "mistral-large-latest": {
1913
- type: "token",
1914
- input: 0.7,
1915
- output: 0.7
1916
- }
2441
+ get creatorId() {
2442
+ return this.resolveProperty("creatorId");
1917
2443
  }
1918
- };
1919
-
1920
- // src/data/providers/cohere-provider.json
1921
- var cohere_provider_default = {
1922
- id: "cohere",
1923
- name: "Cohere",
1924
- websiteUrl: "https://cohere.com",
1925
- apiUrl: "https://docs.cohere.com/reference",
1926
- models: {
1927
- "command-r7b-12-2024": {
1928
- type: "token",
1929
- input: 0.0375,
1930
- output: 0.15
1931
- },
1932
- "command-r-plus-08-2024": {
1933
- type: "token",
1934
- input: 2.5,
1935
- output: 10
1936
- },
1937
- "command-r-03-2024": {
1938
- type: "token",
1939
- input: 0.15,
1940
- output: 0.6
1941
- },
1942
- command: {
1943
- type: "token",
1944
- input: 1500,
1945
- output: 2e3
1946
- },
1947
- "command-light": {
1948
- type: "token",
1949
- input: 300,
1950
- output: 600
1951
- },
1952
- "embed-english-v3.0": {
1953
- type: "token",
1954
- input: 0.1,
1955
- output: 0
1956
- },
1957
- "embed-english-light-v3.0": {
1958
- type: "token",
1959
- input: 30,
1960
- output: 0
1961
- },
1962
- "embed-multilingual-v3.0": {
1963
- type: "token",
1964
- input: 100,
1965
- output: 0
1966
- },
1967
- "embed-multilingual-light-v3.0": {
1968
- type: "token",
1969
- input: 30,
1970
- output: 0
1971
- },
1972
- "rerank-v3.5": {
1973
- type: "token",
1974
- input: 100,
1975
- output: 0
1976
- },
1977
- "rerank-english-v3.0": {
1978
- type: "token",
1979
- input: 100,
1980
- output: 0
1981
- },
1982
- "rerank-multilingual-v3.0": {
1983
- type: "token",
1984
- input: 100,
1985
- output: 0
1986
- }
2444
+ get creator() {
2445
+ const id = this.creatorId;
2446
+ return id ? ModelCollection.orgsData[id] : void 0;
1987
2447
  }
1988
- };
1989
-
1990
- // src/data/providers/xai-provider.json
1991
- var xai_provider_default = {
1992
- id: "xai",
1993
- name: "X.AI",
1994
- websiteUrl: "https://x.ai",
1995
- apiUrl: "https://x.ai/api",
1996
- models: {
1997
- "grok-2-vision-1212": {
1998
- type: "token",
1999
- input: 2,
2000
- output: 10
2001
- },
2002
- "grok-2-1212": {
2003
- type: "token",
2004
- input: 2,
2005
- output: 10
2006
- },
2007
- "grok-vision-beta": {
2008
- type: "token",
2009
- input: 5,
2010
- output: 15
2011
- },
2012
- "grok-beta": {
2013
- type: "token",
2014
- input: 5,
2015
- output: 15
2016
- }
2448
+ /**
2449
+ * Check if model has all specified capabilities
2450
+ * Uses same API pattern as ModelCollection.can() but returns boolean
2451
+ */
2452
+ can(...capabilities) {
2453
+ return capabilities.every((cap) => this.capabilities.includes(cap));
2017
2454
  }
2018
- };
2019
-
2020
- // src/data/providers/google-provider.json
2021
- var google_provider_default = {
2022
- id: "google",
2023
- name: "Google",
2024
- websiteUrl: "https://ai.google.dev",
2025
- apiUrl: "https://ai.google.dev/docs",
2026
- models: {
2027
- "gemini-2.0-flash": {
2028
- type: "token",
2029
- input: 0.1,
2030
- output: 0.4
2031
- },
2032
- "gemini-2.0-flash-lite": {
2033
- type: "token",
2034
- input: 0.075,
2035
- output: 0.3
2036
- },
2037
- "gemini-1.5-flash": {
2038
- type: "token",
2039
- input: 0.075,
2040
- output: 0.3
2041
- },
2042
- "gemini-1.5-flash-8b": {
2043
- type: "token",
2044
- input: 0.0375,
2045
- output: 0.15
2046
- },
2047
- "gemini-1.5-pro": {
2048
- type: "token",
2049
- input: 1.25,
2050
- output: 5
2051
- },
2052
- "text-embedding-004": {
2053
- type: "token",
2054
- input: 0,
2055
- output: 0
2056
- }
2455
+ // Basic capabilities
2456
+ canChat() {
2457
+ return this.capabilities.includes("chat");
2057
2458
  }
2058
- };
2059
-
2060
- // src/data/providers/deepseek-provider.json
2061
- var deepseek_provider_default = {
2062
- id: "deepseek",
2063
- name: "DeepSeek",
2064
- websiteUrl: "https://deepseek.com/",
2065
- apiUrl: "https://api.deepseek.com/v1",
2066
- defaultModel: "deepseek-chat",
2067
- models: {
2068
- "deepseek-chat": {
2069
- type: "token",
2070
- input: 0.2,
2071
- output: 0.2
2072
- },
2073
- "deepseek-reasoner": {
2074
- type: "token",
2075
- input: 0.3,
2076
- output: 0.3
2077
- }
2459
+ canReason() {
2460
+ return this.capabilities.includes("reason");
2078
2461
  }
2079
- };
2080
-
2081
- // src/data/providers/groq-provider.json
2082
- var groq_provider_default = {
2083
- id: "groq",
2084
- name: "Groq",
2085
- websiteUrl: "https://groq.com",
2086
- apiUrl: "https://api.groq.com/openai/v1",
2087
- defaultModel: "llama3-70b-8192",
2088
- models: {
2089
- "llama3-70b-8192": {
2090
- type: "token",
2091
- input: 0.7,
2092
- output: 0.7
2093
- },
2094
- "llama3-8b-8192": {
2095
- type: "token",
2096
- input: 0.1,
2097
- output: 0.1
2098
- },
2099
- "mixtral-8x7b-32768": {
2100
- type: "token",
2101
- input: 0.5,
2102
- output: 0.5
2103
- },
2104
- "gemma2-9b-it": {
2105
- type: "token",
2106
- input: 0.2,
2107
- output: 0.2
2108
- },
2109
- "whisper-large-v3": {
2110
- type: "minute",
2111
- price: 6e-3
2112
- },
2113
- "whisper-large-v3-turbo": {
2114
- type: "minute",
2115
- price: 6e-3
2116
- }
2462
+ // Text capabilities
2463
+ canRead() {
2464
+ return this.capabilities.includes("txt-in");
2117
2465
  }
2118
- };
2119
-
2120
- // src/data/providers/azure-provider.json
2121
- var azure_provider_default = {
2122
- id: "azure",
2123
- name: "Azure OpenAI",
2124
- websiteUrl: "https://azure.microsoft.com/en-us/products/ai-services/openai-service",
2125
- apiUrl: "https://learn.microsoft.com/en-us/azure/ai-services/openai/reference",
2126
- defaultModel: "gpt-4",
2127
- models: {
2128
- "gpt-4": {
2129
- type: "token",
2130
- input: 0,
2131
- output: 0
2132
- },
2133
- "gpt-4-32k": {
2134
- type: "token",
2135
- input: 0,
2136
- output: 0
2137
- },
2138
- "gpt-4-vision": {
2139
- type: "token",
2140
- input: 0,
2141
- output: 0
2142
- },
2143
- "gpt-4o": {
2144
- type: "token",
2145
- input: 0,
2146
- output: 0
2147
- },
2148
- "gpt-3.5-turbo": {
2149
- type: "token",
2150
- input: 0,
2151
- output: 0
2152
- },
2153
- "gpt-3.5-turbo-16k": {
2154
- type: "token",
2155
- input: 0,
2156
- output: 0
2157
- },
2158
- "text-embedding-ada-002": {
2159
- type: "token",
2160
- input: 0,
2161
- output: 0
2162
- },
2163
- whisper: {
2164
- type: "minute",
2165
- price: 0
2166
- },
2167
- "dall-e-3": {
2168
- type: "image",
2169
- price: 0,
2170
- size: "1024x1024",
2171
- unit: "per_image"
2172
- }
2466
+ canWrite() {
2467
+ return this.capabilities.includes("txt-out");
2173
2468
  }
2174
- };
2175
-
2176
- // src/builders/providers.ts
2177
- function isTokenPrice(price) {
2178
- return typeof price === "object" && price !== null && "type" in price && price.type === "token" && "input" in price && typeof price.input === "number" && "output" in price && typeof price.output === "number";
2179
- }
2180
- function isImagePrice(price) {
2181
- return typeof price === "object" && price !== null && "type" in price && price.type === "image" && "price" in price && typeof price.price === "number" && "size" in price && typeof price.size === "string" && "unit" in price && price.unit === "per_image";
2182
- }
2183
- function isCharacterPrice(price) {
2184
- return typeof price === "object" && price !== null && "type" in price && price.type === "character" && "price" in price && typeof price.price === "number";
2185
- }
2186
- function isMinutePrice(price) {
2187
- return typeof price === "object" && price !== null && "type" in price && price.type === "minute" && "price" in price && typeof price.price === "number";
2188
- }
2189
- function isSearchPrice(price) {
2190
- return typeof price === "object" && price !== null && "type" in price && price.type === "search" && "price" in price && typeof price.price === "number";
2191
- }
2192
- function validateProvider(raw) {
2193
- if (typeof raw !== "object" || raw === null) {
2194
- throw new Error("Provider data must be an object");
2469
+ // Image capabilities
2470
+ canSee() {
2471
+ return this.capabilities.includes("img-in");
2195
2472
  }
2196
- const provider = raw;
2197
- if (typeof provider.id !== "string") {
2198
- throw new Error("Provider id must be a string");
2473
+ canGenerateImages() {
2474
+ return this.capabilities.includes("img-out");
2199
2475
  }
2200
- if (typeof provider.name !== "string") {
2201
- throw new Error("Provider name must be a string");
2476
+ // Audio capabilities
2477
+ canHear() {
2478
+ return this.capabilities.includes("audio-in");
2202
2479
  }
2203
- if (typeof provider.websiteUrl !== "string") {
2204
- throw new Error("Provider websiteUrl must be a string");
2480
+ canSpeak() {
2481
+ return this.capabilities.includes("audio-out");
2205
2482
  }
2206
- if (typeof provider.apiUrl !== "string") {
2207
- throw new Error("Provider apiUrl must be a string");
2483
+ // Output capabilities
2484
+ canOutputJSON() {
2485
+ return this.capabilities.includes("json-out");
2208
2486
  }
2209
- if (typeof provider.models !== "object" || provider.models === null) {
2210
- throw new Error("Provider models must be an object");
2487
+ canCallFunctions() {
2488
+ return this.capabilities.includes("fn-out");
2211
2489
  }
2212
- const models2 = provider.models;
2213
- Object.values(models2).forEach((price) => {
2214
- if (!isTokenPrice(price) && !isImagePrice(price) && !isCharacterPrice(price) && !isMinutePrice(price) && !isSearchPrice(price)) {
2215
- throw new Error(`Invalid price data: ${JSON.stringify(price)}`);
2216
- }
2217
- });
2218
- return {
2219
- id: provider.id,
2220
- name: provider.name,
2221
- websiteUrl: provider.websiteUrl,
2222
- apiUrl: provider.apiUrl,
2223
- models: provider.models
2224
- };
2225
- }
2226
- function buildAllProviders() {
2227
- return [
2228
- validateProvider(openai_provider_default),
2229
- validateProvider(anthropic_provider_default),
2230
- validateProvider(mistral_provider_default),
2231
- validateProvider(cohere_provider_default),
2232
- validateProvider(xai_provider_default),
2233
- validateProvider(google_provider_default),
2234
- validateProvider(deepseek_provider_default),
2235
- validateProvider(groq_provider_default),
2236
- validateProvider(azure_provider_default)
2237
- ];
2238
- }
2239
- function buildProvidersData() {
2240
- return {
2241
- providers: buildAllProviders()
2242
- };
2243
- }
2244
-
2245
- // src/data/creators.json
2246
- var creators_default = {
2247
- creators: {
2248
- openai: {
2249
- name: "OpenAI",
2250
- website: "https://openai.com"
2251
- },
2252
- anthropic: {
2253
- name: "Anthropic",
2254
- website: "https://anthropic.com"
2255
- },
2256
- meta: {
2257
- name: "Meta",
2258
- website: "https://ai.meta.com"
2259
- },
2260
- mistral: {
2261
- name: "Mistral AI",
2262
- website: "https://mistral.ai"
2263
- }
2490
+ canGenerateEmbeddings() {
2491
+ return this.capabilities.includes("vec-out");
2264
2492
  }
2265
2493
  };
2266
2494
 
2267
- // src/index.ts
2268
- var allModels = buildAllModels();
2269
- var providersData = buildProvidersData();
2495
+ // src/aimodels.ts
2270
2496
  var AIModels = class _AIModels extends ModelCollection {
2271
- constructor(models2 = []) {
2272
- super(models2);
2497
+ // Singleton instance
2498
+ static _instance = null;
2499
+ /**
2500
+ * @private
2501
+ * Private constructor used only by the static instance getter.
2502
+ * Users should import the pre-configured instance from the package.
2503
+ */
2504
+ constructor(models3) {
2505
+ super(models3);
2273
2506
  Object.setPrototypeOf(this, _AIModels.prototype);
2274
2507
  }
2275
- get creators() {
2276
- return Object.keys(creators_default.creators);
2277
- }
2278
- get providers() {
2279
- return providersData.providers.map((p) => p.id);
2508
+ /**
2509
+ * Add data to the static data containers
2510
+ * @param data Object containing model sources, providers, and organizations to add
2511
+ */
2512
+ static addStaticData({
2513
+ models: models3 = {},
2514
+ providers: providers2 = {},
2515
+ orgs = {}
2516
+ }) {
2517
+ ModelCollection.modelSources = {
2518
+ ...ModelCollection.modelSources,
2519
+ ...models3
2520
+ };
2521
+ _AIModels.instance.length = 0;
2522
+ _AIModels.instance.push(...Object.values(ModelCollection.modelSources).map((source) => new Model(source)));
2523
+ ModelCollection.providersData = {
2524
+ ...ModelCollection.providersData,
2525
+ ...providers2
2526
+ };
2527
+ ModelCollection.orgsData = {
2528
+ ...ModelCollection.orgsData,
2529
+ ...orgs
2530
+ };
2280
2531
  }
2281
- getPrice(modelId, provider) {
2282
- const providerData = providersData.providers.find((p) => p.id === provider);
2283
- const price = providerData?.models[modelId];
2284
- return price?.type === "token" ? price : void 0;
2532
+ static get instance() {
2533
+ if (!_AIModels._instance) {
2534
+ _AIModels._instance = new _AIModels([]);
2535
+ }
2536
+ return _AIModels._instance;
2285
2537
  }
2286
- /** Get provider information by ID */
2287
- getProvider(providerId) {
2288
- return providersData.providers.find((p) => p.id === providerId);
2538
+ /**
2539
+ * Override to return all providers directly without filtering through models.
2540
+ * We want to return all known providers here.
2541
+ */
2542
+ get providers() {
2543
+ return Object.values(ModelCollection.providersData).map((provider) => ({
2544
+ ...ModelCollection.orgsData[provider.id],
2545
+ ...provider
2546
+ }));
2289
2547
  }
2290
- /** Get all providers that can serve a specific model */
2291
- getProvidersForModel(modelId) {
2292
- let model = this.id(modelId);
2293
- if (!model) {
2294
- model = this.find((m) => m.aliases?.includes(modelId));
2295
- }
2296
- if (!model) return [];
2297
- return providersData.providers.filter(
2298
- (p) => model.providers.includes(p.id)
2299
- );
2548
+ /**
2549
+ * Override to return all creators directly without filtering through models.
2550
+ * We want to return all known creators here.
2551
+ */
2552
+ get orgs() {
2553
+ return Object.values(ModelCollection.orgsData);
2300
2554
  }
2301
2555
  };
2302
- var models = new AIModels(allModels);
2303
- // Annotate the CommonJS export names for ESM import in node:
2304
- 0 && (module.exports = {
2556
+ var models2 = AIModels.instance;
2557
+
2558
+ // src/index.ts
2559
+ AIModels.addStaticData({
2560
+ models,
2561
+ providers,
2562
+ orgs: organizations
2563
+ });
2564
+ export {
2305
2565
  AIModels,
2566
+ Model,
2306
2567
  ModelCollection,
2307
- creators,
2308
- models
2309
- });
2568
+ models2 as models
2569
+ };