aimodels 0.3.7 → 0.3.9

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
@@ -58,6 +58,12 @@ interface TokenContext extends BaseContext {
58
58
  * When not set, available output tokens may be reduced based on input size.
59
59
  */
60
60
  outputIsFixed?: 1;
61
+ /**
62
+ * Extended capabilities beyond the standard model behavior.
63
+ * This is a flexible object that can contain any properties or nested objects
64
+ * related to model-specific extensions (e.g., reasoning, experimental features).
65
+ */
66
+ extended?: Record<string, any>;
61
67
  }
62
68
  interface CharacterContext extends BaseContext {
63
69
  type: "character";
package/dist/index.d.ts CHANGED
@@ -58,6 +58,12 @@ interface TokenContext extends BaseContext {
58
58
  * When not set, available output tokens may be reduced based on input size.
59
59
  */
60
60
  outputIsFixed?: 1;
61
+ /**
62
+ * Extended capabilities beyond the standard model behavior.
63
+ * This is a flexible object that can contain any properties or nested objects
64
+ * related to model-specific extensions (e.g., reasoning, experimental features).
65
+ */
66
+ extended?: Record<string, any>;
61
67
  }
62
68
  interface CharacterContext extends BaseContext {
63
69
  type: "character";
package/dist/index.js CHANGED
@@ -753,6 +753,36 @@ var anthropic_models_default = {
753
753
  outputIsFixed: 1
754
754
  },
755
755
  aliases: ["claude-3-5-haiku-latest", "claude-3-5-haiku"]
756
+ },
757
+ {
758
+ id: "claude-3-7-sonnet-20250219",
759
+ name: "Claude 3.7 Sonnet",
760
+ license: "proprietary",
761
+ providers: ["anthropic", "aws", "google"],
762
+ can: [
763
+ "chat",
764
+ "text-in",
765
+ "text-out",
766
+ "img-in",
767
+ "json-out",
768
+ "function-out",
769
+ "reason"
770
+ ],
771
+ context: {
772
+ type: "token",
773
+ total: 2e5,
774
+ maxOutput: 8192,
775
+ outputIsFixed: 1,
776
+ extended: {
777
+ reasoning: {
778
+ maxOutput: 64e3
779
+ },
780
+ experimental: {
781
+ maxOutput: 128e3
782
+ }
783
+ }
784
+ },
785
+ aliases: ["claude-3-7-sonnet-latest", "claude-3-7-sonnet"]
756
786
  }
757
787
  ]
758
788
  };
