chat-agent-toolkit 1.2.212 → 1.2.214
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/config/language-models-database.d.ts +1 -0
- package/dist/config/model-registry.d.ts +2 -1
- package/dist/research-agent.cjs.js +1 -1
- package/dist/research-agent.cjs.js.map +1 -1
- package/dist/research-agent.es.js +1 -1
- package/dist/research-agent.es.js.map +1 -1
- package/package.json +1 -3
- package/src/config/config-manager.ts +1 -0
- package/src/config/language-models-database.ts +130 -0
- package/src/config/model-registry.ts +5 -1
- package/src/config/provider-ui-config.ts +31 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chat-agent-toolkit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.214",
|
|
4
4
|
"description": "Multi-provider AI agent toolkit: generate language responses, search the web, extract content, and manage memory across 10+ LLM providers.",
|
|
5
5
|
"author": "vtempest <grokthiscontact@gmail.com>",
|
|
6
6
|
"license": "rights.institute/PROSPER",
|
|
@@ -71,11 +71,9 @@
|
|
|
71
71
|
"@types/node": "^22.0.0",
|
|
72
72
|
"@vitest/coverage-v8": "^4.0.18",
|
|
73
73
|
"@vitest/ui": "^4.0.18",
|
|
74
|
-
"next": "^16.2.10",
|
|
75
74
|
"terser": "^5.46.0",
|
|
76
75
|
"typedoc-plugin-markdown": "^4.10.0",
|
|
77
76
|
"typescript": "^5.9.3",
|
|
78
|
-
"vinext": "1.0.0-beta.0",
|
|
79
77
|
"vite": "^8.1.3",
|
|
80
78
|
"vite-plugin-dts": "^5.0.3",
|
|
81
79
|
"vite-plugin-node-polyfills": "^0.28.0",
|
|
@@ -1193,6 +1193,119 @@ export const LANGUAGE_MODELS = [
|
|
|
1193
1193
|
},
|
|
1194
1194
|
],
|
|
1195
1195
|
},
|
|
1196
|
+
{
|
|
1197
|
+
"provider": "AnyAPI",
|
|
1198
|
+
"docs": "https://docs.anyapi.ai/get-started/supported-sdks",
|
|
1199
|
+
"api_key": "https://anyapi.ai/pricing",
|
|
1200
|
+
"default": "deepseek/deepseek-v3:free",
|
|
1201
|
+
"models": [
|
|
1202
|
+
{
|
|
1203
|
+
"name": "LFM2.5 1.2B Instruct",
|
|
1204
|
+
"id": "liquidai/lfm2.5-1.2b-instruct:free",
|
|
1205
|
+
"contextLength": 32_768,
|
|
1206
|
+
"free": true,
|
|
1207
|
+
"type": "text"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"name": "LFM2.5 1.2B Thinking",
|
|
1211
|
+
"id": "liquidai/lfm2.5-1.2b-thinking:free",
|
|
1212
|
+
"contextLength": 32_768,
|
|
1213
|
+
"free": true,
|
|
1214
|
+
"type": "text"
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"name": "Trinity Large Preview",
|
|
1218
|
+
"id": "arcee-ai/trinity-large-preview:free",
|
|
1219
|
+
"contextLength": 128_000,
|
|
1220
|
+
"free": true,
|
|
1221
|
+
"type": "text"
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
"name": "Step 3.5 Flash",
|
|
1225
|
+
"id": "stepfun/step-3.5-flash:free",
|
|
1226
|
+
"contextLength": 128_000,
|
|
1227
|
+
"free": true,
|
|
1228
|
+
"type": "text"
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
"name": "Kimi K2 0711",
|
|
1232
|
+
"id": "moonshotai/kimi-k2-0711:free",
|
|
1233
|
+
"contextLength": 128_000,
|
|
1234
|
+
"free": true,
|
|
1235
|
+
"type": "text"
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"name": "Qwen 2.5 Coder 32B Instruct",
|
|
1239
|
+
"id": "qwen/qwen2.5-coder-32b-instruct:free",
|
|
1240
|
+
"contextLength": 32_768,
|
|
1241
|
+
"free": true,
|
|
1242
|
+
"type": "text"
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
"name": "Gemma 2 9B",
|
|
1246
|
+
"id": "google/gemma-2-9b:free",
|
|
1247
|
+
"contextLength": 8_192,
|
|
1248
|
+
"free": true,
|
|
1249
|
+
"type": "text"
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"name": "Gemma 3 12B",
|
|
1253
|
+
"id": "google/gemma-3-12b:free",
|
|
1254
|
+
"contextLength": 131_072,
|
|
1255
|
+
"free": true,
|
|
1256
|
+
"type": "text"
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
"name": "Gemma 3 27B",
|
|
1260
|
+
"id": "google/gemma-3-27b:free",
|
|
1261
|
+
"contextLength": 131_072,
|
|
1262
|
+
"free": true,
|
|
1263
|
+
"type": "text"
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
"name": "Gemma 3n 2B",
|
|
1267
|
+
"id": "google/gemma-3n-2b:free",
|
|
1268
|
+
"contextLength": 32_768,
|
|
1269
|
+
"free": true,
|
|
1270
|
+
"type": "text"
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
"name": "Gemma 3n 4B",
|
|
1274
|
+
"id": "google/gemma-3n-4b:free",
|
|
1275
|
+
"contextLength": 32_768,
|
|
1276
|
+
"free": true,
|
|
1277
|
+
"type": "text"
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
"name": "DeepSeek V3",
|
|
1281
|
+
"id": "deepseek/deepseek-v3:free",
|
|
1282
|
+
"contextLength": 64_000,
|
|
1283
|
+
"free": true,
|
|
1284
|
+
"type": "text"
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
"name": "DeepSeek R1 0528",
|
|
1288
|
+
"id": "deepseek/deepseek-r1-0528:free",
|
|
1289
|
+
"contextLength": 128_000,
|
|
1290
|
+
"free": true,
|
|
1291
|
+
"type": "text"
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"name": "LongCat Flash Chat",
|
|
1295
|
+
"id": "meituan/longcat-flash-chat:free",
|
|
1296
|
+
"contextLength": 128_000,
|
|
1297
|
+
"free": true,
|
|
1298
|
+
"type": "text"
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
"name": "Tongyi DeepResearch 30B A3B",
|
|
1302
|
+
"id": "alibaba/tongyi-deepresearch-30b-a3b:free",
|
|
1303
|
+
"contextLength": 128_000,
|
|
1304
|
+
"free": true,
|
|
1305
|
+
"type": "text"
|
|
1306
|
+
}
|
|
1307
|
+
]
|
|
1308
|
+
},
|
|
1196
1309
|
{
|
|
1197
1310
|
"provider": "OpenRouter",
|
|
1198
1311
|
"docs": "https://openrouter.ai/docs",
|
|
@@ -1302,6 +1415,23 @@ export const GUEST_SAFE_MODELS = {
|
|
|
1302
1415
|
"nvidia/nemotron-3-super-120b-a12b",
|
|
1303
1416
|
"meta/llama-3.1-8b-instruct",
|
|
1304
1417
|
],
|
|
1418
|
+
anyapi: [
|
|
1419
|
+
"liquidai/lfm2.5-1.2b-instruct:free",
|
|
1420
|
+
"liquidai/lfm2.5-1.2b-thinking:free",
|
|
1421
|
+
"arcee-ai/trinity-large-preview:free",
|
|
1422
|
+
"stepfun/step-3.5-flash:free",
|
|
1423
|
+
"moonshotai/kimi-k2-0711:free",
|
|
1424
|
+
"qwen/qwen2.5-coder-32b-instruct:free",
|
|
1425
|
+
"google/gemma-2-9b:free",
|
|
1426
|
+
"google/gemma-3-12b:free",
|
|
1427
|
+
"google/gemma-3-27b:free",
|
|
1428
|
+
"google/gemma-3n-2b:free",
|
|
1429
|
+
"google/gemma-3n-4b:free",
|
|
1430
|
+
"deepseek/deepseek-v3:free",
|
|
1431
|
+
"deepseek/deepseek-r1-0528:free",
|
|
1432
|
+
"meituan/longcat-flash-chat:free",
|
|
1433
|
+
"alibaba/tongyi-deepresearch-30b-a3b:free",
|
|
1434
|
+
],
|
|
1305
1435
|
openrouter: [
|
|
1306
1436
|
"openrouter/free",
|
|
1307
1437
|
"nvidia/nemotron-3-super-120b-a12b:free",
|
|
@@ -22,6 +22,7 @@ const PROVIDER_KEY_TO_DB_NAME: Record<string, string> = {
|
|
|
22
22
|
deepseek: "deepseek",
|
|
23
23
|
nvidia: "nvidia",
|
|
24
24
|
openrouter: "openrouter",
|
|
25
|
+
anyapi: "anyapi",
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
/** Default chat models for a provider type from the LANGUAGE_MODELS database. */
|
|
@@ -86,7 +87,8 @@ export default class ModelRegistry {
|
|
|
86
87
|
/**
|
|
87
88
|
* Finds a provider by id, falling back to free providers in order:
|
|
88
89
|
* OpenRouter (no daily limits, best for guests), Groq (fastest, daily limits),
|
|
89
|
-
* then NVIDIA, then the first
|
|
90
|
+
* AnyAPI (100,000 anyTokens/day free), then NVIDIA, then the first
|
|
91
|
+
* configured provider.
|
|
90
92
|
* Client-side provider ids are config hashes that go stale whenever
|
|
91
93
|
* server env config changes, so a graceful fallback keeps existing
|
|
92
94
|
* chat sessions working after a redeploy.
|
|
@@ -100,6 +102,7 @@ export default class ModelRegistry {
|
|
|
100
102
|
provider =
|
|
101
103
|
providers.find((p) => p.name.toLowerCase().includes("openrouter")) ??
|
|
102
104
|
providers.find((p) => p.name.toLowerCase().includes("groq")) ??
|
|
105
|
+
providers.find((p) => p.name.toLowerCase().includes("anyapi")) ??
|
|
103
106
|
providers.find((p) => p.name.toLowerCase().includes("nvidia")) ??
|
|
104
107
|
providers[0];
|
|
105
108
|
}
|
|
@@ -166,6 +169,7 @@ export default class ModelRegistry {
|
|
|
166
169
|
perplexity: "https://api.perplexity.ai",
|
|
167
170
|
nvidia: "https://integrate.api.nvidia.com/v1",
|
|
168
171
|
openrouter: "https://openrouter.ai/api/v1",
|
|
172
|
+
anyapi: "https://api.anyapi.ai/v1",
|
|
169
173
|
deepseek: "https://api.deepseek.com",
|
|
170
174
|
xai: "https://api.x.ai/v1",
|
|
171
175
|
};
|
|
@@ -51,6 +51,11 @@ export const getModelProvidersUIConfigSection =
|
|
|
51
51
|
name: "OpenRouter",
|
|
52
52
|
fields: getOpenRouterConfigFields(),
|
|
53
53
|
},
|
|
54
|
+
{
|
|
55
|
+
key: "anyapi",
|
|
56
|
+
name: "AnyAPI",
|
|
57
|
+
fields: getAnyAPIConfigFields(),
|
|
58
|
+
},
|
|
54
59
|
{
|
|
55
60
|
key: "perplexity",
|
|
56
61
|
name: "Perplexity",
|
|
@@ -200,6 +205,32 @@ function getOpenRouterConfigFields() {
|
|
|
200
205
|
];
|
|
201
206
|
}
|
|
202
207
|
|
|
208
|
+
function getAnyAPIConfigFields() {
|
|
209
|
+
return [
|
|
210
|
+
{
|
|
211
|
+
type: "password" as const,
|
|
212
|
+
name: "API Key",
|
|
213
|
+
key: "apiKey",
|
|
214
|
+
description: "Your AnyAPI.ai API key. Free plan includes 100,000 anyTokens/day (resets daily, no credit card) with access to free/basic models - get yours at anyapi.ai/pricing",
|
|
215
|
+
required: true,
|
|
216
|
+
placeholder: "sk-...",
|
|
217
|
+
env: "ANYAPI_API_KEY",
|
|
218
|
+
scope: "server" as const,
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
type: "string" as const,
|
|
222
|
+
name: "Base URL",
|
|
223
|
+
key: "baseURL",
|
|
224
|
+
description: "The base URL for AnyAPI's OpenAI-compatible API",
|
|
225
|
+
required: true,
|
|
226
|
+
placeholder: "https://api.anyapi.ai/v1",
|
|
227
|
+
default: "https://api.anyapi.ai/v1",
|
|
228
|
+
env: "ANYAPI_BASE_URL",
|
|
229
|
+
scope: "server" as const,
|
|
230
|
+
},
|
|
231
|
+
];
|
|
232
|
+
}
|
|
233
|
+
|
|
203
234
|
function getPerplexityConfigFields() {
|
|
204
235
|
return [
|
|
205
236
|
{
|