adaptive-memory-multi-model-router 2.2.6 → 2.2.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 (51) hide show
  1. package/README.md +146 -105
  2. package/assets/benchmark-results.png +0 -0
  3. package/assets/complexity-scoring-v2.png +0 -0
  4. package/assets/complexity-scoring.png +0 -0
  5. package/assets/cost-comparison-chart.png +0 -0
  6. package/assets/cost-comparison-v2.png +0 -0
  7. package/assets/feature-comparison-v2.png +0 -0
  8. package/assets/feature-comparison-v3.png +0 -0
  9. package/assets/provider-health-chart.png +0 -0
  10. package/assets/provider-health-v2.png +0 -0
  11. package/assets/routing-flow-v2.png +0 -0
  12. package/assets/routing-flow-v3.png +0 -0
  13. package/assets/routing-flow.png +0 -0
  14. package/assets/tier-distribution.png +0 -0
  15. package/benchmark-results.json +620 -46
  16. package/dist/analytics/costAnalytics.d.ts +0 -1
  17. package/dist/cache/semanticCache.d.ts +0 -41
  18. package/dist/cache/semanticCache.d.ts.map +1 -1
  19. package/dist/cache/semanticCache.js +0 -142
  20. package/dist/cache/semanticCache.js.map +1 -1
  21. package/dist/cli.js +478 -35
  22. package/dist/cost/costTracker.js +3 -0
  23. package/dist/index.d.ts +0 -16
  24. package/dist/index.js +64 -264
  25. package/dist/integrations/langchainAdapter.d.ts +0 -1
  26. package/dist/integrations/oauth.d.ts +0 -1
  27. package/dist/memory/autoFetch.d.ts +0 -1
  28. package/dist/memory/memoryTree.d.ts +0 -1
  29. package/dist/memory/obsidianVault.d.ts +0 -1
  30. package/dist/providers/providerConfig.d.ts +0 -1
  31. package/dist/providers/providerConfig.js +0 -2
  32. package/dist/providers/registry.js +128 -126
  33. package/dist/routing/advancedRouter.js +427 -310
  34. package/dist/sdk.js +100 -109
  35. package/dist/security/guardrails.d.ts +0 -1
  36. package/dist/server/dashboard.d.ts +0 -1
  37. package/dist/server/modelMapper.d.ts +0 -1
  38. package/dist/server/proxyServer.d.ts +0 -1
  39. package/package.json +96 -389
  40. package/scripts/run-mmlu-benchmark.js +176 -0
  41. package/scripts/run-provider-benchmark.js +244 -0
  42. package/src/cache/semanticCache.ts +0 -148
  43. package/src/index.ts +99 -0
  44. package/test/provider-test.js +70 -91
  45. package/test.js +41 -67
  46. package/tsconfig.json +5 -15
  47. package/dist/index.d.ts.map +0 -1
  48. package/dist/index.js.map +0 -1
  49. package/dist/sdk.d.ts.map +0 -1
  50. package/dist/sdk.js.map +0 -1
  51. package/test.js.bak +0 -376
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adaptive-memory-multi-model-router",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "shortName": "A3M Router",
5
5
  "displayName": "A3M Router - Adaptive Memory Multi-Model Router",
6
6
  "description": "LLM router & AI gateway with 99.5% routing accuracy — supports 47 providers including DeepSeek, Kimi (Moonshot), Qwen, Zhipu GLM, Yi, Baichuan, MiniMax, StepFun. Zero ML, 19.5KB. Multi-signal routing, semantic cache, guardrails, cost analytics. MIT. TypeScript SDK + Python SDK + OpenAI proxy.",
@@ -53,409 +53,118 @@
53
53
  }
54
54
  },
