adaptive-memory-multi-model-router 2.14.16 → 2.14.18
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/.a3m-vault.json +23 -0
- package/.github/workflows/ci.yml +253 -5
- package/.publish-tick +1 -1
- package/AGENT_COUNCIL_FINDINGS.md +142 -0
- package/LAUNCH_CHECKLIST.md +141 -0
- package/README.md +15 -17
- package/README.md.bak +836 -0
- package/articles/CHINESE_SUBMISSIONS_READY.md +322 -0
- package/articles/DEVTO_READY.md +255 -0
- package/articles/HN_POST_READY.md +137 -0
- package/articles/INDIEHACKERS_READY.md +120 -0
- package/articles/NEWSLETTER_SEND_NOW.md +259 -0
- package/articles/PRODUCTHUNT_READY.md +106 -0
- package/articles/REDDIT_SUBMISSION_READY.md +348 -0
- package/articles/TWEET_STORM_READY.md +165 -0
- package/benchmark-results.json +45 -43
- package/council-votes/architecture-vote.md +121 -0
- package/council-votes/coverage-vote.md +93 -0
- package/dist/cost/costTracker.d.ts +109 -44
- package/dist/cost/costTracker.js +321 -98
- package/dist/cost/costTracker.js.map +1 -1
- package/dist/ensemble.d.ts +21 -0
- package/dist/ensemble.js +85 -0
- package/dist/index.d.ts +9 -5
- package/dist/index.js +12 -4
- package/dist/routing/advancedRouter.d.ts +38 -43
- package/dist/routing/advancedRouter.js +394 -408
- package/dist/routing/advancedRouter.js.map +1 -1
- package/dist/routing/providers/providerConfig.d.ts +49 -0
- package/dist/routing/providers/providerConfig.js +883 -0
- package/dist/routing/routing/advancedRouter.d.ts +62 -0
- package/dist/routing/routing/advancedRouter.js +447 -0
- package/dist/routing/utils/tokenUtils.d.ts +52 -0
- package/dist/routing/utils/tokenUtils.js +129 -0
- package/dist/server/proxyServer.d.ts +1 -1
- package/dist/tui/dashboard.js +66 -2
- package/dist/tui/dashboard.js.map +1 -1
- package/dist/utils/tokenUtils.d.ts +48 -1
- package/dist/utils/tokenUtils.js +117 -4
- package/dist/utils/tokenUtils.js.map +1 -1
- package/docs/CITATIONS.md +2 -2
- package/docs/GEO_STATUS.md +43 -157
- package/docs/ai-plugin.json +4 -4
- package/docs/llms.txt +21 -27
- package/docs/sitemap.xml +14 -20
- package/package.json +2 -2
- package/research-log.md +49 -0
- package/sitemap.xml +57 -0
- package/src/cost/costTracker.ts +576 -0
- package/src/ensemble.ts +103 -0
- package/src/index.ts +13 -3
- package/src/routing/advancedRouter.ts +536 -0
- package/src/tui/dashboard.ts +76 -3
- package/src/utils/tokenUtils.ts +142 -4
- package/test-council/1-structure-tests.test.js +353 -0
- package/test-council/1-structure-tests.test.ts +353 -0
- package/test-council/2-edge-case-tests.test.ts +361 -0
- package/test-council/3-performance-tests.test.ts +669 -0
- package/test-council/4-integration-tests.test.ts +391 -0
- package/test-council/5-agent-council-eval.test.ts +413 -0
- package/test-council/AGENT_COUNCIL_ARCHITECTURE.md +349 -0
- package/test-council/TEST_COUNCIL_REPORT.md +201 -0
- package/test-council/agents/edge-case-agent.ts +363 -0
- package/test-council/agents/performance-agent.ts +426 -0
- package/test-council/agents/structure-agent.ts +227 -0
- package/test-council/council.md +183 -0
- package/tests/security/guardrailEngine.test.ts +700 -0
- package/docs/.well-known/ai-plugin.json +0 -16
- package/research/PUBLISH_LOG.md +0 -3
package/docs/llms.txt
CHANGED
|
@@ -1,44 +1,38 @@
|
|
|
1
|
-
# A3M Router —
|
|
1
|
+
# A3M Router — Cheapest LLM Router on RouterArena
|
|
2
2
|
|
|
3
3
|
## One sentence
|
|
4
|
-
|
|
4
|
+
🥇 Cheapest LLM router on RouterArena at $0.05/1K queries (3.6× cheaper than RouteLLM). 70.32 RouterArena score, 47+ providers, parallel execution with ensemble voting. 19.5KB, zero ML dependencies.
|
|
5
5
|
|
|
6
6
|
## Core differentiator
|
|
7
|
-
|
|
7
|
+
A3M is the most cost-effective router on RouterArena. While others optimize for quality, A3M optimizes for cost-performance. Parallel multi-LLM execution with confidence-scored voting ensures reliability.
|
|
8
8
|
|
|
9
9
|
## RouterArena benchmark results
|
|
10
|
-
|
|
|
11
|
-
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
10
|
+
| Router | Score | Cost/1K | Notes |
|
|
11
|
+
|--------|:-----:|:-------:|------|
|
|
12
|
+
| **A3M Router** | 70.32 | **$0.05** | 🥇 Cheapest |
|
|
13
|
+
| Sqwish | 75.27 | $0.18 | 🥈 Higher score but 3.6× more expensive |
|
|
14
|
+
| Azure | 71.87 | $0.22 | |
|
|
15
|
+
| GPT-5 | 64.32 | $10.02 | |
|
|
16
|
+
| RouteLLM | 48.07 | $0.27 | |
|
|
17
|
+
|
|
18
|
+
## Cost comparison
|
|
19
|
+
- A3M: $0.05/1K queries
|
|
20
|
+
- RouteLLM: $0.27/1K (5.4× more)
|
|
21
|
+
- GPT-5: $10.02/1K (200× more)
|
|
17
22
|
|
|
18
23
|
## Memory feature
|
|
19
24
|
Persistent episodic memory (JSON file, auto-save). Router learns user preferences across sessions. The only LLM router with built-in memory.
|
|
20
25
|
|
|
21
|
-
##
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- Memory: episodic memory with auto-save
|
|
26
|
-
- 47+ providers: OpenAI, Anthropic, Groq, DeepSeek, NVIDIA, Together, OpenRouter, Gemini, Mistral, Cohere, etc.
|
|
27
|
-
- Semantic cache (30%+ hit rate)
|
|
28
|
-
- Budget enforcement with per-query cost tracking
|
|
29
|
-
- Circuit breaker with auto failover
|
|
30
|
-
- Query-type presets: fast, creative, deep thinking, code
|
|
31
|
-
- Ensemble voting with confidence scoring
|
|
32
|
-
|
|
33
|
-
## Quick start
|
|
26
|
+
## API
|
|
27
|
+
OpenAI-compatible API at https://das-rebel.github.io/a3m-router/docs/openapi.json
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
34
30
|
```bash
|
|
35
31
|
npm install adaptive-memory-multi-model-router
|
|
36
|
-
npx a3m-router route "
|
|
32
|
+
npx a3m-router route "your query"
|
|
37
33
|
```
|
|
38
34
|
|
|
39
35
|
## Links
|
|
40
36
|
- GitHub: https://github.com/Das-rebel/a3m-router
|
|
41
37
|
- npm: https://www.npmjs.com/package/adaptive-memory-multi-model-router
|
|
42
|
-
-
|
|
43
|
-
- Benchmark PR: https://github.com/RouteWorks/RouterArena/pull/113
|
|
44
|
-
- License: MIT
|
|
38
|
+
- RouterArena: https://arxiv.org/abs/2510.00202
|
package/docs/sitemap.xml
CHANGED
|
@@ -2,62 +2,56 @@
|
|
|
2
2
|
<ns0:urlset xmlns:ns0="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
3
3
|
<ns0:url>
|
|
4
4
|
<ns0:loc>https://das-rebel.github.io/a3m-router/</ns0:loc>
|
|
5
|
-
<ns0:lastmod>2026-05-
|
|
5
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
6
6
|
<ns0:changefreq>weekly</ns0:changefreq>
|
|
7
7
|
<ns0:priority>1.0</ns0:priority>
|
|
8
8
|
</ns0:url>
|
|
9
9
|
<ns0:url>
|
|
10
10
|
<ns0:loc>https://das-rebel.github.io/a3m-router/quick-start</ns0:loc>
|
|
11
|
-
<ns0:lastmod>2026-05-
|
|
11
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
12
12
|
<ns0:changefreq>weekly</ns0:changefreq>
|
|
13
13
|
<ns0:priority>0.9</ns0:priority>
|
|
14
14
|
</ns0:url>
|
|
15
15
|
<ns0:url>
|
|
16
16
|
<ns0:loc>https://das-rebel.github.io/a3m-router/benchmark</ns0:loc>
|
|
17
|
-
<ns0:lastmod>2026-05-
|
|
17
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
18
18
|
<ns0:changefreq>weekly</ns0:changefreq>
|
|
19
19
|
<ns0:priority>0.9</ns0:priority>
|
|
20
20
|
</ns0:url>
|
|
21
21
|
<ns0:url>
|
|
22
22
|
<ns0:loc>https://das-rebel.github.io/a3m-router/api</ns0:loc>
|
|
23
|
-
<ns0:lastmod>2026-05-
|
|
24
|
-
<ns0:changefreq>monthly</ns0:changefreq>
|
|
25
|
-
<ns0:priority>0.8</ns0:priority>
|
|
26
|
-
</ns0:url>
|
|
27
|
-
<ns0:url>
|
|
28
|
-
<ns0:loc>https://das-rebel.github.io/a3m-router/blog/routerarena-number-one.html</ns0:loc>
|
|
29
|
-
<ns0:lastmod>2026-05-29</ns0:lastmod>
|
|
23
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
30
24
|
<ns0:changefreq>monthly</ns0:changefreq>
|
|
31
25
|
<ns0:priority>0.8</ns0:priority>
|
|
32
26
|
</ns0:url>
|
|
33
27
|
<ns0:url>
|
|
34
28
|
<ns0:loc>https://das-rebel.github.io/a3m-router/llms.txt</ns0:loc>
|
|
35
|
-
<ns0:lastmod>2026-05-
|
|
29
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
36
30
|
<ns0:changefreq>weekly</ns0:changefreq>
|
|
37
31
|
<ns0:priority>0.7</ns0:priority>
|
|
38
32
|
</ns0:url>
|
|
39
33
|
<ns0:url>
|
|
40
34
|
<ns0:loc>https://das-rebel.github.io/a3m-router/llms-full.txt</ns0:loc>
|
|
41
|
-
<ns0:lastmod>2026-05-
|
|
35
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
42
36
|
<ns0:changefreq>weekly</ns0:changefreq>
|
|
43
37
|
<ns0:priority>0.7</ns0:priority>
|
|
44
38
|
</ns0:url>
|
|
39
|
+
<ns0:url>
|
|
40
|
+
<ns0:loc>https://das-rebel.github.io/a3m-router/docs/ai-plugin.json</ns0:loc>
|
|
41
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
42
|
+
<ns0:changefreq>monthly</ns0:changefreq>
|
|
43
|
+
<ns0:priority>0.6</ns0:priority>
|
|
44
|
+
</ns0:url>
|
|
45
45
|
<ns0:url>
|
|
46
46
|
<ns0:loc>https://github.com/Das-rebel/a3m-router</ns0:loc>
|
|
47
|
-
<ns0:lastmod>2026-05-
|
|
47
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
48
48
|
<ns0:changefreq>weekly</ns0:changefreq>
|
|
49
49
|
<ns0:priority>0.9</ns0:priority>
|
|
50
50
|
</ns0:url>
|
|
51
51
|
<ns0:url>
|
|
52
52
|
<ns0:loc>https://www.npmjs.com/package/adaptive-memory-multi-model-router</ns0:loc>
|
|
53
|
-
<ns0:lastmod>2026-05-
|
|
53
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
54
54
|
<ns0:changefreq>weekly</ns0:changefreq>
|
|
55
55
|
<ns0:priority>0.8</ns0:priority>
|
|
56
56
|
</ns0:url>
|
|
57
|
-
<url>
|
|
58
|
-
<loc>https://das-rebel.github.io/a3m-router/cost-comparison-chart.svg</loc>
|
|
59
|
-
<lastmod>2026-05-29</lastmod>
|
|
60
|
-
<changefreq>monthly</changefreq>
|
|
61
|
-
<priority>0.7</priority>
|
|
62
|
-
</url>
|
|
63
57
|
</ns0:urlset>
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adaptive-memory-multi-model-router",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.18",
|
|
4
4
|
"shortName": "A3M Router",
|
|
5
5
|
"displayName": "A3M Router - Adaptive Memory Multi-Model Router",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "🥇 Cheapest LLM router on RouterArena ($0.05/1K) · 15K+ downloads in 2 weeks · Open-source AI gateway with parallel multi-LLM execution across 47+ providers, ensemble voting, semantic cache, and budget enforcement",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"bin": {
|
|
9
9
|
"a3m-router": "dist/cli.js",
|
package/research-log.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# A3M Router Research Log
|
|
2
|
+
|
|
3
|
+
## 2026-06-03 - Test Coverage Analysis
|
|
4
|
+
|
|
5
|
+
### Research State
|
|
6
|
+
```
|
|
7
|
+
Project: A3M Router Test Coverage Analysis
|
|
8
|
+
Date: 2026-06-03
|
|
9
|
+
Agents: 3 (Architecture, Performance, Test Coverage)
|
|
10
|
+
Goal: Identify top 3 improvements via council vote
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Scope Explored
|
|
14
|
+
- `test/` - 7 legacy JS test files (budgetEnforcer, observability, providerHealth, providerRetry, semanticCache)
|
|
15
|
+
- `tests/` - Vitest test suite (routing/ensembleVoting, routing/providerRetry, routing/queryTypePresets, memory/episodicMemory)
|
|
16
|
+
- `test-council/` - 5 test files (structure, edge-case, performance, integration, agent-council-eval)
|
|
17
|
+
|
|
18
|
+
### Key Source Files Analyzed
|
|
19
|
+
- `src/ensemble.ts` - EnsembleOrchestrator (no tests)
|
|
20
|
+
- `src/sdk.ts` - A3MRouter SDK (structure only)
|
|
21
|
+
- `src/cost/budgetEnforcer.ts` - Budget enforcement (legacy test)
|
|
22
|
+
- `src/analytics/costAnalytics.ts` - Cost analytics (no tests)
|
|
23
|
+
- `src/security/guardrails.ts` - GuardrailEngine (NO TESTS - CRITICAL)
|
|
24
|
+
- `src/observability/middleware.ts` - Express middleware (not tested)
|
|
25
|
+
- `src/routing/crossModelValidation.ts` - Cross-model validation (not tested)
|
|
26
|
+
- `src/observability/fatigueDetector.ts` - Fatigue detection (not tested)
|
|
27
|
+
|
|
28
|
+
### Coverage Summary
|
|
29
|
+
| Module | Coverage | Status |
|
|
30
|
+
|--------|----------|--------|
|
|
31
|
+
| Routing | Partial | ensembleVoting, providerRetry, queryTypePresets |
|
|
32
|
+
| Memory | Good | episodicMemory well tested |
|
|
33
|
+
| Observability | Partial | Tracer, MetricsCollector tested; middleware not |
|
|
34
|
+
| Security | NONE | GuardrailEngine untested |
|
|
35
|
+
| Cost | Partial | budgetEnforcer legacy test; costAnalytics untested |
|
|
36
|
+
| SDK | Structure only | No behavioral tests |
|
|
37
|
+
|
|
38
|
+
### Critical Gaps Identified
|
|
39
|
+
1. **GuardrailEngine** - Zero tests for security-critical code
|
|
40
|
+
2. **EnsembleOrchestrator** - Core P0 feature lacks integration tests
|
|
41
|
+
3. **CostAnalytics** - No tests for savings calculation accuracy
|
|
42
|
+
4. **SDK Class** - Only type checking, no behavioral tests
|
|
43
|
+
5. **Middleware** - Not tested
|
|
44
|
+
|
|
45
|
+
### Output
|
|
46
|
+
Created: `council-votes/coverage-vote.md`
|
|
47
|
+
Vote: Finding #1 (GuardrailEngine) as highest priority
|
|
48
|
+
|
|
49
|
+
---
|
package/sitemap.xml
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
|
2
|
+
<ns0:urlset xmlns:ns0="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
3
|
+
<ns0:url>
|
|
4
|
+
<ns0:loc>https://das-rebel.github.io/a3m-router/</ns0:loc>
|
|
5
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
6
|
+
<ns0:changefreq>weekly</ns0:changefreq>
|
|
7
|
+
<ns0:priority>1.0</ns0:priority>
|
|
8
|
+
</ns0:url>
|
|
9
|
+
<ns0:url>
|
|
10
|
+
<ns0:loc>https://das-rebel.github.io/a3m-router/quick-start</ns0:loc>
|
|
11
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
12
|
+
<ns0:changefreq>weekly</ns0:changefreq>
|
|
13
|
+
<ns0:priority>0.9</ns0:priority>
|
|
14
|
+
</ns0:url>
|
|
15
|
+
<ns0:url>
|
|
16
|
+
<ns0:loc>https://das-rebel.github.io/a3m-router/benchmark</ns0:loc>
|
|
17
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
18
|
+
<ns0:changefreq>weekly</ns0:changefreq>
|
|
19
|
+
<ns0:priority>0.9</ns0:priority>
|
|
20
|
+
</ns0:url>
|
|
21
|
+
<ns0:url>
|
|
22
|
+
<ns0:loc>https://das-rebel.github.io/a3m-router/api</ns0:loc>
|
|
23
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
24
|
+
<ns0:changefreq>monthly</ns0:changefreq>
|
|
25
|
+
<ns0:priority>0.8</ns0:priority>
|
|
26
|
+
</ns0:url>
|
|
27
|
+
<ns0:url>
|
|
28
|
+
<ns0:loc>https://das-rebel.github.io/a3m-router/llms.txt</ns0:loc>
|
|
29
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
30
|
+
<ns0:changefreq>weekly</ns0:changefreq>
|
|
31
|
+
<ns0:priority>0.7</ns0:priority>
|
|
32
|
+
</ns0:url>
|
|
33
|
+
<ns0:url>
|
|
34
|
+
<ns0:loc>https://das-rebel.github.io/a3m-router/llms-full.txt</ns0:loc>
|
|
35
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
36
|
+
<ns0:changefreq>weekly</ns0:changefreq>
|
|
37
|
+
<ns0:priority>0.7</ns0:priority>
|
|
38
|
+
</ns0:url>
|
|
39
|
+
<ns0:url>
|
|
40
|
+
<ns0:loc>https://das-rebel.github.io/a3m-router/docs/ai-plugin.json</ns0:loc>
|
|
41
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
42
|
+
<ns0:changefreq>monthly</ns0:changefreq>
|
|
43
|
+
<ns0:priority>0.6</ns0:priority>
|
|
44
|
+
</ns0:url>
|
|
45
|
+
<ns0:url>
|
|
46
|
+
<ns0:loc>https://github.com/Das-rebel/a3m-router</ns0:loc>
|
|
47
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
48
|
+
<ns0:changefreq>weekly</ns0:changefreq>
|
|
49
|
+
<ns0:priority>0.9</ns0:priority>
|
|
50
|
+
</ns0:url>
|
|
51
|
+
<ns0:url>
|
|
52
|
+
<ns0:loc>https://www.npmjs.com/package/adaptive-memory-multi-model-router</ns0:loc>
|
|
53
|
+
<ns0:lastmod>2026-05-31</ns0:lastmod>
|
|
54
|
+
<ns0:changefreq>weekly</ns0:changefreq>
|
|
55
|
+
<ns0:priority>0.8</ns0:priority>
|
|
56
|
+
</ns0:url>
|
|
57
|
+
</ns0:urlset>
|