@@ -1135,8 +1165,15 @@ var cohere_models_default = {
1135
1165
  name: "Command R7B",
1136
1166
  creator: "cohere",
1137
1167
  license: "proprietary",
1138
- providers: ["cohere"],
1139
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1168
+ providers: [
1169
+ "cohere"
1170
+ ],
1171
+ can: [
1172
+ "chat",
1173
+ "text-in",
1174
+ "text-out",
1175
+ "function-out"
1176
+ ],
1140
1177
  context: {
1141
1178
  type: "token",
1142
1179
  total: 128e3,
@@ -1148,36 +1185,70 @@ var cohere_models_default = {
1148
1185
  name: "Command R+",
1149
1186
  creator: "cohere",
1150
1187
  license: "proprietary",
1151
- providers: ["cohere", "bedrock", "azure", "oracle"],
1152
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1188
+ providers: [
1189
+ "cohere",
1190
+ "bedrock",
1191
+ "azure",
1192
+ "oracle"
1193
+ ],
1194
+ can: [
1195
+ "chat",
1196
+ "text-in",
1197
+ "text-out",
1198
+ "reason",
1199
+ "function-out"
1200
+ ],
1153
1201
  context: {
1154
1202
  type: "token",
1155
1203
  total: 128e3,
1156
1204
  maxOutput: 4096
1157
1205
  },
1158
- aliases: ["command-r-plus"]
1206
+ aliases: [
1207
+ "command-r-plus"
1208
+ ]
1159
1209
  },
1160
1210
  {
1161
1211
  id: "command-r-03-2024",
1162
1212
  name: "Command R",
1163
1213
  creator: "cohere",
1164
1214
  license: "proprietary",
1165
- providers: ["cohere", "bedrock", "azure", "oracle"],
1166
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1215
+ providers: [
1216
+ "cohere",
1217
+ "bedrock",
1218
+ "azure",
1219
+ "oracle"
1220
+ ],
1221
+ can: [
1222
+ "chat",
1223
+ "text-in",
1224
+ "text-out",
1225
+ "reason",
1226
+ "function-out"
1227
+ ],
1167
1228
  context: {
1168
1229
  type: "token",
1169
1230
  total: 128e3,
1170
1231
  maxOutput: 4096
1171
1232
  },
1172
- aliases: ["command-r"]
1233
+ aliases: [
1234
+ "command-r"
1235
+ ]
1173
1236
  },
1174
1237
  {
1175
1238
  id: "command",
1176
1239
  name: "Command",
1177
1240
  creator: "cohere",
1178
1241
  license: "proprietary",
1179
- providers: ["cohere", "bedrock", "oracle"],
1180
- can: ["chat", "text-in", "text-out"],
1242
+ providers: [
1243
+ "cohere",
1244
+ "bedrock",
1245
+ "oracle"
1246
+ ],
1247
+ can: [
1248
+ "chat",
1249
+ "text-in",
1250
+ "text-out"
1251
+ ],
1181
1252
  context: {
1182
1253
  type: "token",
1183
1254
  total: 4096,
@@ -1189,8 +1260,16 @@ var cohere_models_default = {
1189
1260
  name: "Command Light",
1190
1261
  creator: "cohere",
1191
1262
  license: "proprietary",
1192
- providers: ["cohere", "bedrock", "oracle"],
1193
- can: ["chat", "text-in", "text-out"],
1263
+ providers: [
1264
+ "cohere",
1265
+ "bedrock",
1266
+ "oracle"
1267
+ ],
1268
+ can: [
1269
+ "chat",
1270
+ "text-in",
1271
+ "text-out"
1272
+ ],
1194
1273
  context: {
1195
1274
  type: "token",
1196
1275
  total: 4096,
@@ -1202,8 +1281,17 @@ var cohere_models_default = {
1202
1281
  name: "Embed English v3.0",
1203
1282
  creator: "cohere",
1204
1283
  license: "proprietary",
1205
- providers: ["cohere", "bedrock", "azure", "oracle"],
1206
- can: ["text-in", "img-in", "vectors-out"],
1284
+ providers: [
1285
+ "cohere",
1286
+ "bedrock",
1287
+ "azure",
1288
+ "oracle"
1289
+ ],
1290
+ can: [
1291
+ "text-in",
1292
+ "img-in",
1293
+ "vectors-out"
1294
+ ],
1207
1295
  context: {
1208
1296
  type: "token",
1209
1297
  total: 512,
@@ -1215,8 +1303,15 @@ var cohere_models_default = {
1215
1303
  name: "Embed English Light v3.0",
1216
1304
  creator: "cohere",
1217
1305
  license: "proprietary",
1218
- providers: ["cohere", "oracle"],
1219
- can: ["text-in", "img-in", "vectors-out"],
1306
+ providers: [
1307
+ "cohere",
1308
+ "oracle"
1309
+ ],
1310
+ can: [
1311
+ "text-in",
1312
+ "img-in",
1313
+ "vectors-out"
1314
+ ],
1220
1315
  context: {
1221
1316
  type: "token",
1222
1317
  total: 512,
@@ -1228,8 +1323,17 @@ var cohere_models_default = {
1228
1323
  name: "Embed Multilingual v3.0",
1229
1324
  creator: "cohere",
1230
1325
  license: "proprietary",
1231
- providers: ["cohere", "bedrock", "azure", "oracle"],
1232
- can: ["text-in", "img-in", "vectors-out"],
1326
+ providers: [
1327
+ "cohere",
1328
+ "bedrock",
1329
+ "azure",
1330
+ "oracle"
1331
+ ],
1332
+ can: [
1333
+ "text-in",
1334
+ "img-in",
1335
+ "vectors-out"
1336
+ ],
1233
1337
  context: {
1234
1338
  type: "token",
1235
1339
  total: 512,
@@ -1241,8 +1345,15 @@ var cohere_models_default = {
1241
1345
  name: "Embed Multilingual Light v3.0",
1242
1346
  creator: "cohere",
1243
1347
  license: "proprietary",
1244
- providers: ["cohere", "oracle"],
1245
- can: ["text-in", "img-in", "vectors-out"],
1348
+ providers: [
1349
+ "cohere",
1350
+ "oracle"
1351
+ ],
1352
+ can: [
1353
+ "text-in",
1354
+ "img-in",
1355
+ "vectors-out"
1356
+ ],
1246
1357
  context: {
1247
1358
  type: "token",
1248
1359
  total: 512,
@@ -1254,8 +1365,15 @@ var cohere_models_default = {
1254
1365
  name: "Rerank v3.5",
1255
1366
  creator: "cohere",
1256
1367
  license: "proprietary",
1257
- providers: ["cohere", "bedrock", "azure"],
1258
- can: ["text-in", "text-out"],
1368
+ providers: [
1369
+ "cohere",
1370
+ "bedrock",
1371
+ "azure"
1372
+ ],
1373
+ can: [
1374
+ "text-in",
1375
+ "text-out"
1376
+ ],
1259
1377
  context: {
1260
1378
  type: "token",
1261
1379
  total: 4096,
@@ -1267,8 +1385,14 @@ var cohere_models_default = {
1267
1385
  name: "Rerank English v3.0",
1268
1386
  creator: "cohere",
1269
1387
  license: "proprietary",
1270
- providers: ["cohere", "azure"],
1271
- can: ["text-in", "text-out"],
1388
+ providers: [
1389
+ "cohere",
1390
+ "azure"
1391
+ ],
1392
+ can: [
1393
+ "text-in",
1394
+ "text-out"
1395
+ ],
1272
1396
  context: {
1273
1397
  type: "token",
1274
1398
  total: 4096,
@@ -1280,8 +1404,14 @@ var cohere_models_default = {
1280
1404
  name: "Rerank Multilingual v3.0",
1281
1405
  creator: "cohere",
1282
1406
  license: "proprietary",
1283
- providers: ["cohere", "azure"],
1284
- can: ["text-in", "text-out"],
1407
+ providers: [
1408
+ "cohere",
1409
+ "azure"
1410
+ ],
1411
+ can: [
1412
+ "text-in",
1413
+ "text-out"
1414
+ ],
1285
1415
  context: {
1286
1416
  type: "token",
1287
1417
  total: 4096,
@@ -1736,6 +1866,206 @@ var mistral_provider_default = {
1736
1866
  }
1737
1867
  };
1738
1868
 
1869
+ // src/data/providers/cohere-provider.json
1870
+ var cohere_provider_default = {
1871
+ id: "cohere",
1872
+ name: "Cohere",
1873
+ websiteUrl: "https://cohere.com",
1874
+ apiUrl: "https://docs.cohere.com/reference",
1875
+ models: {
1876
+ "command-r7b-12-2024": {
1877
+ type: "token",
1878
+ input: 0.0375,
1879
+ output: 0.15
1880
+ },
1881
+ "command-r-plus-08-2024": {
1882
+ type: "token",
1883
+ input: 2.5,
1884
+ output: 10
1885
+ },
1886
+ "command-r-03-2024": {
1887
+ type: "token",
1888
+ input: 0.15,
1889
+ output: 0.6
1890
+ },
1891
+ command: {
1892
+ type: "token",
1893
+ input: 1500,
1894
+ output: 2e3
1895
+ },
1896
+ "command-light": {
1897
+ type: "token",
1898
+ input: 300,
1899
+ output: 600
1900
+ },
1901
+ "embed-english-v3.0": {
1902
+ type: "token",
1903
+ input: 0.1,
1904
+ output: 0
1905
+ },
1906
+ "embed-english-light-v3.0": {
1907
+ type: "token",
1908
+ input: 30,
1909
+ output: 0
1910
+ },
1911
+ "embed-multilingual-v3.0": {
1912
+ type: "token",
1913
+ input: 100,
1914
+ output: 0
1915
+ },
1916
+ "embed-multilingual-light-v3.0": {
1917
+ type: "token",
1918
+ input: 30,
1919
+ output: 0
1920
+ },
1921
+ "rerank-v3.5": {
1922
+ type: "token",
1923
+ input: 100,
1924
+ output: 0
1925
+ },
1926
+ "rerank-english-v3.0": {
1927
+ type: "token",
1928
+ input: 100,
1929
+ output: 0
1930
+ },
1931
+ "rerank-multilingual-v3.0": {
1932
+ type: "token",
1933
+ input: 100,
1934
+ output: 0
1935
+ }
1936
+ }
1937
+ };
1938
+
1939
+ // src/data/providers/xai-provider.json
1940
+ var xai_provider_default = {
1941
+ id: "xai",
1942
+ name: "X.AI",
1943
+ websiteUrl: "https://x.ai",
1944
+ apiUrl: "https://x.ai/api",
1945
+ models: {
1946
+ "grok-2-vision-1212": {
1947
+ type: "token",
1948
+ input: 2,
1949
+ output: 10
1950
+ },
1951
+ "grok-2-1212": {
1952
+ type: "token",
1953
+ input: 2,
1954
+ output: 10
1955
+ },
1956
+ "grok-vision-beta": {
1957
+ type: "token",
1958
+ input: 5,
1959
+ output: 15
1960
+ },
1961
+ "grok-beta": {
1962
+ type: "token",
1963
+ input: 5,
1964
+ output: 15
1965
+ }
1966
+ }
1967
+ };
1968
+
1969
+ // src/data/providers/google-provider.json
1970
+ var google_provider_default = {
1971
+ id: "google",
1972
+ name: "Google",
1973
+ websiteUrl: "https://ai.google.dev",
1974
+ apiUrl: "https://ai.google.dev/docs",
1975
+ models: {
1976
+ "gemini-2.0-flash": {
1977
+ type: "token",
1978
+ input: 0.1,
1979
+ output: 0.4
1980
+ },
1981
+ "gemini-2.0-flash-lite": {
1982
+ type: "token",
1983
+ input: 0.075,
1984
+ output: 0.3
1985
+ },
1986
+ "gemini-1.5-flash": {
1987
+ type: "token",
1988
+ input: 0.075,
1989
+ output: 0.3
1990
+ },
1991
+ "gemini-1.5-flash-8b": {
1992
+ type: "token",
1993
+ input: 0.0375,
1994
+ output: 0.15
1995
+ },
1996
+ "gemini-1.5-pro": {
1997
+ type: "token",
1998
+ input: 1.25,
1999
+ output: 5
2000
+ },
2001
+ "text-embedding-004": {
2002
+ type: "token",
2003
+ input: 0,
2004
+ output: 0
2005
+ }
2006
+ }
2007
+ };
2008
+
2009
+ // src/data/providers/deepseek-provider.json
2010
+ var deepseek_provider_default = {
2011
+ id: "deepseek",
2012
+ name: "DeepSeek",
2013
+ websiteUrl: "https://deepseek.com/",
2014
+ apiUrl: "https://api.deepseek.com/v1",
2015
+ defaultModel: "deepseek-chat",
2016
+ models: {
2017
+ "deepseek-chat": {
2018
+ type: "token",
2019
+ input: 0.2,
2020
+ output: 0.2
2021
+ },
2022
+ "deepseek-reasoner": {
2023
+ type: "token",
2024
+ input: 0.3,
2025
+ output: 0.3
2026
+ }
2027
+ }
2028
+ };
2029
+
2030
+ // src/data/providers/groq-provider.json
2031
+ var groq_provider_default = {
2032
+ id: "groq",
2033
+ name: "Groq",
2034
+ websiteUrl: "https://groq.com",
2035
+ apiUrl: "https://api.groq.com/openai/v1",
2036
+ defaultModel: "llama3-70b-8192",
2037
+ models: {
2038
+ "llama3-70b-8192": {
2039
+ type: "token",
2040
+ input: 0.7,
2041
+ output: 0.7
2042
+ },
2043
+ "llama3-8b-8192": {
2044
+ type: "token",
2045
+ input: 0.1,
2046
+ output: 0.1
2047
+ },
2048
+ "mixtral-8x7b-32768": {
2049
+ type: "token",
2050
+ input: 0.5,
2051
+ output: 0.5
2052
+ },
2053
+ "gemma2-9b-it": {
2054
+ type: "token",
2055
+ input: 0.2,
2056
+ output: 0.2
2057
+ },
2058
+ "whisper-large-v3": {
2059
+ type: "minute",
2060
+ price: 6e-3
2061
+ },
2062
+ "whisper-large-v3-turbo": {
2063
+ type: "minute",
2064
+ price: 6e-3
2065
+ }
2066
+ }
2067
+ };
2068
+
1739
2069
  // src/builders/providers.ts
1740
2070
  function isTokenPrice(price) {
1741
2071
  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";
@@ -1749,6 +2079,9 @@ function isCharacterPrice(price) {
1749
2079
  function isMinutePrice(price) {
1750
2080
  return typeof price === "object" && price !== null && "type" in price && price.type === "minute" && "price" in price && typeof price.price === "number";
1751
2081
  }
2082
+ function isSearchPrice(price) {
2083
+ return typeof price === "object" && price !== null && "type" in price && price.type === "search" && "price" in price && typeof price.price === "number";
2084
+ }
1752
2085
  function validateProvider(raw) {
1753
2086
  if (typeof raw !== "object" || raw === null) {
1754
2087
  throw new Error("Provider data must be an object");
@@ -1771,7 +2104,7 @@ function validateProvider(raw) {
1771
2104
  }
1772
2105
  const models2 = provider.models;
1773
2106
  Object.values(models2).forEach((price) => {
1774
- if (!isTokenPrice(price) && !isImagePrice(price) && !isCharacterPrice(price) && !isMinutePrice(price)) {
2107
+ if (!isTokenPrice(price) && !isImagePrice(price) && !isCharacterPrice(price) && !isMinutePrice(price) && !isSearchPrice(price)) {
1775
2108
  throw new Error(`Invalid price data: ${JSON.stringify(price)}`);
1776
2109
  }
1777
2110
  });
@@ -1787,7 +2120,12 @@ function buildAllProviders() {
1787
2120
  return [
1788
2121
  validateProvider(openai_provider_default),
1789
2122
  validateProvider(anthropic_provider_default),
1790
- validateProvider(mistral_provider_default)
2123
+ validateProvider(mistral_provider_default),
2124
+ validateProvider(cohere_provider_default),
2125
+ validateProvider(xai_provider_default),
2126
+ validateProvider(google_provider_default),
2127
+ validateProvider(deepseek_provider_default),
2128
+ validateProvider(groq_provider_default)
1791
2129
  ];
1792
2130
  }
1793
2131
  function buildProvidersData() {
package/dist/index.mjs CHANGED
@@ -724,6 +724,36 @@ var anthropic_models_default = {
724
724
  outputIsFixed: 1
725
725
  },
726
726
  aliases: ["claude-3-5-haiku-latest", "claude-3-5-haiku"]
727
+ },
728
+ {
729
+ id: "claude-3-7-sonnet-20250219",
730
+ name: "Claude 3.7 Sonnet",
731
+ license: "proprietary",
732
+ providers: ["anthropic", "aws", "google"],
733
+ can: [
734
+ "chat",
735
+ "text-in",
736
+ "text-out",
737
+ "img-in",
738
+ "json-out",
739
+ "function-out",
740
+ "reason"
741
+ ],
742
+ context: {
743
+ type: "token",
744
+ total: 2e5,
745
+ maxOutput: 8192,
746
+ outputIsFixed: 1,
747
+ extended: {
748
+ reasoning: {
749
+ maxOutput: 64e3
750
+ },
751
+ experimental: {
752
+ maxOutput: 128e3
753
+ }
754
+ }
755
+ },
756
+ aliases: ["claude-3-7-sonnet-latest", "claude-3-7-sonnet"]
727
757
  }
728
758
  ]
729
759
  };
@@ -1106,8 +1136,15 @@ var cohere_models_default = {
1106
1136
  name: "Command R7B",
1107
1137
  creator: "cohere",
1108
1138
  license: "proprietary",
1109
- providers: ["cohere"],
1110
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1139
+ providers: [
1140
+ "cohere"
1141
+ ],
1142
+ can: [
1143
+ "chat",
1144
+ "text-in",
1145
+ "text-out",
1146
+ "function-out"
1147
+ ],
1111
1148
  context: {
1112
1149
  type: "token",
1113
1150
  total: 128e3,
@@ -1119,36 +1156,70 @@ var cohere_models_default = {
1119
1156
  name: "Command R+",
1120
1157
  creator: "cohere",
1121
1158
  license: "proprietary",
1122
- providers: ["cohere", "bedrock", "azure", "oracle"],
1123
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1159
+ providers: [
1160
+ "cohere",
1161
+ "bedrock",
1162
+ "azure",
1163
+ "oracle"
1164
+ ],
1165
+ can: [
1166
+ "chat",
1167
+ "text-in",
1168
+ "text-out",
1169
+ "reason",
1170
+ "function-out"
1171
+ ],
1124
1172
  context: {
1125
1173
  type: "token",
1126
1174
  total: 128e3,
1127
1175
  maxOutput: 4096
1128
1176
  },
1129
- aliases: ["command-r-plus"]
1177
+ aliases: [
1178
+ "command-r-plus"
1179
+ ]
1130
1180
  },
1131
1181
  {
1132
1182
  id: "command-r-03-2024",
1133
1183
  name: "Command R",
1134
1184
  creator: "cohere",
1135
1185
  license: "proprietary",
1136
- providers: ["cohere", "bedrock", "azure", "oracle"],
1137
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1186
+ providers: [
1187
+ "cohere",
1188
+ "bedrock",
1189
+ "azure",
1190
+ "oracle"
1191
+ ],
1192
+ can: [
1193
+ "chat",
1194
+ "text-in",
1195
+ "text-out",
1196
+ "reason",
1197
+ "function-out"
1198
+ ],
1138
1199
  context: {
1139
1200
  type: "token",
1140
1201
  total: 128e3,
1141
1202
  maxOutput: 4096
1142
1203
  },
1143
- aliases: ["command-r"]
1204
+ aliases: [
1205
+ "command-r"
1206
+ ]
1144
1207
  },
1145
1208
  {
1146
1209
  id: "command",
1147
1210
  name: "Command",
1148
1211
  creator: "cohere",
1149
1212
  license: "proprietary",
1150
- providers: ["cohere", "bedrock", "oracle"],
1151
- can: ["chat", "text-in", "text-out"],
1213
+ providers: [
1214
+ "cohere",
1215
+ "bedrock",
1216
+ "oracle"
1217
+ ],
1218
+ can: [
1219
+ "chat",
1220
+ "text-in",
1221
+ "text-out"
1222
+ ],
1152
1223
  context: {
1153
1224
  type: "token",
1154
1225
  total: 4096,
@@ -1160,8 +1231,16 @@ var cohere_models_default = {
1160
1231
  name: "Command Light",
1161
1232
  creator: "cohere",
1162
1233
  license: "proprietary",
1163
- providers: ["cohere", "bedrock", "oracle"],
1164
- can: ["chat", "text-in", "text-out"],
1234
+ providers: [
1235
+ "cohere",
1236
+ "bedrock",
1237
+ "oracle"
1238
+ ],
1239
+ can: [
1240
+ "chat",
1241
+ "text-in",
1242
+ "text-out"
1243
+ ],
1165
1244
  context: {
1166
1245
  type: "token",
1167
1246
  total: 4096,
@@ -1173,8 +1252,17 @@ var cohere_models_default = {
1173
1252
  name: "Embed English v3.0",
1174
1253
  creator: "cohere",
1175
1254
  license: "proprietary",
1176
- providers: ["cohere", "bedrock", "azure", "oracle"],
1177
- can: ["text-in", "img-in", "vectors-out"],
1255
+ providers: [
1256
+ "cohere",
1257
+ "bedrock",
1258
+ "azure",
1259
+ "oracle"
1260
+ ],
1261
+ can: [
1262
+ "text-in",
1263
+ "img-in",
1264
+ "vectors-out"
1265
+ ],
1178
1266
  context: {
1179
1267
  type: "token",
1180
1268
  total: 512,
@@ -1186,8 +1274,15 @@ var cohere_models_default = {
1186
1274
  name: "Embed English Light v3.0",
1187
1275
  creator: "cohere",
1188
1276
  license: "proprietary",
1189
- providers: ["cohere", "oracle"],
1190
- can: ["text-in", "img-in", "vectors-out"],
1277
+ providers: [
1278
+ "cohere",
1279
+ "oracle"
1280
+ ],
1281
+ can: [
1282
+ "text-in",
1283
+ "img-in",
1284
+ "vectors-out"
1285
+ ],
1191
1286
  context: {
1192
1287
  type: "token",
1193
1288
  total: 512,
@@ -1199,8 +1294,17 @@ var cohere_models_default = {
1199
1294
  name: "Embed Multilingual v3.0",
1200
1295
  creator: "cohere",
1201
1296
  license: "proprietary",
1202
- providers: ["cohere", "bedrock", "azure", "oracle"],
1203
- can: ["text-in", "img-in", "vectors-out"],
1297
+ providers: [
1298
+ "cohere",
1299
+ "bedrock",
1300
+ "azure",
1301
+ "oracle"
1302
+ ],
1303
+ can: [
1304
+ "text-in",
1305
+ "img-in",
1306
+ "vectors-out"
1307
+ ],
1204
1308
  context: {
1205
1309
  type: "token",
1206
1310
  total: 512,
@@ -1212,8 +1316,15 @@ var cohere_models_default = {
1212
1316
  name: "Embed Multilingual Light v3.0",
1213
1317
  creator: "cohere",
1214
1318
  license: "proprietary",
1215
- providers: ["cohere", "oracle"],
1216
- can: ["text-in", "img-in", "vectors-out"],
1319
+ providers: [
1320
+ "cohere",
1321
+ "oracle"
1322
+ ],
1323
+ can: [
1324
+ "text-in",
1325
+ "img-in",
1326
+ "vectors-out"
1327
+ ],
1217
1328
  context: {
1218
1329
  type: "token",
1219
1330
  total: 512,
@@ -1225,8 +1336,15 @@ var cohere_models_default = {
1225
1336
  name: "Rerank v3.5",
1226
1337
  creator: "cohere",
1227
1338
  license: "proprietary",
1228
- providers: ["cohere", "bedrock", "azure"],
1229
- can: ["text-in", "text-out"],
1339
+ providers: [
1340
+ "cohere",
1341
+ "bedrock",
1342
+ "azure"
1343
+ ],
1344
+ can: [
1345
+ "text-in",
1346
+ "text-out"
1347
+ ],
1230
1348
  context: {
1231
1349
  type: "token",
1232
1350
  total: 4096,
@@ -1238,8 +1356,14 @@ var cohere_models_default = {
1238
1356
  name: "Rerank English v3.0",
1239
1357
  creator: "cohere",
1240
1358
  license: "proprietary",
1241
- providers: ["cohere", "azure"],
1242
- can: ["text-in", "text-out"],
1359
+ providers: [
1360
+ "cohere",
1361
+ "azure"
1362
+ ],
1363
+ can: [
1364
+ "text-in",
1365
+ "text-out"
1366
+ ],
1243
1367
  context: {
1244
1368
  type: "token",
1245
1369
  total: 4096,
@@ -1251,8 +1375,14 @@ var cohere_models_default = {
1251
1375
  name: "Rerank Multilingual v3.0",
1252
1376
  creator: "cohere",
1253
1377
  license: "proprietary",
1254
- providers: ["cohere", "azure"],
1255
- can: ["text-in", "text-out"],
1378
+ providers: [
1379
+ "cohere",
1380
+ "azure"
1381
+ ],
1382
+ can: [
1383
+ "text-in",
1384
+ "text-out"
1385
+ ],
1256
1386
  context: {
1257
1387
  type: "token",
1258
1388
  total: 4096,
@@ -1707,6 +1837,206 @@ var mistral_provider_default = {
1707
1837
  }
1708
1838
  };
1709
1839
 
1840
+ // src/data/providers/cohere-provider.json
1841
+ var cohere_provider_default = {
1842
+ id: "cohere",
1843
+ name: "Cohere",
1844
+ websiteUrl: "https://cohere.com",
1845
+ apiUrl: "https://docs.cohere.com/reference",
1846
+ models: {
1847
+ "command-r7b-12-2024": {
1848
+ type: "token",
1849
+ input: 0.0375,
1850
+ output: 0.15
1851
+ },
1852
+ "command-r-plus-08-2024": {
1853
+ type: "token",
1854
+ input: 2.5,
1855
+ output: 10
1856
+ },
1857
+ "command-r-03-2024": {
1858
+ type: "token",
1859
+ input: 0.15,
1860
+ output: 0.6
1861
+ },
1862
+ command: {
1863
+ type: "token",
1864
+ input: 1500,
1865
+ output: 2e3
1866
+ },
1867
+ "command-light": {
1868
+ type: "token",
1869
+ input: 300,
1870
+ output: 600
1871
+ },
1872
+ "embed-english-v3.0": {
1873
+ type: "token",
1874
+ input: 0.1,
1875
+ output: 0
1876
+ },
1877
+ "embed-english-light-v3.0": {
1878
+ type: "token",
1879
+ input: 30,
1880
+ output: 0
1881
+ },
1882
+ "embed-multilingual-v3.0": {
1883
+ type: "token",
1884
+ input: 100,
1885
+ output: 0
1886
+ },
1887
+ "embed-multilingual-light-v3.0": {
1888
+ type: "token",
1889
+ input: 30,
1890
+ output: 0
1891
+ },
1892
+ "rerank-v3.5": {
1893
+ type: "token",
1894
+ input: 100,
1895
+ output: 0
1896
+ },
1897
+ "rerank-english-v3.0": {
1898
+ type: "token",
1899
+ input: 100,
1900
+ output: 0
1901
+ },
1902
+ "rerank-multilingual-v3.0": {
1903
+ type: "token",
1904
+ input: 100,
1905
+ output: 0
1906
+ }
1907
+ }
1908
+ };
1909
+
1910
+ // src/data/providers/xai-provider.json
1911
+ var xai_provider_default = {
1912
+ id: "xai",
1913
+ name: "X.AI",
1914
+ websiteUrl: "https://x.ai",
1915
+ apiUrl: "https://x.ai/api",
1916
+ models: {
1917
+ "grok-2-vision-1212": {
1918
+ type: "token",
1919
+ input: 2,
1920
+ output: 10
1921
+ },
1922
+ "grok-2-1212": {
1923
+ type: "token",
1924
+ input: 2,
1925
+ output: 10
1926
+ },
1927
+ "grok-vision-beta": {
1928
+ type: "token",
1929
+ input: 5,
1930
+ output: 15
1931
+ },
1932
+ "grok-beta": {
1933
+ type: "token",
1934
+ input: 5,
1935
+ output: 15
1936
+ }
1937
+ }
1938
+ };
1939
+
1940
+ // src/data/providers/google-provider.json
1941
+ var google_provider_default = {
1942
+ id: "google",
1943
+ name: "Google",
1944
+ websiteUrl: "https://ai.google.dev",
1945
+ apiUrl: "https://ai.google.dev/docs",
1946
+ models: {
1947
+ "gemini-2.0-flash": {
1948
+ type: "token",
1949
+ input: 0.1,
1950
+ output: 0.4
1951
+ },
1952
+ "gemini-2.0-flash-lite": {
1953
+ type: "token",
1954
+ input: 0.075,
1955
+ output: 0.3
1956
+ },
1957
+ "gemini-1.5-flash": {
1958
+ type: "token",
1959
+ input: 0.075,
1960
+ output: 0.3
1961
+ },
1962
+ "gemini-1.5-flash-8b": {
1963
+ type: "token",
1964
+ input: 0.0375,
1965
+ output: 0.15
1966
+ },
1967
+ "gemini-1.5-pro": {
1968
+ type: "token",
1969
+ input: 1.25,
1970
+ output: 5
1971
+ },
1972
+ "text-embedding-004": {
1973
+ type: "token",
1974
+ input: 0,
1975
+ output: 0
1976
+ }
1977
+ }
1978
+ };
1979
+
1980
+ // src/data/providers/deepseek-provider.json
1981
+ var deepseek_provider_default = {
1982
+ id: "deepseek",
1983
+ name: "DeepSeek",
1984
+ websiteUrl: "https://deepseek.com/",
1985
+ apiUrl: "https://api.deepseek.com/v1",
1986
+ defaultModel: "deepseek-chat",
1987
+ models: {
1988
+ "deepseek-chat": {
1989
+ type: "token",
1990
+ input: 0.2,
1991
+ output: 0.2
1992
+ },
1993
+ "deepseek-reasoner": {
1994
+ type: "token",
1995
+ input: 0.3,
1996
+ output: 0.3
1997
+ }
1998
+ }
1999
+ };
2000
+
2001
+ // src/data/providers/groq-provider.json
2002
+ var groq_provider_default = {
2003
+ id: "groq",
2004
+ name: "Groq",
2005
+ websiteUrl: "https://groq.com",
2006
+ apiUrl: "https://api.groq.com/openai/v1",
2007
+ defaultModel: "llama3-70b-8192",
2008
+ models: {
2009
+ "llama3-70b-8192": {
2010
+ type: "token",
2011
+ input: 0.7,
2012
+ output: 0.7
2013
+ },
2014
+ "llama3-8b-8192": {
2015
+ type: "token",
2016
+ input: 0.1,
2017
+ output: 0.1
2018
+ },
2019
+ "mixtral-8x7b-32768": {
2020
+ type: "token",
2021
+ input: 0.5,
2022
+ output: 0.5
2023
+ },
2024
+ "gemma2-9b-it": {
2025
+ type: "token",
2026
+ input: 0.2,
2027
+ output: 0.2
2028
+ },
2029
+ "whisper-large-v3": {
2030
+ type: "minute",
2031
+ price: 6e-3
2032
+ },
2033
+ "whisper-large-v3-turbo": {
2034
+ type: "minute",
2035
+ price: 6e-3
2036
+ }
2037
+ }
2038
+ };
2039
+
1710
2040
  // src/builders/providers.ts
1711
2041
  function isTokenPrice(price) {
1712
2042
  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";
@@ -1720,6 +2050,9 @@ function isCharacterPrice(price) {
1720
2050
  function isMinutePrice(price) {
1721
2051
  return typeof price === "object" && price !== null && "type" in price && price.type === "minute" && "price" in price && typeof price.price === "number";
1722
2052
  }
2053
+ function isSearchPrice(price) {
2054
+ return typeof price === "object" && price !== null && "type" in price && price.type === "search" && "price" in price && typeof price.price === "number";
2055
+ }
1723
2056
  function validateProvider(raw) {
1724
2057
  if (typeof raw !== "object" || raw === null) {
1725
2058
  throw new Error("Provider data must be an object");
@@ -1742,7 +2075,7 @@ function validateProvider(raw) {
1742
2075
  }
1743
2076
  const models2 = provider.models;
1744
2077
  Object.values(models2).forEach((price) => {
1745
- if (!isTokenPrice(price) && !isImagePrice(price) && !isCharacterPrice(price) && !isMinutePrice(price)) {
2078
+ if (!isTokenPrice(price) && !isImagePrice(price) && !isCharacterPrice(price) && !isMinutePrice(price) && !isSearchPrice(price)) {
1746
2079
  throw new Error(`Invalid price data: ${JSON.stringify(price)}`);
1747
2080
  }
1748
2081
  });
@@ -1758,7 +2091,12 @@ function buildAllProviders() {
1758
2091
  return [
1759
2092
  validateProvider(openai_provider_default),
1760
2093
  validateProvider(anthropic_provider_default),
1761
- validateProvider(mistral_provider_default)
2094
+ validateProvider(mistral_provider_default),
2095
+ validateProvider(cohere_provider_default),
2096
+ validateProvider(xai_provider_default),
2097
+ validateProvider(google_provider_default),
2098
+ validateProvider(deepseek_provider_default),
2099
+ validateProvider(groq_provider_default)
1762
2100
  ];
1763
2101
  }
1764
2102
  function buildProvidersData() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aimodels",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "A collection of AI model specifications across different providers",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",