aimodels 0.4.0 → 0.4.3

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/README.md CHANGED
@@ -8,8 +8,8 @@ aimodels is useful when you need to programmatically access info about AI models
8
8
 
9
9
  aimodels powers:
10
10
  - [aimodels.dev](https://aimodels.dev) - a website about AI models
11
- - [aiwrapper](https://github.com/mitkury/aiwrapper) - an AI wrapper for running AI models ([aiwrapper.dev](https://aiwrapper.dev))
12
- - [Supa](https://github.com/supaorg/supa) - an open alternative to ChatGPT ([supa.cloud](https://supa.cloud))
11
+ - [aiwrapper](https://github.com/mitkury/aiwrapper) - an AI wrapper for running AI models
12
+ - [Supa](https://github.com/supaorg/supa) - an open alternative to ChatGPT
13
13
 
14
14
  ## Installation
15
15
 
package/dist/index.d.ts CHANGED
@@ -31,6 +31,12 @@ interface Organization {
31
31
  founded: number;
32
32
  }
33
33
 
34
+ interface ProviderSource {
35
+ id: string;
36
+ apiUrl: string;
37
+ apiDocsUrl: string;
38
+ pricing: Record<string, TokenBasedPricePerMillionTokens | ImagePrice>;
39
+ }
34
40
  /** Provider-specific data */
35
41
  interface Provider extends Organization {
36
42
  /** Provider's API endpoint URL */
@@ -191,7 +197,7 @@ declare class Model {
191
197
  }
192
198
 
193
199
  declare class ModelCollection extends Array<Model> {
194
- static providersData: Record<string, Provider>;
200
+ static providersData: Record<string, ProviderSource>;
195
201
  static orgsData: Record<string, Organization>;
196
202
  static modelSources: Record<string, ModelSource>;
197
203
  /** Create a new ModelCollection from an array of models */
@@ -277,7 +283,7 @@ declare class AIModels extends ModelCollection {
277
283
  */
278
284
  static addStaticData({ models, providers, orgs }: {
279
285
  models?: Record<string, ModelSource>;
280
- providers?: Record<string, Provider>;
286
+ providers?: Record<string, ProviderSource>;
281
287
  orgs?: Record<string, Organization>;
282
288
  }): void;
283
289
  static get instance(): AIModels;
@@ -294,4 +300,4 @@ declare class AIModels extends ModelCollection {
294
300
  }
295
301
  declare const models: AIModels;
296
302
 
297
- export { AIModels, type AudioInputContext, type AudioOutputContext, type BaseContext, type Capability, type CharacterContext, type EmbeddingContext, type ImageContext, Model, ModelCollection, type ModelContext, type ModelSource, type Organization, type Provider, type TokenContext, models };
303
+ export { AIModels, type AudioInputContext, type AudioOutputContext, type BaseContext, type Capability, type CharacterContext, type EmbeddingContext, type ImageContext, Model, ModelCollection, type ModelContext, type ModelSource, type Organization, type Provider, type ProviderSource, type TokenContext, models };
package/dist/index.js CHANGED
@@ -206,6 +206,28 @@ var models = {
206
206
  ],
207
207
  "creatorId": "anthropic"
208
208
  },
209
+ "command-a-03-2025": {
210
+ "id": "command-a-03-2025",
211
+ "name": "Command A",
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": 256e3,
227
+ "maxOutput": 8192
228
+ },
229
+ "creatorId": "cohere"
230
+ },
209
231
  "command-r7b-12-2024": {
210
232
  "id": "command-r7b-12-2024",
211
233
  "name": "Command R7B",
@@ -228,6 +250,32 @@ var models = {
228
250
  },
229
251
  "creatorId": "cohere"
230
252
  },
253
+ "command-r-plus-04-2024": {
254
+ "id": "command-r-plus-04-2024",
255
+ "name": "Command R+ (April 2024)",
256
+ "creator": "cohere",
257
+ "license": "proprietary",
258
+ "providerIds": [
259
+ "cohere",
260
+ "azure"
261
+ ],
262
+ "capabilities": [
263
+ "chat",
264
+ "txt-in",
265
+ "txt-out",
266
+ "json-out",
267
+ "fn-out"
268
+ ],
269
+ "context": {
270
+ "type": "token",
271
+ "total": 128e3,
272
+ "maxOutput": 4096
273
+ },
274
+ "aliases": [
275
+ "command-r-plus"
276
+ ],
277
+ "creatorId": "cohere"
278
+ },
231
279
  "command-r-plus-08-2024": {
232
280
  "id": "command-r-plus-08-2024",
233
281
  "name": "Command R+",
@@ -256,6 +304,28 @@ var models = {
256
304
  ],
257
305
  "creatorId": "cohere"
258
306
  },
307
+ "command-r-08-2024": {
308
+ "id": "command-r-08-2024",
309
+ "name": "Command R (August 2024)",
310
+ "creator": "cohere",
311
+ "license": "proprietary",
312
+ "providerIds": [
313
+ "cohere"
314
+ ],
315
+ "capabilities": [
316
+ "chat",
317
+ "txt-in",
318
+ "txt-out",
319
+ "json-out",
320
+ "fn-out"
321
+ ],
322
+ "context": {
323
+ "type": "token",
324
+ "total": 128e3,
325
+ "maxOutput": 4096
326
+ },
327
+ "creatorId": "cohere"
328
+ },
259
329
  "command-r-03-2024": {
260
330
  "id": "command-r-03-2024",
261
331
  "name": "Command R",
@@ -271,7 +341,6 @@ var models = {
271
341
  "chat",
272
342
  "txt-in",
273
343
  "txt-out",
274
- "reason",
275
344
  "json-out",
276
345
  "fn-out"
277
346
  ],
@@ -285,6 +354,28 @@ var models = {
285
354
  ],
286
355
  "creatorId": "cohere"
287
356
  },
357
+ "command-nightly": {
358
+ "id": "command-nightly",
359
+ "name": "Command Nightly",
360
+ "creator": "cohere",
361
+ "license": "proprietary",
362
+ "providerIds": [
363
+ "cohere"
364
+ ],
365
+ "capabilities": [
366
+ "chat",
367
+ "txt-in",
368
+ "txt-out",
369
+ "json-out",
370
+ "fn-out"
371
+ ],
372
+ "context": {
373
+ "type": "token",
374
+ "total": 128e3,
375
+ "maxOutput": 4096
376
+ },
377
+ "creatorId": "cohere"
378
+ },
288
379
  "command": {
289
380
  "id": "command",
290
381
  "name": "Command",
@@ -478,6 +569,152 @@ var models = {
478
569
  },
479
570
  "creatorId": "cohere"
480
571
  },
572
+ "embed-english-v2.0": {
573
+ "id": "embed-english-v2.0",
574
+ "name": "Embed English v2.0",
575
+ "creator": "cohere",
576
+ "license": "proprietary",
577
+ "providerIds": [
578
+ "cohere"
579
+ ],
580
+ "capabilities": [
581
+ "txt-in",
582
+ "vec-out"
583
+ ],
584
+ "context": {
585
+ "type": "embedding",
586
+ "total": 512,
587
+ "dimensions": 4096,
588
+ "embeddingType": "text",
589
+ "normalized": true
590
+ },
591
+ "creatorId": "cohere"
592
+ },
593
+ "embed-english-light-v2.0": {
594
+ "id": "embed-english-light-v2.0",
595
+ "name": "Embed English Light v2.0",
596
+ "creator": "cohere",
597
+ "license": "proprietary",
598
+ "providerIds": [
599
+ "cohere",
600
+ "oracle"
601
+ ],
602
+ "capabilities": [
603
+ "txt-in",
604
+ "vec-out"
605
+ ],
606
+ "context": {
607
+ "type": "embedding",
608
+ "total": 512,
609
+ "dimensions": 1024,
610
+ "embeddingType": "text",
611
+ "normalized": true
612
+ },
613
+ "creatorId": "cohere"
614
+ },
615
+ "embed-multilingual-v2.0": {
616
+ "id": "embed-multilingual-v2.0",
617
+ "name": "Embed Multilingual v2.0",
618
+ "creator": "cohere",
619
+ "license": "proprietary",
620
+ "providerIds": [
621
+ "cohere"
622
+ ],
623
+ "capabilities": [
624
+ "txt-in",
625
+ "vec-out"
626
+ ],
627
+ "context": {
628
+ "type": "embedding",
629
+ "total": 256,
630
+ "dimensions": 768,
631
+ "embeddingType": "text",
632
+ "normalized": false
633
+ },
634
+ "creatorId": "cohere"
635
+ },
636
+ "c4ai-aya-expanse-8b": {
637
+ "id": "c4ai-aya-expanse-8b",
638
+ "name": "Aya Expanse 8B",
639
+ "creator": "cohere",
640
+ "license": "proprietary",
641
+ "providerIds": [
642
+ "cohere"
643
+ ],
644
+ "capabilities": [
645
+ "chat",
646
+ "txt-in",
647
+ "txt-out"
648
+ ],
649
+ "context": {
650
+ "type": "token",
651
+ "total": 8192,
652
+ "maxOutput": 4096
653
+ },
654
+ "creatorId": "cohere"
655
+ },
656
+ "c4ai-aya-expanse-32b": {
657
+ "id": "c4ai-aya-expanse-32b",
658
+ "name": "Aya Expanse 32B",
659
+ "creator": "cohere",
660
+ "license": "proprietary",
661
+ "providerIds": [
662
+ "cohere"
663
+ ],
664
+ "capabilities": [
665
+ "chat",
666
+ "txt-in",
667
+ "txt-out"
668
+ ],
669
+ "context": {
670
+ "type": "token",
671
+ "total": 128e3,
672
+ "maxOutput": 4096
673
+ },
674
+ "creatorId": "cohere"
675
+ },
676
+ "c4ai-aya-vision-8b": {
677
+ "id": "c4ai-aya-vision-8b",
678
+ "name": "Aya Vision 8B",
679
+ "creator": "cohere",
680
+ "license": "proprietary",
681
+ "providerIds": [
682
+ "cohere"
683
+ ],
684
+ "capabilities": [
685
+ "chat",
686
+ "txt-in",
687
+ "txt-out",
688
+ "img-in"
689
+ ],
690
+ "context": {
691
+ "type": "token",
692
+ "total": 16384,
693
+ "maxOutput": 4096
694
+ },
695
+ "creatorId": "cohere"
696
+ },
697
+ "c4ai-aya-vision-32b": {
698
+ "id": "c4ai-aya-vision-32b",
699
+ "name": "Aya Vision 32B",
700
+ "creator": "cohere",
701
+ "license": "proprietary",
702
+ "providerIds": [
703
+ "cohere"
704
+ ],
705
+ "capabilities": [
706
+ "chat",
707
+ "txt-in",
708
+ "txt-out",
709
+ "img-in"
710
+ ],
711
+ "context": {
712
+ "type": "token",
713
+ "total": 16384,
714
+ "maxOutput": 4096
715
+ },
716
+ "creatorId": "cohere"
717
+ },
481
718
  "deepseek-chat": {
482
719
  "id": "deepseek-chat",
483
720
  "name": "DeepSeek V3",
@@ -1210,7 +1447,7 @@ var models = {
1210
1447
  },
1211
1448
  "o1": {
1212
1449
  "id": "o1",
1213
- "name": "OpenAI O1",
1450
+ "name": "OpenAI o1",
1214
1451
  "license": "proprietary",
1215
1452
  "providerIds": [
1216
1453
  "openai",
@@ -1236,7 +1473,7 @@ var models = {
1236
1473
  "id": "o1-2024-12-17",
1237
1474
  "extends": "o1",
1238
1475
  "overrides": {
1239
- "name": "OpenAI O1 (2024-12-17)"
1476
+ "name": "OpenAI o1 (2024-12-17)"
1240
1477
  },
1241
1478
  "creatorId": "openai"
1242
1479
  },
@@ -1244,7 +1481,7 @@ var models = {
1244
1481
  "id": "o1-mini",
1245
1482
  "extends": "o1",
1246
1483
  "overrides": {
1247
- "name": "OpenAI O1 Mini",
1484
+ "name": "OpenAI o1 Mini",
1248
1485
  "capabilities": [
1249
1486
  "chat",
1250
1487
  "txt-in",
@@ -1265,7 +1502,7 @@ var models = {
1265
1502
  "id": "o1-mini-2024-09-12",
1266
1503
  "extends": "o1-mini",
1267
1504
  "overrides": {
1268
- "name": "OpenAI O1 Mini (2024-09-12)"
1505
+ "name": "OpenAI o1 Mini (2024-09-12)"
1269
1506
  },
1270
1507
  "creatorId": "openai"
1271
1508
  },
@@ -1273,7 +1510,7 @@ var models = {
1273
1510
  "id": "o1-preview",
1274
1511
  "extends": "o1",
1275
1512
  "overrides": {
1276
- "name": "OpenAI O1 Preview",
1513
+ "name": "OpenAI o1 Preview",
1277
1514
  "context": {
1278
1515
  "type": "token",
1279
1516
  "total": 128e3,
@@ -1286,13 +1523,13 @@ var models = {
1286
1523
  "id": "o1-preview-2024-09-12",
1287
1524
  "extends": "o1-preview",
1288
1525
  "overrides": {
1289
- "name": "OpenAI O1 Preview (2024-09-12)"
1526
+ "name": "OpenAI o1 Preview (2024-09-12)"
1290
1527
  },
1291
1528
  "creatorId": "openai"
1292
1529
  },
1293
1530
  "o3-mini": {
1294
1531
  "id": "o3-mini",
1295
- "name": "OpenAI O3 Mini",
1532
+ "name": "OpenAI o3 Mini",
1296
1533
  "license": "proprietary",
1297
1534
  "providerIds": [
1298
1535
  "openai",
@@ -1317,8 +1554,34 @@ var models = {
1317
1554
  "id": "o3-mini-2025-01-31",
1318
1555
  "extends": "o3-mini",
1319
1556
  "overrides": {
1320
- "name": "OpenAI O3 Mini (2025-01-31)"
1557
+ "name": "OpenAI o3 Mini (2025-01-31)"
1558
+ },
1559
+ "creatorId": "openai"
1560
+ },
1561
+ "gpt-4.5-preview": {
1562
+ "id": "gpt-4.5-preview",
1563
+ "name": "GPT-4.5 Preview",
1564
+ "license": "proprietary",
1565
+ "providerIds": [
1566
+ "openai",
1567
+ "azure"
1568
+ ],
1569
+ "capabilities": [
1570
+ "chat",
1571
+ "txt-in",
1572
+ "txt-out",
1573
+ "img-in",
1574
+ "json-out",
1575
+ "fn-out"
1576
+ ],
1577
+ "context": {
1578
+ "type": "token",
1579
+ "total": 128e3,
1580
+ "maxOutput": 16384
1321
1581
  },
1582
+ "aliases": [
1583
+ "gpt-4.5-preview-2025-02-27"
1584
+ ],
1322
1585
  "creatorId": "openai"
1323
1586
  },
1324
1587
  "whisper-1": {
@@ -1628,7 +1891,7 @@ var providers = {
1628
1891
  },
1629
1892
  "azure": {
1630
1893
  "id": "azure",
1631
- "name": "Azure OpenAI",
1894
+ "name": "Azure",
1632
1895
  "apiUrl": "",
1633
1896
  "apiDocsUrl": "https://learn.microsoft.com/en-us/azure/ai-services/openai/reference",
1634
1897
  "pricing": {
@@ -1870,6 +2133,10 @@ var providers = {
1870
2133
  }
1871
2134
  }
1872
2135
  },
2136
+ "ollama": {
2137
+ "id": "ollama",
2138
+ "name": "Ollama"
2139
+ },
1873
2140
  "openai": {
1874
2141
  "id": "openai",
1875
2142
  "name": "OpenAI",
@@ -2321,7 +2588,16 @@ var ModelCollection = class _ModelCollection extends Array {
2321
2588
  /** Get all providers from all models in the collection deduplicated */
2322
2589
  get providers() {
2323
2590
  const providerIds = [...new Set(this.flatMap((model) => model.providerIds))];
2324
- return providerIds.map((id) => _ModelCollection.providersData[id]).filter((p) => p !== void 0);
2591
+ const providers2 = [];
2592
+ for (const id of providerIds) {
2593
+ const provider = _ModelCollection.providersData[id];
2594
+ const organization = _ModelCollection.orgsData[id];
2595
+ providers2.push({
2596
+ ...organization,
2597
+ ...provider
2598
+ });
2599
+ }
2600
+ return providers2;
2325
2601
  }
2326
2602
  /** Get all orgs from all models in the collection deduplicated */
2327
2603
  get orgs() {
@@ -2330,7 +2606,12 @@ var ModelCollection = class _ModelCollection extends Array {
2330
2606
  }
2331
2607
  /** Get a specific provider by ID */
2332
2608
  getProvider(id) {
2333
- return _ModelCollection.providersData[id];
2609
+ const provider = _ModelCollection.providersData[id];
2610
+ const organization = _ModelCollection.orgsData[id];
2611
+ return {
2612
+ ...organization,
2613
+ ...provider
2614
+ };
2334
2615
  }
2335
2616
  /** Get a specific creator by ID */
2336
2617
  getCreator(id) {
@@ -2409,7 +2690,16 @@ var Model = class _Model {
2409
2690
  return this.resolveProperty("providerIds") || [];
2410
2691
  }
2411
2692
  get providers() {
2412
- return this.providerIds.map((id) => ModelCollection.providersData[id]).filter(Boolean);
2693
+ const providers2 = [];
2694
+ for (const id of this.providerIds) {
2695
+ const provider = ModelCollection.providersData[id];
2696
+ const organization = ModelCollection.orgsData[id];
2697
+ providers2.push({
2698
+ ...organization,
2699
+ ...provider
2700
+ });
2701
+ }
2702
+ return providers2;
2413
2703
  }
2414
2704
  get creatorId() {
2415
2705
  return this.resolveProperty("creatorId");
@@ -2513,7 +2803,10 @@ var AIModels = class _AIModels extends ModelCollection {
2513
2803
  * We want to return all known providers here.
2514
2804
  */
2515
2805
  get providers() {
2516
- return Object.values(ModelCollection.providersData);
2806
+ return Object.values(ModelCollection.providersData).map((provider) => ({
2807
+ ...ModelCollection.orgsData[provider.id],
2808
+ ...provider
2809
+ }));
2517
2810
  }
2518
2811
  /**
2519
2812
  * Override to return all creators directly without filtering through models.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aimodels",
3
- "version": "0.4.0",
3
+ "version": "0.4.3",
4
4
  "description": "A collection of AI model specifications across different providers",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",