aimodels 0.3.9 → 0.3.10

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.d.mts CHANGED
@@ -41,6 +41,8 @@ declare class ModelCollection extends Array<Model> {
41
41
  fromCreator(creator: string): ModelCollection;
42
42
  /** Filter models by minimum context window size */
43
43
  withMinContext(tokens: number): ModelCollection;
44
+ /** Get all providers from all models in the collection deduplicated */
45
+ getProviders(): string[];
44
46
  }
45
47
  interface BaseContext {
46
48
  /** The type discriminator */
package/dist/index.d.ts CHANGED
@@ -41,6 +41,8 @@ declare class ModelCollection extends Array<Model> {
41
41
  fromCreator(creator: string): ModelCollection;
42
42
  /** Filter models by minimum context window size */
43
43
  withMinContext(tokens: number): ModelCollection;
44
+ /** Get all providers from all models in the collection deduplicated */
45
+ getProviders(): string[];
44
46
  }
45
47
  interface BaseContext {
46
48
  /** The type discriminator */
package/dist/index.js CHANGED
@@ -84,6 +84,10 @@ var ModelCollection = class _ModelCollection extends Array {
84
84
  return context.total >= tokens;
85
85
  });
86
86
  }
87
+ /** Get all providers from all models in the collection deduplicated */
88
+ getProviders() {
89
+ return [...new Set(this.flatMap((model) => model.providers))];
90
+ }
87
91
  };
88
92
 
89
93
  // src/data/models/openai-models.json
@@ -1195,7 +1199,6 @@ var cohere_models_default = {
1195
1199
  "chat",
1196
1200
  "text-in",
1197
1201
  "text-out",
1198
- "reason",
1199
1202
  "function-out"
1200
1203
  ],
1201
1204
  context: {
package/dist/index.mjs CHANGED
@@ -55,6 +55,10 @@ var ModelCollection = class _ModelCollection extends Array {
55
55
  return context.total >= tokens;
56
56
  });
57
57
  }
58
+ /** Get all providers from all models in the collection deduplicated */
59
+ getProviders() {
60
+ return [...new Set(this.flatMap((model) => model.providers))];
61
+ }
58
62
  };
59
63
 
60
64
  // src/data/models/openai-models.json
@@ -1166,7 +1170,6 @@ var cohere_models_default = {
1166
1170
  "chat",
1167
1171
  "text-in",
1168
1172
  "text-out",
1169
- "reason",
1170
1173
  "function-out"
1171
1174
  ],
1172
1175
  context: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aimodels",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "A collection of AI model specifications across different providers",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",