aimodels 0.3.7 → 0.3.8

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.
Files changed (3) hide show
  1. package/dist/index.js +336 -28
  2. package/dist/index.mjs +336 -28
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1135,8 +1135,15 @@ var cohere_models_default = {
1135
1135
  name: "Command R7B",
1136
1136
  creator: "cohere",
1137
1137
  license: "proprietary",
1138
- providers: ["cohere"],
1139
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1138
+ providers: [
1139
+ "cohere"
1140
+ ],
1141
+ can: [
1142
+ "chat",
1143
+ "text-in",
1144
+ "text-out",
1145
+ "function-out"
1146
+ ],
1140
1147
  context: {
1141
1148
  type: "token",
1142
1149
  total: 128e3,
@@ -1148,36 +1155,70 @@ var cohere_models_default = {
1148
1155
  name: "Command R+",
1149
1156
  creator: "cohere",
1150
1157
  license: "proprietary",
1151
- providers: ["cohere", "bedrock", "azure", "oracle"],
1152
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1158
+ providers: [
1159
+ "cohere",
1160
+ "bedrock",
1161
+ "azure",
1162
+ "oracle"
1163
+ ],
1164
+ can: [
1165
+ "chat",
1166
+ "text-in",
1167
+ "text-out",
1168
+ "reason",
1169
+ "function-out"
1170
+ ],
1153
1171
  context: {
1154
1172
  type: "token",
1155
1173
  total: 128e3,
1156
1174
  maxOutput: 4096
1157
1175
  },
1158
- aliases: ["command-r-plus"]
1176
+ aliases: [
1177
+ "command-r-plus"
1178
+ ]
1159
1179
  },
1160
1180
  {
1161
1181
  id: "command-r-03-2024",
1162
1182
  name: "Command R",
1163
1183
  creator: "cohere",
1164
1184
  license: "proprietary",
1165
- providers: ["cohere", "bedrock", "azure", "oracle"],
1166
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1185
+ providers: [
1186
+ "cohere",
1187
+ "bedrock",
1188
+ "azure",
1189
+ "oracle"
1190
+ ],
1191
+ can: [
1192
+ "chat",
1193
+ "text-in",
1194
+ "text-out",
1195
+ "reason",
1196
+ "function-out"
1197
+ ],
1167
1198
  context: {
1168
1199
  type: "token",
1169
1200
  total: 128e3,
1170
1201
  maxOutput: 4096
1171
1202
  },
1172
- aliases: ["command-r"]
1203
+ aliases: [
1204
+ "command-r"
1205
+ ]
1173
1206
  },
1174
1207
  {
1175
1208
  id: "command",
1176
1209
  name: "Command",
1177
1210
  creator: "cohere",
1178
1211
  license: "proprietary",
1179
- providers: ["cohere", "bedrock", "oracle"],
1180
- can: ["chat", "text-in", "text-out"],
1212
+ providers: [
1213
+ "cohere",
1214
+ "bedrock",
1215
+ "oracle"
1216
+ ],
1217
+ can: [
1218
+ "chat",
1219
+ "text-in",
1220
+ "text-out"
1221
+ ],
1181
1222
  context: {
1182
1223
  type: "token",
1183
1224
  total: 4096,
@@ -1189,8 +1230,16 @@ var cohere_models_default = {
1189
1230
  name: "Command Light",
1190
1231
  creator: "cohere",
1191
1232
  license: "proprietary",
1192
- providers: ["cohere", "bedrock", "oracle"],
1193
- can: ["chat", "text-in", "text-out"],
1233
+ providers: [
1234
+ "cohere",
1235
+ "bedrock",
1236
+ "oracle"
1237
+ ],
1238
+ can: [
1239
+ "chat",
1240
+ "text-in",
1241
+ "text-out"
1242
+ ],
1194
1243
  context: {
1195
1244
  type: "token",
1196
1245
  total: 4096,
@@ -1202,8 +1251,17 @@ var cohere_models_default = {
1202
1251
  name: "Embed English v3.0",
1203
1252
  creator: "cohere",
1204
1253
  license: "proprietary",
1205
- providers: ["cohere", "bedrock", "azure", "oracle"],
1206
- can: ["text-in", "img-in", "vectors-out"],
1254
+ providers: [
1255
+ "cohere",
1256
+ "bedrock",
1257
+ "azure",
1258
+ "oracle"
1259
+ ],
1260
+ can: [
1261
+ "text-in",
1262
+ "img-in",
1263
+ "vectors-out"
1264
+ ],
1207
1265
  context: {
1208
1266
  type: "token",
1209
1267
  total: 512,
@@ -1215,8 +1273,15 @@ var cohere_models_default = {
1215
1273
  name: "Embed English Light v3.0",
1216
1274
  creator: "cohere",
1217
1275
  license: "proprietary",
1218
- providers: ["cohere", "oracle"],
1219
- can: ["text-in", "img-in", "vectors-out"],
1276
+ providers: [
1277
+ "cohere",
1278
+ "oracle"
1279
+ ],
1280
+ can: [
1281
+ "text-in",
1282
+ "img-in",
1283
+ "vectors-out"
1284
+ ],
1220
1285
  context: {
1221
1286
  type: "token",
1222
1287
  total: 512,
@@ -1228,8 +1293,17 @@ var cohere_models_default = {
1228
1293
  name: "Embed Multilingual v3.0",
1229
1294
  creator: "cohere",
1230
1295
  license: "proprietary",
1231
- providers: ["cohere", "bedrock", "azure", "oracle"],
1232
- can: ["text-in", "img-in", "vectors-out"],
1296
+ providers: [
1297
+ "cohere",
1298
+ "bedrock",
1299
+ "azure",
1300
+ "oracle"
1301
+ ],
1302
+ can: [
1303
+ "text-in",
1304
+ "img-in",
1305
+ "vectors-out"
1306
+ ],
1233
1307
  context: {
1234
1308
  type: "token",
1235
1309
  total: 512,
@@ -1241,8 +1315,15 @@ var cohere_models_default = {
1241
1315
  name: "Embed Multilingual Light v3.0",
1242
1316
  creator: "cohere",
1243
1317
  license: "proprietary",
1244
- providers: ["cohere", "oracle"],
1245
- can: ["text-in", "img-in", "vectors-out"],
1318
+ providers: [
1319
+ "cohere",
1320
+ "oracle"
1321
+ ],
1322
+ can: [
1323
+ "text-in",
1324
+ "img-in",
1325
+ "vectors-out"
1326
+ ],
1246
1327
  context: {
1247
1328
  type: "token",
1248
1329
  total: 512,
@@ -1254,8 +1335,15 @@ var cohere_models_default = {
1254
1335
  name: "Rerank v3.5",
1255
1336
  creator: "cohere",
1256
1337
  license: "proprietary",
1257
- providers: ["cohere", "bedrock", "azure"],
1258
- can: ["text-in", "text-out"],
1338
+ providers: [
1339
+ "cohere",
1340
+ "bedrock",
1341
+ "azure"
1342
+ ],
1343
+ can: [
1344
+ "text-in",
1345
+ "text-out"
1346
+ ],
1259
1347
  context: {
1260
1348
  type: "token",
1261
1349
  total: 4096,
@@ -1267,8 +1355,14 @@ var cohere_models_default = {
1267
1355
  name: "Rerank English v3.0",
1268
1356
  creator: "cohere",
1269
1357
  license: "proprietary",
1270
- providers: ["cohere", "azure"],
1271
- can: ["text-in", "text-out"],
1358
+ providers: [
1359
+ "cohere",
1360
+ "azure"
1361
+ ],
1362
+ can: [
1363
+ "text-in",
1364
+ "text-out"
1365
+ ],
1272
1366
  context: {
1273
1367
  type: "token",
1274
1368
  total: 4096,
@@ -1280,8 +1374,14 @@ var cohere_models_default = {
1280
1374
  name: "Rerank Multilingual v3.0",
1281
1375
  creator: "cohere",
1282
1376
  license: "proprietary",
1283
- providers: ["cohere", "azure"],
1284
- can: ["text-in", "text-out"],
1377
+ providers: [
1378
+ "cohere",
1379
+ "azure"
1380
+ ],
1381
+ can: [
1382
+ "text-in",
1383
+ "text-out"
1384
+ ],
1285
1385
  context: {
1286
1386
  type: "token",
1287
1387
  total: 4096,
@@ -1736,6 +1836,206 @@ var mistral_provider_default = {
1736
1836
  }
1737
1837
  };
1738
1838
 
1839
+ // src/data/providers/cohere-provider.json
1840
+ var cohere_provider_default = {
1841
+ id: "cohere",
1842
+ name: "Cohere",
1843
+ websiteUrl: "https://cohere.com",
1844
+ apiUrl: "https://docs.cohere.com/reference",
1845
+ models: {
1846
+ "command-r7b-12-2024": {
1847
+ type: "token",
1848
+ input: 0.0375,
1849
+ output: 0.15
1850
+ },
1851
+ "command-r-plus-08-2024": {
1852
+ type: "token",
1853
+ input: 2.5,
1854
+ output: 10
1855
+ },
1856
+ "command-r-03-2024": {
1857
+ type: "token",
1858
+ input: 0.15,
1859
+ output: 0.6
1860
+ },
1861
+ command: {
1862
+ type: "token",
1863
+ input: 1500,
1864
+ output: 2e3
1865
+ },
1866
+ "command-light": {
1867
+ type: "token",
1868
+ input: 300,
1869
+ output: 600
1870
+ },
1871
+ "embed-english-v3.0": {
1872
+ type: "token",
1873
+ input: 0.1,
1874
+ output: 0
1875
+ },
1876
+ "embed-english-light-v3.0": {
1877
+ type: "token",
1878
+ input: 30,
1879
+ output: 0
1880
+ },
1881
+ "embed-multilingual-v3.0": {
1882
+ type: "token",
1883
+ input: 100,
1884
+ output: 0
1885
+ },
1886
+ "embed-multilingual-light-v3.0": {
1887
+ type: "token",
1888
+ input: 30,
1889
+ output: 0
1890
+ },
1891
+ "rerank-v3.5": {
1892
+ type: "token",
1893
+ input: 100,
1894
+ output: 0
1895
+ },
1896
+ "rerank-english-v3.0": {
1897
+ type: "token",
1898
+ input: 100,
1899
+ output: 0
1900
+ },
1901
+ "rerank-multilingual-v3.0": {
1902
+ type: "token",
1903
+ input: 100,
1904
+ output: 0
1905
+ }
1906
+ }
1907
+ };
1908
+
1909
+ // src/data/providers/xai-provider.json
1910
+ var xai_provider_default = {
1911
+ id: "xai",
1912
+ name: "X.AI",
1913
+ websiteUrl: "https://x.ai",
1914
+ apiUrl: "https://x.ai/api",
1915
+ models: {
1916
+ "grok-2-vision-1212": {
1917
+ type: "token",
1918
+ input: 2,
1919
+ output: 10
1920
+ },
1921
+ "grok-2-1212": {
1922
+ type: "token",
1923
+ input: 2,
1924
+ output: 10
1925
+ },
1926
+ "grok-vision-beta": {
1927
+ type: "token",
1928
+ input: 5,
1929
+ output: 15
1930
+ },
1931
+ "grok-beta": {
1932
+ type: "token",
1933
+ input: 5,
1934
+ output: 15
1935
+ }
1936
+ }
1937
+ };
1938
+
1939
+ // src/data/providers/google-provider.json
1940
+ var google_provider_default = {
1941
+ id: "google",
1942
+ name: "Google",
1943
+ websiteUrl: "https://ai.google.dev",
1944
+ apiUrl: "https://ai.google.dev/docs",
1945
+ models: {
1946
+ "gemini-2.0-flash": {
1947
+ type: "token",
1948
+ input: 0.1,
1949
+ output: 0.4
1950
+ },
1951
+ "gemini-2.0-flash-lite": {
1952
+ type: "token",
1953
+ input: 0.075,
1954
+ output: 0.3
1955
+ },
1956
+ "gemini-1.5-flash": {
1957
+ type: "token",
1958
+ input: 0.075,
1959
+ output: 0.3
1960
+ },
1961
+ "gemini-1.5-flash-8b": {
1962
+ type: "token",
1963
+ input: 0.0375,
1964
+ output: 0.15
1965
+ },
1966
+ "gemini-1.5-pro": {
1967
+ type: "token",
1968
+ input: 1.25,
1969
+ output: 5
1970
+ },
1971
+ "text-embedding-004": {
1972
+ type: "token",
1973
+ input: 0,
1974
+ output: 0
1975
+ }
1976
+ }
1977
+ };
1978
+
1979
+ // src/data/providers/deepseek-provider.json
1980
+ var deepseek_provider_default = {
1981
+ id: "deepseek",
1982
+ name: "DeepSeek",
1983
+ websiteUrl: "https://deepseek.com/",
1984
+ apiUrl: "https://api.deepseek.com/v1",
1985
+ defaultModel: "deepseek-chat",
1986
+ models: {
1987
+ "deepseek-chat": {
1988
+ type: "token",
1989
+ input: 0.2,
1990
+ output: 0.2
1991
+ },
1992
+ "deepseek-reasoner": {
1993
+ type: "token",
1994
+ input: 0.3,
1995
+ output: 0.3
1996
+ }
1997
+ }
1998
+ };
1999
+
2000
+ // src/data/providers/groq-provider.json
2001
+ var groq_provider_default = {
2002
+ id: "groq",
2003
+ name: "Groq",
2004
+ websiteUrl: "https://groq.com",
2005
+ apiUrl: "https://api.groq.com/openai/v1",
2006
+ defaultModel: "llama3-70b-8192",
2007
+ models: {
2008
+ "llama3-70b-8192": {
2009
+ type: "token",
2010
+ input: 0.7,
2011
+ output: 0.7
2012
+ },
2013
+ "llama3-8b-8192": {
2014
+ type: "token",
2015
+ input: 0.1,
2016
+ output: 0.1
2017
+ },
2018
+ "mixtral-8x7b-32768": {
2019
+ type: "token",
2020
+ input: 0.5,
2021
+ output: 0.5
2022
+ },
2023
+ "gemma2-9b-it": {
2024
+ type: "token",
2025
+ input: 0.2,
2026
+ output: 0.2
2027
+ },
2028
+ "whisper-large-v3": {
2029
+ type: "minute",
2030
+ price: 6e-3
2031
+ },
2032
+ "whisper-large-v3-turbo": {
2033
+ type: "minute",
2034
+ price: 6e-3
2035
+ }
2036
+ }
2037
+ };
2038
+
1739
2039
  // src/builders/providers.ts
1740
2040
  function isTokenPrice(price) {
1741
2041
  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 +2049,9 @@ function isCharacterPrice(price) {
1749
2049
  function isMinutePrice(price) {
1750
2050
  return typeof price === "object" && price !== null && "type" in price && price.type === "minute" && "price" in price && typeof price.price === "number";
1751
2051
  }
2052
+ function isSearchPrice(price) {
2053
+ return typeof price === "object" && price !== null && "type" in price && price.type === "search" && "price" in price && typeof price.price === "number";
2054
+ }
1752
2055
  function validateProvider(raw) {
1753
2056
  if (typeof raw !== "object" || raw === null) {
1754
2057
  throw new Error("Provider data must be an object");
@@ -1771,7 +2074,7 @@ function validateProvider(raw) {
1771
2074
  }
1772
2075
  const models2 = provider.models;
1773
2076
  Object.values(models2).forEach((price) => {
1774
- if (!isTokenPrice(price) && !isImagePrice(price) && !isCharacterPrice(price) && !isMinutePrice(price)) {
2077
+ if (!isTokenPrice(price) && !isImagePrice(price) && !isCharacterPrice(price) && !isMinutePrice(price) && !isSearchPrice(price)) {
1775
2078
  throw new Error(`Invalid price data: ${JSON.stringify(price)}`);
1776
2079
  }
1777
2080
  });
@@ -1787,7 +2090,12 @@ function buildAllProviders() {
1787
2090
  return [
1788
2091
  validateProvider(openai_provider_default),
1789
2092
  validateProvider(anthropic_provider_default),
1790
- validateProvider(mistral_provider_default)
2093
+ validateProvider(mistral_provider_default),
2094
+ validateProvider(cohere_provider_default),
2095
+ validateProvider(xai_provider_default),
2096
+ validateProvider(google_provider_default),
2097
+ validateProvider(deepseek_provider_default),
2098
+ validateProvider(groq_provider_default)
1791
2099
  ];
1792
2100
  }
1793
2101
  function buildProvidersData() {
package/dist/index.mjs CHANGED
@@ -1106,8 +1106,15 @@ var cohere_models_default = {
1106
1106
  name: "Command R7B",
1107
1107
  creator: "cohere",
1108
1108
  license: "proprietary",
1109
- providers: ["cohere"],
1110
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1109
+ providers: [
1110
+ "cohere"
1111
+ ],
1112
+ can: [
1113
+ "chat",
1114
+ "text-in",
1115
+ "text-out",
1116
+ "function-out"
1117
+ ],
1111
1118
  context: {
1112
1119
  type: "token",
1113
1120
  total: 128e3,
@@ -1119,36 +1126,70 @@ var cohere_models_default = {
1119
1126
  name: "Command R+",
1120
1127
  creator: "cohere",
1121
1128
  license: "proprietary",
1122
- providers: ["cohere", "bedrock", "azure", "oracle"],
1123
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1129
+ providers: [
1130
+ "cohere",
1131
+ "bedrock",
1132
+ "azure",
1133
+ "oracle"
1134
+ ],
1135
+ can: [
1136
+ "chat",
1137
+ "text-in",
1138
+ "text-out",
1139
+ "reason",
1140
+ "function-out"
1141
+ ],
1124
1142
  context: {
1125
1143
  type: "token",
1126
1144
  total: 128e3,
1127
1145
  maxOutput: 4096
1128
1146
  },
1129
- aliases: ["command-r-plus"]
1147
+ aliases: [
1148
+ "command-r-plus"
1149
+ ]
1130
1150
  },
1131
1151
  {
1132
1152
  id: "command-r-03-2024",
1133
1153
  name: "Command R",
1134
1154
  creator: "cohere",
1135
1155
  license: "proprietary",
1136
- providers: ["cohere", "bedrock", "azure", "oracle"],
1137
- can: ["chat", "text-in", "text-out", "reason", "function-out"],
1156
+ providers: [
1157
+ "cohere",
1158
+ "bedrock",
1159
+ "azure",
1160
+ "oracle"
1161
+ ],
1162
+ can: [
1163
+ "chat",
1164
+ "text-in",
1165
+ "text-out",
1166
+ "reason",
1167
+ "function-out"
1168
+ ],
1138
1169
  context: {
1139
1170
  type: "token",
1140
1171
  total: 128e3,
1141
1172
  maxOutput: 4096
1142
1173
  },
1143
- aliases: ["command-r"]
1174
+ aliases: [
1175
+ "command-r"
1176
+ ]
1144
1177
  },
1145
1178
  {
1146
1179
  id: "command",
1147
1180
  name: "Command",
1148
1181
  creator: "cohere",
1149
1182
  license: "proprietary",
1150
- providers: ["cohere", "bedrock", "oracle"],
1151
- can: ["chat", "text-in", "text-out"],
1183
+ providers: [
1184
+ "cohere",
1185
+ "bedrock",
1186
+ "oracle"
1187
+ ],
1188
+ can: [
1189
+ "chat",
1190
+ "text-in",
1191
+ "text-out"
1192
+ ],
1152
1193
  context: {
1153
1194
  type: "token",
1154
1195
  total: 4096,
@@ -1160,8 +1201,16 @@ var cohere_models_default = {
1160
1201
  name: "Command Light",
1161
1202
  creator: "cohere",
1162
1203
  license: "proprietary",
1163
- providers: ["cohere", "bedrock", "oracle"],
1164
- can: ["chat", "text-in", "text-out"],
1204
+ providers: [
1205
+ "cohere",
1206
+ "bedrock",
1207
+ "oracle"
1208
+ ],
1209
+ can: [
1210
+ "chat",
1211
+ "text-in",
1212
+ "text-out"
1213
+ ],
1165
1214
  context: {
1166
1215
  type: "token",
1167
1216
  total: 4096,
@@ -1173,8 +1222,17 @@ var cohere_models_default = {
1173
1222
  name: "Embed English v3.0",
1174
1223
  creator: "cohere",
1175
1224
  license: "proprietary",
1176
- providers: ["cohere", "bedrock", "azure", "oracle"],
1177
- can: ["text-in", "img-in", "vectors-out"],
1225
+ providers: [
1226
+ "cohere",
1227
+ "bedrock",
1228
+ "azure",
1229
+ "oracle"
1230
+ ],
1231
+ can: [
1232
+ "text-in",
1233
+ "img-in",
1234
+ "vectors-out"
1235
+ ],
1178
1236
  context: {
1179
1237
  type: "token",
1180
1238
  total: 512,
@@ -1186,8 +1244,15 @@ var cohere_models_default = {
1186
1244
  name: "Embed English Light v3.0",
1187
1245
  creator: "cohere",
1188
1246
  license: "proprietary",
1189
- providers: ["cohere", "oracle"],
1190
- can: ["text-in", "img-in", "vectors-out"],
1247
+ providers: [
1248
+ "cohere",
1249
+ "oracle"
1250
+ ],
1251
+ can: [
1252
+ "text-in",
1253
+ "img-in",
1254
+ "vectors-out"
1255
+ ],
1191
1256
  context: {
1192
1257
  type: "token",
1193
1258
  total: 512,
@@ -1199,8 +1264,17 @@ var cohere_models_default = {
1199
1264
  name: "Embed Multilingual v3.0",
1200
1265
  creator: "cohere",
1201
1266
  license: "proprietary",
1202
- providers: ["cohere", "bedrock", "azure", "oracle"],
1203
- can: ["text-in", "img-in", "vectors-out"],
1267
+ providers: [
1268
+ "cohere",
1269
+ "bedrock",
1270
+ "azure",
1271
+ "oracle"
1272
+ ],
1273
+ can: [
1274
+ "text-in",
1275
+ "img-in",
1276
+ "vectors-out"
1277
+ ],
1204
1278
  context: {
1205
1279
  type: "token",
1206
1280
  total: 512,
@@ -1212,8 +1286,15 @@ var cohere_models_default = {
1212
1286
  name: "Embed Multilingual Light v3.0",
1213
1287
  creator: "cohere",
1214
1288
  license: "proprietary",
1215
- providers: ["cohere", "oracle"],
1216
- can: ["text-in", "img-in", "vectors-out"],
1289
+ providers: [
1290
+ "cohere",
1291
+ "oracle"
1292
+ ],
1293
+ can: [
1294
+ "text-in",
1295
+ "img-in",
1296
+ "vectors-out"
1297
+ ],
1217
1298
  context: {
1218
1299
  type: "token",
1219
1300
  total: 512,
@@ -1225,8 +1306,15 @@ var cohere_models_default = {
1225
1306
  name: "Rerank v3.5",
1226
1307
  creator: "cohere",
1227
1308
  license: "proprietary",
1228
- providers: ["cohere", "bedrock", "azure"],
1229
- can: ["text-in", "text-out"],
1309
+ providers: [
1310
+ "cohere",
1311
+ "bedrock",
1312
+ "azure"
1313
+ ],
1314
+ can: [
1315
+ "text-in",
1316
+ "text-out"
1317
+ ],
1230
1318
  context: {
1231
1319
  type: "token",
1232
1320
  total: 4096,
@@ -1238,8 +1326,14 @@ var cohere_models_default = {
1238
1326
  name: "Rerank English v3.0",
1239
1327
  creator: "cohere",
1240
1328
  license: "proprietary",
1241
- providers: ["cohere", "azure"],
1242
- can: ["text-in", "text-out"],
1329
+ providers: [
1330
+ "cohere",
1331
+ "azure"
1332
+ ],
1333
+ can: [
1334
+ "text-in",
1335
+ "text-out"
1336
+ ],
1243
1337
  context: {
1244
1338
  type: "token",
1245
1339
  total: 4096,
@@ -1251,8 +1345,14 @@ var cohere_models_default = {
1251
1345
  name: "Rerank Multilingual v3.0",
1252
1346
  creator: "cohere",
1253
1347
  license: "proprietary",
1254
- providers: ["cohere", "azure"],
1255
- can: ["text-in", "text-out"],
1348
+ providers: [
1349
+ "cohere",
1350
+ "azure"
1351
+ ],
1352
+ can: [
1353
+ "text-in",
1354
+ "text-out"
1355
+ ],
1256
1356
  context: {
1257
1357
  type: "token",
1258
1358
  total: 4096,
@@ -1707,6 +1807,206 @@ var mistral_provider_default = {
1707
1807
  }
1708
1808
  };
1709
1809
 
1810
+ // src/data/providers/cohere-provider.json
1811
+ var cohere_provider_default = {
1812
+ id: "cohere",
1813
+ name: "Cohere",
1814
+ websiteUrl: "https://cohere.com",
1815
+ apiUrl: "https://docs.cohere.com/reference",
1816
+ models: {
1817
+ "command-r7b-12-2024": {
1818
+ type: "token",
1819
+ input: 0.0375,
1820
+ output: 0.15
1821
+ },
1822
+ "command-r-plus-08-2024": {
1823
+ type: "token",
1824
+ input: 2.5,
1825
+ output: 10
1826
+ },
1827
+ "command-r-03-2024": {
1828
+ type: "token",
1829
+ input: 0.15,
1830
+ output: 0.6
1831
+ },
1832
+ command: {
1833
+ type: "token",
1834
+ input: 1500,
1835
+ output: 2e3
1836
+ },
1837
+ "command-light": {
1838
+ type: "token",
1839
+ input: 300,
1840
+ output: 600
1841
+ },
1842
+ "embed-english-v3.0": {
1843
+ type: "token",
1844
+ input: 0.1,
1845
+ output: 0
1846
+ },
1847
+ "embed-english-light-v3.0": {
1848
+ type: "token",
1849
+ input: 30,
1850
+ output: 0
1851
+ },
1852
+ "embed-multilingual-v3.0": {
1853
+ type: "token",
1854
+ input: 100,
1855
+ output: 0
1856
+ },
1857
+ "embed-multilingual-light-v3.0": {
1858
+ type: "token",
1859
+ input: 30,
1860
+ output: 0
1861
+ },
1862
+ "rerank-v3.5": {
1863
+ type: "token",
1864
+ input: 100,
1865
+ output: 0
1866
+ },
1867
+ "rerank-english-v3.0": {
1868
+ type: "token",
1869
+ input: 100,
1870
+ output: 0
1871
+ },
1872
+ "rerank-multilingual-v3.0": {
1873
+ type: "token",
1874
+ input: 100,
1875
+ output: 0
1876
+ }
1877
+ }
1878
+ };
1879
+
1880
+ // src/data/providers/xai-provider.json
1881
+ var xai_provider_default = {
1882
+ id: "xai",
1883
+ name: "X.AI",
1884
+ websiteUrl: "https://x.ai",
1885
+ apiUrl: "https://x.ai/api",
1886
+ models: {
1887
+ "grok-2-vision-1212": {
1888
+ type: "token",
1889
+ input: 2,
1890
+ output: 10
1891
+ },
1892
+ "grok-2-1212": {
1893
+ type: "token",
1894
+ input: 2,
1895
+ output: 10
1896
+ },
1897
+ "grok-vision-beta": {
1898
+ type: "token",
1899
+ input: 5,
1900
+ output: 15
1901
+ },
1902
+ "grok-beta": {
1903
+ type: "token",
1904
+ input: 5,
1905
+ output: 15
1906
+ }
1907
+ }
1908
+ };
1909
+
1910
+ // src/data/providers/google-provider.json
1911
+ var google_provider_default = {
1912
+ id: "google",
1913
+ name: "Google",
1914
+ websiteUrl: "https://ai.google.dev",
1915
+ apiUrl: "https://ai.google.dev/docs",
1916
+ models: {
1917
+ "gemini-2.0-flash": {
1918
+ type: "token",
1919
+ input: 0.1,
1920
+ output: 0.4
1921
+ },
1922
+ "gemini-2.0-flash-lite": {
1923
+ type: "token",
1924
+ input: 0.075,
1925
+ output: 0.3
1926
+ },
1927
+ "gemini-1.5-flash": {
1928
+ type: "token",
1929
+ input: 0.075,
1930
+ output: 0.3
1931
+ },
1932
+ "gemini-1.5-flash-8b": {
1933
+ type: "token",
1934
+ input: 0.0375,
1935
+ output: 0.15
1936
+ },
1937
+ "gemini-1.5-pro": {
1938
+ type: "token",
1939
+ input: 1.25,
1940
+ output: 5
1941
+ },
1942
+ "text-embedding-004": {
1943
+ type: "token",
1944
+ input: 0,
1945
+ output: 0
1946
+ }
1947
+ }
1948
+ };
1949
+
1950
+ // src/data/providers/deepseek-provider.json
1951
+ var deepseek_provider_default = {
1952
+ id: "deepseek",
1953
+ name: "DeepSeek",
1954
+ websiteUrl: "https://deepseek.com/",
1955
+ apiUrl: "https://api.deepseek.com/v1",
1956
+ defaultModel: "deepseek-chat",
1957
+ models: {
1958
+ "deepseek-chat": {
1959
+ type: "token",
1960
+ input: 0.2,
1961
+ output: 0.2
1962
+ },
1963
+ "deepseek-reasoner": {
1964
+ type: "token",
1965
+ input: 0.3,
1966
+ output: 0.3
1967
+ }
1968
+ }
1969
+ };
1970
+
1971
+ // src/data/providers/groq-provider.json
1972
+ var groq_provider_default = {
1973
+ id: "groq",
1974
+ name: "Groq",
1975
+ websiteUrl: "https://groq.com",
1976
+ apiUrl: "https://api.groq.com/openai/v1",
1977
+ defaultModel: "llama3-70b-8192",
1978
+ models: {
1979
+ "llama3-70b-8192": {
1980
+ type: "token",
1981
+ input: 0.7,
1982
+ output: 0.7
1983
+ },
1984
+ "llama3-8b-8192": {
1985
+ type: "token",
1986
+ input: 0.1,
1987
+ output: 0.1
1988
+ },
1989
+ "mixtral-8x7b-32768": {
1990
+ type: "token",
1991
+ input: 0.5,
1992
+ output: 0.5
1993
+ },
1994
+ "gemma2-9b-it": {
1995
+ type: "token",
1996
+ input: 0.2,
1997
+ output: 0.2
1998
+ },
1999
+ "whisper-large-v3": {
2000
+ type: "minute",
2001
+ price: 6e-3
2002
+ },
2003
+ "whisper-large-v3-turbo": {
2004
+ type: "minute",
2005
+ price: 6e-3
2006
+ }
2007
+ }
2008
+ };
2009
+
1710
2010
  // src/builders/providers.ts
1711
2011
  function isTokenPrice(price) {
1712
2012
  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 +2020,9 @@ function isCharacterPrice(price) {
1720
2020
  function isMinutePrice(price) {
1721
2021
  return typeof price === "object" && price !== null && "type" in price && price.type === "minute" && "price" in price && typeof price.price === "number";
1722
2022
  }
2023
+ function isSearchPrice(price) {
2024
+ return typeof price === "object" && price !== null && "type" in price && price.type === "search" && "price" in price && typeof price.price === "number";
2025
+ }
1723
2026
  function validateProvider(raw) {
1724
2027
  if (typeof raw !== "object" || raw === null) {
1725
2028
  throw new Error("Provider data must be an object");
@@ -1742,7 +2045,7 @@ function validateProvider(raw) {
1742
2045
  }
1743
2046
  const models2 = provider.models;
1744
2047
  Object.values(models2).forEach((price) => {
1745
- if (!isTokenPrice(price) && !isImagePrice(price) && !isCharacterPrice(price) && !isMinutePrice(price)) {
2048
+ if (!isTokenPrice(price) && !isImagePrice(price) && !isCharacterPrice(price) && !isMinutePrice(price) && !isSearchPrice(price)) {
1746
2049
  throw new Error(`Invalid price data: ${JSON.stringify(price)}`);
1747
2050
  }
1748
2051
  });
@@ -1758,7 +2061,12 @@ function buildAllProviders() {
1758
2061
  return [
1759
2062
  validateProvider(openai_provider_default),
1760
2063
  validateProvider(anthropic_provider_default),
1761
- validateProvider(mistral_provider_default)
2064
+ validateProvider(mistral_provider_default),
2065
+ validateProvider(cohere_provider_default),
2066
+ validateProvider(xai_provider_default),
2067
+ validateProvider(google_provider_default),
2068
+ validateProvider(deepseek_provider_default),
2069
+ validateProvider(groq_provider_default)
1762
2070
  ];
1763
2071
  }
1764
2072
  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.8",
4
4
  "description": "A collection of AI model specifications across different providers",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",