55
55
  "keywords": [
56
- "adaptive-router",
57
- "agent",
58
- "agent-framework",
59
- "ai-agent-tools",
60
- "ai-assistant",
61
- "ai-discoverability",
62
- "ai-routing",
63
- "airtable",
64
- "amplitude",
65
- "api-gateway",
66
- "asana",
67
- "automation",
68
- "autonomous-agents",
69
- "aws-bedrock",
70
- "batch-processing",
71
- "bitbucket",
72
- "circuit-breaker",
73
- "claude-code",
74
- "cli",
75
- "cloud",
76
- "code-generation",
77
- "cohere",
78
- "content-filtering",
79
- "copilot",
80
- "cost-analytics",
81
- "datadog",
82
- "deepinfra",
83
- "developer-experience",
84
- "developer-tools",
85
- "devops",
86
- "discord",
87
- "dropbox",
88
- "dx",
89
- "edge-computing",
90
- "embedding",
91
- "enterprise",
92
- "fallback",
93
- "fine-tuning",
94
- "fireworks",
95
- "gemini",
96
- "generative-engine-optimization",
97
- "geo",
98
- "github",
99
- "gitlab",
100
- "gmail",
101
- "google",
102
- "google-calendar",
103
- "gpt-4",
104
- "graphql",
105
- "high-availability",
106
- "hubspot",
107
- "huggingface",
108
- "inference",
109
- "input-validation",
110
- "intent-mapping",
111
- "intercom",
112
- "javascript",
113
- "jira",
114
- "latency-optimization",
115
- "linear",
116
- "llamaindex",
117
- "llm-intent",
118
- "llm-tools",
119
- "llmlingua",
120
- "load-balancing",
121
- "logging",
122
- "machine-learning",
123
- "mailchimp",
124
- "mcp",
125
- "medusa",
126
- "memory-tree",
127
- "middleware",
128
- "mixpanel",
129
- "monitoring",
130
- "multi-model",
131
- "natural-language-processing",
132
- "netlify",
133
- "nodejs",
134
- "notion",
135
- "npm",
136
- "observability",
137
- "open-source",
138
- "orchestration",
139
- "parallel-execution",
140
- "performance",
141
- "perplexity",
142
- "pii-detection",
143
- "pinecone",
144
- "posthog",
145
- "prefix-caching",
146
- "production",
147
- "prompt-engineering",
148
- "prompt-injection",
149
- "provider-registry",
150
- "proxy",
151
- "proxy-server",
152
- "python",
153
- "radix-attention",
154
- "rag",
155
- "rate-limiting",
156
- "real-time",
157
- "rest-api",
158
- "retrieval-augmented-generation",
159
- "retry",
160
- "route-quality",
161
- "routellm",
162
- "router",
163
- "s3",
164
- "salesforce",
165
- "sanitization",
166
- "scalability",
167
- "sdk",
168
- "security",
169
- "segment",
170
- "sendgrid",
171
- "sentry",
172
- "serverless",
173
- "shopify",
174
- "slack",
175
- "speculative-decoding",
176
- "streaming",
177
- "stripe",
178
- "telegram",
179
- "testing",
180
- "together-ai",
181
- "token-compression",
182
- "tools",
183
- "tracing",
184
- "transformer",
185
- "trello",
186
- "typescript",
187
- "vector-database",
188
- "vercel",
189
- "websocket",
190
- "xai",
191
- "zendesk",
192
- "llm-proxy",
56
+ "ai-guardrails",
57
+ "moonshot",
58
+ "adaptive-routing",
59
+ "llm-manager",
193
60
  "claude",
194
- "ai",
195
- "openai-compatible",
196
- "no-gpu",
197
- "openai",
198
- "routing-accuracy",
199
- "minimax",
200
- "portkey-alternative",
201
- "中文llm",
202
- "provider-fallback",
203
- "nlp",
204
- "ollama",
205
- "cerebras",
206
- "openai-sdk",
61
+ "guardrails",
207
62
  "ai-sdk",
63
+ "qwen",
64
+ "groq",
65
+ "high-availability",
208
66
  "openai-proxy",
209
- "cerebras-proxy",
210
- "深度求索",
211
- "anthropic",
212
- "ai-cost-optimization",
67
+ "multi-provider",
213
68
  "model-router",
214
- "model-routing",
215
- "chinese-ai",
216
- "vercel-ai",
217
- "ai-load-balancer",
218
- "deepseek",
69
+ "rate-limiter",
219
70
  "llm-routing",
71
+ "semantic-routing",
72
+ "circuit-breaker",
73
+ "openrouter",
74
+ "litellm-alternative",
75
+ "zhipu",
76
+ "llm-management",
77
+ "ai-agent",
78
+ "vercel-ai",
79
+ "deepseek-proxy",
80
+ "groq-proxy",
220
81
  "mistral",
221
- "ollama-proxy",
222
- "moonshot",
223
- "stepfun",
82
+ "llm-gateway",
83
+ "cost-based-routing",
84
+ "ollama",
224
85
  "cost-optimization",
225
- "keyword-routing",
226
- "zhipu",
227
- "llm-manager",
228
- "ai-router",
229
- "multi-provider",
230
- "yi-llm",
231
- "chinese-llm",
232
- "glms",
233
- "llm",
86
+ "chatgpt",
87
+ "nlp",
88
+ "smart-llm-router",
89
+ "openai-sdk",
90
+ "distributed-llm",
91
+ "llm-proxy",
92
+ "chatbot",
93
+ "ai-cost-optimization",
94
+ "stepfun",
95
+ "reverse-proxy",
96
+ "llm-orchestration",
97
+ "llm-caching",
98
+ "intelligent-load-balancer",
234
99
  "llm-load-balancer",
235
- "language-model",
100
+ "ai-gateway",
101
+ "helicone",
102
+ "failover",
103
+ "ai",
104
+ "intent-routing",
105
+ "api-gateway",
106
+ "retry-proxy",
107
+ "glms",
236
108
  "claude-proxy",
109
+ "content-routing",
110
+ "chinese-llm",
237
111
  "lightweight",
238
- "chatgpt",
239
- "smart-routing",
240
- "阿里qwen",
112
+ "dynamic-routing",
113
+ "provider-selector",
114
+ "ai-orchestration",
115
+ "provider-fallback",
241
116
  "zh-llm",
117
+ "load-balancer",
118
+ "request-routing",
119
+ "model-routing",
120
+ "anthropic",
121
+ "阿里qwen",
122
+ "multi-llm",
123
+ "深度求索",
124
+ "intelligent-router",
125
+ "domain-routing",
242
126
  "中文ai",
127
+ "aleph-alpha",
128
+ "llm-router",
129
+ "minimax",
243
130
  "benchmark",
244
- "helicone",
245
- "mistral-proxy",
246
- "llm-orchestration",
247
- "openrouter",
248
- "kimi",
249
- "moonshot-kimi",
250
- "guardrails",
251
- "ai-agent",
131
+ "cerebras",
132
+ "keyword-routing",
133
+ "traffic-routing",
134
+ "中文llm",
135
+ "ai-proxy",
136
+ "llm-cluster",
252
137
  "baichuan",
253
- "routellm-alternative",
138
+ "portkey-alternative",
139
+ "openai",
140
+ "language-model",
141
+ "ai-router",
142
+ "yi-llm",
254
143
  "anthropic-proxy",
255
- "token-counter",
256
- "deepseek-proxy",
257
- "llm-gateway",
258
- "multi-llm",
259
- "ai-gateway",
260
- "groq",
261
- "litellm-alternative",
262
- "ai-proxy",
263
- "llm-router",
264
- "domain-routing",
265
- "groq-proxy",
266
- "qwen",
144
+ "query-routing",
267
145
  "gpt",
146
+ "chinese-ai",
147
+ "moonshot-kimi",
148
+ "routing-accuracy",
149
+ "cerebras-proxy",
268
150
  "openai-api",
269
- "query-routing",
270
- "aleph-alpha",
271
- "semantic-cache",
151
+ "kimi",
152
+ "model-selection",
153
+ "no-gpu",
154
+ "ai-load-balancer",
155
+ "routellm-alternative",
156
+ "token-counter",
157
+ "smart-routing",
158
+ "model-management",
159
+ "deepseek",
160
+ "task-routing",
161
+ "ollama-proxy",
272
162
  "langchain",
273
- "ai-guardrails",
274
- "chatbot",
275
- "a3m",
276
- "a3m-router",
277
- "adaptive",
278
- "memory-based",
279
- "multi-model-router",
280
- "memory-based-router",
281
- "treequest",
282
- "parallel-ai",
283
- "agent-orchestration",
284
- "multi-agent",
285
- "parallel",
286
- "cost-tracking",
287
- "cache",
288
- "caching",
289
- "exponential-backoff",
290
- "mcts",
291
- "monte-carlo-tree-search",
292
- "workflow-optimization",
293
- "hierarchical-planning",
294
- "halo",
295
- "episodic-memory",
296
- "semantic-memory",
297
- "agent-memory",
298
- "python-bindings",
299
- "pypi",
300
- "autogen",
301
- "crewai",
302
- "transformers",
303
- "agent-codegen",
304
- "ai-coding",
305
- "zai",
306
- "llama",
307
- "ai-agents",
308
- "memory-based-llm-router",
309
- "multi-llm-router",
310
- "llm-memory-router",
311
- "adaptive-llm-router",
312
- "intelligent-router",
313
- "intelligent-llm-router",
314
- "learning-router",
315
- "contextual-router",
316
- "context-aware-router",
317
- "task-aware-router",
318
- "memory-augmented",
319
- "memory-augmented-llm",
320
- "episodic-memory-router",
321
- "semantic-memory-router",
322
- "task-memory",
323
- "cross-context-memory",
324
- "context-compression",
325
- "ison-format",
326
- "message-truncation",
327
- "context-management",
328
- "local-llm",
329
- "lmstudio",
330
- "local-model",
331
- "privacy-llm",
332
- "priority-queue",
333
- "token-counting",
334
- "cost-estimation",
335
- "cost-prediction",
336
- "intelligent-failover",
337
- "kv-cache",
338
- "pagedattention",
339
- "kv-cache-quantization",
340
- "streamingllm",
341
- "multimodel-orchestration",
342
- "multi-agent-debate",
343
- "self-consistency",
344
- "tensor-parallelism",
345
- "continuous-batching",
346
- "arxiv",
347
- "research-backed",
348
- "icml",
349
- "neurips",
350
- "iclr",
351
- "pi-extension",
352
- "pi",
353
- "pi-package",
354
- "pi-coding-agent",
355
- "pi-agent",
356
- "agent-discoverable",
357
- "ai-native",
358
- "01-ai",
359
- "01ai",
360
- "128k上下文",
361
- "ai-gateway-cn",
362
- "ai路由",
363
- "aliyun",
364
- "baichuan-ai",
365
- "baichuan2",
366
- "baichuan2-flash",
367
- "baiducloud",
368
- "chinese-ai-proxy",
369
- "chinese-api-gateway",
370
- "chinese-chatgpt",
371
- "chinese-language-model",
372
- "chinese-llm-proxy",
373
- "chinese-models",
374
- "chinese-nlp",
375
- "chinesellm",
376
- "chinesellm-routing",
377
- "deepseek-ai",
378
- "deepseek-api",
379
- "deepseek-chat",
380
- "deepseek-coder",
381
- "deepseek-reasoner",
382
- "embedding-model",
383
- "glm-4",
384
- "glm-4-air",
385
- "glm-4-flash",
386
- "glm-4-long",
387
- "glm-4-plus",
388
- "huawei-cloud",
389
- "langchain-cn",
390
- "lingyi",
391
- "lingyi-wanwu",
392
- "llamaindex-cn",
393
- "llm-gateway-cn",
394
- "long-context-model",
395
- "minimax-ai",
396
- "minimax-api",
397
- "minimax-chat",
398
- "minimax-turbo",
399
- "moonshot-ai",
400
- "moonshot-v1",
401
- "moonshot-v1-128k",
402
- "moonshot-v1-32k",
403
- "moonshot-v1-8k",
404
- "multimodal",
405
- "qianwen",
406
- "qwen-long",
407
- "qwen-max",
408
- "qwen-plus",
409
- "qwen-turbo",
410
- "qwen2",
411
- "qwen3",
412
- "step-1",
413
- "step-1v",
414
- "step-2",
415
- "tencentcloud",
416
- "tongji",
417
- "tongyi",
418
- "tongyi-qianwen",
419
- "vision-model",
420
- "volcengine",
421
- "wu-yuan",
422
- "wuyuan",
423
- "yi-ai",
424
- "yi-large",
425
- "yi-lightning",
426
- "yi-medium",
427
- "zai-glm",
428
- "zai-glm-4",
429
- "zhipu-ai",
430
- "中国ai",
431
- "中国大模型",
432
- "中文chatgpt",
433
- "中文embedding",
434
- "中文langchain",
435
- "中文llamaindex",
436
- "中文nlp",
437
- "中文seo",
438
- "中文多模态",
439
- "中文大模型",
440
- "中文搜索引擎优化",
441
- "中文模型",
442
- "华为云",
443
- "向量化",
444
- "国产ai",
445
- "国产大模型",
446
- "多模型路由",
447
- "多模态",
448
- "大模型路由",
449
- "字节ai",
450
- "智能路由",
451
- "火山引擎",
452
- "百度ai",
453
- "百度云",
454
- "腾讯ai",
455
- "腾讯云",
456
- "长上下文",
457
- "阿里ai",
458
- "阿里云"
163
+ "llm-failover",
164
+ "mistral-proxy",
165
+ "openai-compatible",
166
+ "semantic-cache",
167
+ "llm"
459
168
  ],
460
169
  "author": "Das-rebel <subho@example.com>",
461
170
  "license": "MIT",
@@ -471,8 +180,7 @@
471
180
  "test": "node test.js && node test/provider-test.js",
472
181
  "test:providers": "node test/provider-test.js",
473
182
  "benchmark": "node test/benchmark.js",
474
- "benchmark:verbose": "node test/benchmark.js --verbose",
475
- "build": "tsc"
183
+ "benchmark:verbose": "node test/benchmark.js --verbose"
476
184
  },
477
185
  "engines": {
478
186
  "node": ">=18.0.0"
@@ -490,7 +198,6 @@
490
198
  },
491
199
  "devDependencies": {
492
200
  "@types/node": "^25.8.0",
493
- "tsx": "^4.22.3",
494
201
  "typescript": "^6.0.3"
495
202
  }
496
203
  }