adaptive-memory-multi-model-router 2.14.55 → 2.14.56
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/README.md +27 -19
- package/assets/chart-cost-v2.svg +5 -5
- package/assets/chart-cost-v3.svg +6 -6
- package/assets/chart-features-v2.svg +2 -2
- package/assets/chart-features-v3.svg +2 -2
- package/assets/cost-simple.svg +2 -2
- package/assets/social-preview-new.svg +2 -2
- package/assets/social-v2.svg +2 -2
- package/assets/social-v3.svg +2 -2
- package/docs/GEO_OPTIMIZATION.md +1 -1
- package/docs/QUICK_START.md +4 -2
- package/docs/ROUTING_RUBRIC.md +4 -4
- package/docs/USE_CASES.md +1 -1
- package/docs/benchmark.html +4 -4
- package/docs/comparison.md +1 -1
- package/docs/demo.html +9 -9
- package/docs/index.html +34 -31
- package/hf-space/app.py +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -80,8 +80,8 @@ Terminal overlay box with `/route`, `/cost`, `/health`, `/models`, `/model <prov
|
|
|
80
80
|
║ ║
|
|
81
81
|
║ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ ║
|
|
82
82
|
║ │ Guardrails │ ──▶ │ Cache │ ──▶ │ Router │ ║
|
|
83
|
-
║ │ 🔒
|
|
84
|
-
║ │ Injection │ │ Hit │ │
|
|
83
|
+
║ │ 🔒 Prompt │ │ 💾 30%+ │ │ 🏆 No. 1 │ ║
|
|
84
|
+
║ │ Injection │ │ Hit │ │ Accuracy/Cost │ ║
|
|
85
85
|
║ │ PII Detect │ │ Semantic │ │ 12 Signals │ ║
|
|
86
86
|
║ └─────────────┘ └─────────────┘ └────────┬────────┘ ║
|
|
87
87
|
║ │ ║
|
|
@@ -89,10 +89,10 @@ Terminal overlay box with `/route`, `/cost`, `/health`, `/models`, `/model <prov
|
|
|
89
89
|
║ │ │ │ ║
|
|
90
90
|
║ ▼ ▼ ▼ ║
|
|
91
91
|
║ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐║
|
|
92
|
-
║ │ MemoryTree │ │ CostTrack │ │
|
|
93
|
-
║ │ 🧠 │ │ 💰 │ │
|
|
94
|
-
║ │ EMA │ │ Budget │ │
|
|
95
|
-
║ │ Learning │ │ Alerts │ │
|
|
92
|
+
║ │ MemoryTree │ │ CostTrack │ │ Robustness │║
|
|
93
|
+
║ │ 🧠 │ │ 💰 │ │ 1.0000 ✅ │║
|
|
94
|
+
║ │ EMA │ │ Budget │ │ 0 Abnormal │║
|
|
95
|
+
║ │ Learning │ │ Alerts │ │ 8,400 Query │║
|
|
96
96
|
║ └─────────────┘ └─────────────┘ └─────────────┘║
|
|
97
97
|
║ ║
|
|
98
98
|
║ 47+ Providers: Groq · DeepSeek · Kimi · Qwen · Zhipu · Yi · + ║
|
|
@@ -185,7 +185,7 @@ Cost breakdown across 200 real API calls:
|
|
|
185
185
|
GPT-4o only: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $0.25 ████████████████
|
|
186
186
|
A3M Router: $$$$ $0.10 ██████
|
|
187
187
|
────────────────────────────────────────────────
|
|
188
|
-
You save: $0.15 (
|
|
188
|
+
You save: $0.15 (benchmark workload)
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
### Third-Party Validation
|
|
@@ -592,7 +592,7 @@ const decision = routeQuery("Write a Python function to sort an array");
|
|
|
592
592
|
|
|
593
593
|
|
|
594
594
|
|
|
595
|
-
### Cost
|
|
595
|
+
### Cost Efficiency by Query Type
|
|
596
596
|
|
|
597
597
|
| Query Type | % Traffic | GPT-4o Only | A3M Routes To | A3M Cost | Savings |
|
|
598
598
|
|------------|:---------:|:-----------:|:-------------:|:--------:|:-------:|
|
|
@@ -1171,17 +1171,25 @@ A3M Router is built on findings from **30+ 2024-2025 arXiv papers** on LLM routi
|
|
|
1171
1171
|
|
|
1172
1172
|
### Key Architecture Decisions (Research-Backed):
|
|
1173
1173
|
|
|
1174
|
+
```text
|
|
1175
|
+
Research Inputs A3M Implementation Validation
|
|
1176
|
+
─────────────────────────────────────────────────────────────────────────────────────
|
|
1177
|
+
SGLang / RadixAttention → Prefix-aware semantic cache → 30%+ observed hit rate
|
|
1178
|
+
RouteLLM / Cost-quality → Heuristic cost-quality routing → RouterArena PR #144
|
|
1179
|
+
Difficulty-aware routing → Multi-signal tier classifier → 96.77% accuracy
|
|
1180
|
+
A-Mem / MemoRAG → MemoryTree + EMA quality updates → no retraining required
|
|
1181
|
+
MCTS / UCB1 → Workflow optimizer prototype → 0.9370 vs 0.9300 baseline
|
|
1174
1182
|
```
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1183
|
+
|
|
1184
|
+
```text
|
|
1185
|
+
Current RouterArena Anchor
|
|
1186
|
+
─────────────────────────────────────────────────────────────────────────────
|
|
1187
|
+
RouterArena PR #144: 0.9404 score | 96.77% accuracy | $0.0768/1K
|
|
1188
|
+
1.0000 robustness | 0 abnormal entries | 8,400 queries
|
|
1189
|
+
|
|
1190
|
+
Next Research Loop
|
|
1191
|
+
─────────────────────────────────────────────────────────────────────────────
|
|
1192
|
+
MCTS/RL-style routing → test cost-quality strategies → submit improved predictions → compare against 0.9404 / 96.77% anchor
|
|
1185
1193
|
```
|
|
1186
1194
|
|
|
1187
1195
|
### Why Not Use ML-Based Routing?
|
|
@@ -1192,7 +1200,7 @@ A3M Router is built on findings from **30+ 2024-2025 arXiv papers** on LLM routi
|
|
|
1192
1200
|
| **Startup** | ~3 minutes | <100ms |
|
|
1193
1201
|
| **Updates** | Retrain required | EMA, no retraining |
|
|
1194
1202
|
| **Accuracy** | Varies | 96.77% RouterArena PR #144 |
|
|
1195
|
-
| **Cost** | High (GPU cluster) | Zero |
|
|
1203
|
+
| **Cost** | High (GPU cluster) | Zero routing training; RouterArena cost $0.0768/1K |
|
|
1196
1204
|
|
|
1197
1205
|
RouterArena PR #144 shows A3M’s zero-training routing achieves **96.77% accuracy** and **$0.0768/1K** without ML training, outperforming known public baselines on accuracy, cost, and robustness.
|
|
1198
1206
|
|
package/assets/chart-cost-v2.svg
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<stop offset="0%" stop-color="#10b981"/>
|
|
13
13
|
<stop offset="100%" stop-color="#059669"/>
|
|
14
14
|
</linearGradient>
|
|
15
|
-
<linearGradient id="
|
|
15
|
+
<linearGradient id="routerArenaGrad" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
16
16
|
<stop offset="0%" stop-color="#10b981"/>
|
|
17
17
|
<stop offset="100%" stop-color="#06b6d4"/>
|
|
18
18
|
</linearGradient>
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
|
|
78
78
|
<!-- Savings badge -->
|
|
79
79
|
<g transform="translate(280, 175)">
|
|
80
|
-
<rect x="0" y="0" width="140" height="60" rx="30" fill="url(#
|
|
81
|
-
<text x="70" y="28" text-anchor="middle" fill="#10b981" font-family="system-ui,sans-serif" font-size="20" font-weight="800"
|
|
82
|
-
<text x="70" y="48" text-anchor="middle" fill="#6b7280" font-family="system-ui,sans-serif" font-size="11">
|
|
80
|
+
<rect x="0" y="0" width="140" height="60" rx="30" fill="url(#routerArenaGrad)" fill-opacity="0.15" stroke="url(#routerArenaGrad)" stroke-width="1.5"/>
|
|
81
|
+
<text x="70" y="28" text-anchor="middle" fill="#10b981" font-family="system-ui,sans-serif" font-size="20" font-weight="800">$0.0768/1K</text>
|
|
82
|
+
<text x="70" y="48" text-anchor="middle" fill="#6b7280" font-family="system-ui,sans-serif" font-size="11">RouterArena #1</text>
|
|
83
83
|
</g>
|
|
84
84
|
|
|
85
|
-
<!-- Arrow connecting bars to
|
|
85
|
+
<!-- Arrow connecting bars to RouterArena #1 -->
|
|
86
86
|
<path d="M215,200 L310,205" stroke="#10b981" stroke-width="1.5" stroke-dasharray="4,4" fill="none"/>
|
|
87
87
|
<path d="M485,200 L420,205" stroke="#10b981" stroke-width="1.5" stroke-dasharray="4,4" fill="none"/>
|
|
88
88
|
|
package/assets/chart-cost-v3.svg
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</linearGradient>
|
|
22
22
|
|
|
23
23
|
<!-- Savings badge gradient -->
|
|
24
|
-
<linearGradient id="
|
|
24
|
+
<linearGradient id="routerArenaGrad" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
25
25
|
<stop offset="0%" stop-color="#10b981"/>
|
|
26
26
|
<stop offset="100%" stop-color="#06b6d4"/>
|
|
27
27
|
</linearGradient>
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
.bar-group { animation: slideUp 0.8s ease-out; animation-fill-mode: both; }
|
|
54
54
|
.gpt4-bar { animation: slideUp 0.8s ease-out 0.1s both; }
|
|
55
55
|
.a3m-bar { animation: slideUp 0.8s ease-out 0.3s both; }
|
|
56
|
-
.
|
|
56
|
+
.routerArenaBadge { animation: slideUp 0.8s ease-out 0.5s both; }
|
|
57
57
|
</style>
|
|
58
58
|
|
|
59
59
|
<!-- Background -->
|
|
@@ -123,10 +123,10 @@
|
|
|
123
123
|
<text x="435" y="292" text-anchor="middle" fill="#666688" font-family="system-ui,sans-serif" font-size="11">auto-routed</text>
|
|
124
124
|
|
|
125
125
|
<!-- Savings badge -->
|
|
126
|
-
<g class="
|
|
127
|
-
<rect x="230" y="115" width="160" height="65" rx="32" fill="url(#
|
|
128
|
-
<text x="310" y="145" text-anchor="middle" fill="#10b981" font-family="system-ui,sans-serif" font-size="26" font-weight="800"
|
|
129
|
-
<text x="310" y="168" text-anchor="middle" fill="#8888aa" font-family="system-ui,sans-serif" font-size="12"
|
|
126
|
+
<g class="routerArenaBadge">
|
|
127
|
+
<rect x="230" y="115" width="160" height="65" rx="32" fill="url(#routerArenaGrad)" fill-opacity="0.15" stroke="url(#routerArenaGrad)" stroke-width="1.5" filter="url(#glow)"/>
|
|
128
|
+
<text x="310" y="145" text-anchor="middle" fill="#10b981" font-family="system-ui,sans-serif" font-size="26" font-weight="800">$0.0768/1K</text>
|
|
129
|
+
<text x="310" y="168" text-anchor="middle" fill="#8888aa" font-family="system-ui,sans-serif" font-size="12">$0.0768/1K RouterArena #1</text>
|
|
130
130
|
</g>
|
|
131
131
|
|
|
132
132
|
<!-- Connection lines -->
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
|
|
58
58
|
<!-- Row 2 -->
|
|
59
59
|
<g transform="translate(0, 100)">
|
|
60
|
-
<text x="20" y="22" fill="#d1d5db" font-family="system-ui,sans-serif" font-size="13">
|
|
60
|
+
<text x="20" y="22" fill="#d1d5db" font-family="system-ui,sans-serif" font-size="13">RouterArena #1</text>
|
|
61
61
|
<g transform="translate(500)">
|
|
62
62
|
<rect x="0" y="5" width="80" height="28" rx="14" fill="url(#a3mGrad)" filter="url(#cellGlow)"/>
|
|
63
|
-
<text x="40" y="25" text-anchor="middle" fill="#fff" font-family="system-ui,sans-serif" font-size="12" font-weight="600">
|
|
63
|
+
<text x="40" y="25" text-anchor="middle" fill="#fff" font-family="system-ui,sans-serif" font-size="12" font-weight="600">96.77%</text>
|
|
64
64
|
</g>
|
|
65
65
|
<text x="620" y="25" text-anchor="middle" fill="#6b7280" font-family="system-ui,sans-serif" font-size="12">None</text>
|
|
66
66
|
</g>
|
|
@@ -112,10 +112,10 @@
|
|
|
112
112
|
<!-- Row 2 -->
|
|
113
113
|
<g class="row" transform="translate(0, 110)">
|
|
114
114
|
<rect x="0" y="0" width="740" height="50" rx="6" fill="#ffffff" fill-opacity="0.02"/>
|
|
115
|
-
<text x="30" y="30" fill="#ccccdd" font-family="system-ui,sans-serif" font-size="14">
|
|
115
|
+
<text x="30" y="30" fill="#ccccdd" font-family="system-ui,sans-serif" font-size="14">RouterArena #1</text>
|
|
116
116
|
<g transform="translate(350)">
|
|
117
117
|
<rect x="0" y="8" width="80" height="32" rx="16" fill="url(#successGrad)" filter="url(#glow)"/>
|
|
118
|
-
<text x="40" y="30" text-anchor="middle" fill="#ffffff" font-family="system-ui,sans-serif" font-size="14" font-weight="700">
|
|
118
|
+
<text x="40" y="30" text-anchor="middle" fill="#ffffff" font-family="system-ui,sans-serif" font-size="14" font-weight="700">96.77%</text>
|
|
119
119
|
</g>
|
|
120
120
|
<text x="650" y="30" text-anchor="middle" fill="#666688" font-family="system-ui,sans-serif" font-size="14">None</text>
|
|
121
121
|
<g transform="translate(290, 12)" class="check">
|
package/assets/cost-simple.svg
CHANGED
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
<rect x="280" y="157" width="120" height="23" rx="6" fill="url(#a3mGrad)"/>
|
|
52
52
|
<text x="340" y="185" text-anchor="middle" fill="#10b981" font-family="system-ui,sans-serif" font-size="16" font-weight="700">$5.75</text>
|
|
53
53
|
<text x="340" y="200" text-anchor="middle" fill="#94a3b8" font-family="system-ui,sans-serif" font-size="12">A3M Router</text>
|
|
54
|
-
<text x="340" y="215" text-anchor="middle" fill="#64748b" font-family="system-ui,sans-serif" font-size="10"
|
|
54
|
+
<text x="340" y="215" text-anchor="middle" fill="#64748b" font-family="system-ui,sans-serif" font-size="10">$0.0768/1K RouterArena #1</text>
|
|
55
55
|
|
|
56
56
|
<!-- Savings indicator -->
|
|
57
57
|
<path d="M200,100 L260,140" stroke="#10b981" stroke-width="2" stroke-dasharray="4,4"/>
|
|
58
|
-
<text x="230" y="115" text-anchor="middle" fill="#10b981" font-family="system-ui,sans-serif" font-size="12" font-weight="600">
|
|
58
|
+
<text x="230" y="115" text-anchor="middle" fill="#10b981" font-family="system-ui,sans-serif" font-size="12" font-weight="600">96.77%</text>
|
|
59
59
|
<text x="230" y="130" text-anchor="middle" fill="#10b981" font-family="system-ui,sans-serif" font-size="11">cheaper</text>
|
|
60
60
|
</g>
|
|
61
61
|
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
</g>
|
|
75
75
|
<!-- Metric 2 -->
|
|
76
76
|
<g transform="translate(300, 0)">
|
|
77
|
-
<text x="150" y="30" text-anchor="middle" fill="#06b6d4" font-family="system-ui,sans-serif" font-size="48" font-weight="800">
|
|
78
|
-
<text x="150" y="65" text-anchor="middle" fill="#94a3b8" font-family="system-ui,sans-serif" font-size="16">
|
|
77
|
+
<text x="150" y="30" text-anchor="middle" fill="#06b6d4" font-family="system-ui,sans-serif" font-size="48" font-weight="800">96.77%</text>
|
|
78
|
+
<text x="150" y="65" text-anchor="middle" fill="#94a3b8" font-family="system-ui,sans-serif" font-size="16">RouterArena #1</text>
|
|
79
79
|
</g>
|
|
80
80
|
<!-- Metric 3 -->
|
|
81
81
|
<g transform="translate(600, 0)">
|
package/assets/social-v2.svg
CHANGED
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
<!-- Metric 2 -->
|
|
94
94
|
<g transform="translate(195, 0)">
|
|
95
95
|
<rect x="0" y="0" width="165" height="100" rx="16" fill="rgba(6,182,212,0.08)" stroke="#06b6d4" stroke-width="1.5"/>
|
|
96
|
-
<text x="82" y="40" text-anchor="middle" fill="#06b6d4" font-family="system-ui,sans-serif" font-size="36" font-weight="800" filter="url(#textGlow)">
|
|
97
|
-
<text x="82" y="70" text-anchor="middle" fill="#9ca3af" font-family="system-ui,sans-serif" font-size="14">
|
|
96
|
+
<text x="82" y="40" text-anchor="middle" fill="#06b6d4" font-family="system-ui,sans-serif" font-size="36" font-weight="800" filter="url(#textGlow)">96.77%</text>
|
|
97
|
+
<text x="82" y="70" text-anchor="middle" fill="#9ca3af" font-family="system-ui,sans-serif" font-size="14">RouterArena #1</text>
|
|
98
98
|
</g>
|
|
99
99
|
|
|
100
100
|
<!-- Metric 3 -->
|
package/assets/social-v3.svg
CHANGED
|
@@ -173,8 +173,8 @@
|
|
|
173
173
|
<!-- Metric 2 -->
|
|
174
174
|
<g class="metric" transform="translate(200, 0)">
|
|
175
175
|
<rect x="0" y="0" width="180" height="100" rx="14" fill="#06b6d4" fill-opacity="0.08" stroke="#06b6d4" stroke-width="1.5" filter="url(#glowSoft)"/>
|
|
176
|
-
<text x="90" y="40" text-anchor="middle" fill="#06b6d4" font-family="system-ui,sans-serif" font-size="36" font-weight="800">
|
|
177
|
-
<text x="90" y="70" text-anchor="middle" fill="#9999bb" font-family="system-ui,sans-serif" font-size="14">
|
|
176
|
+
<text x="90" y="40" text-anchor="middle" fill="#06b6d4" font-family="system-ui,sans-serif" font-size="36" font-weight="800">96.77%</text>
|
|
177
|
+
<text x="90" y="70" text-anchor="middle" fill="#9999bb" font-family="system-ui,sans-serif" font-size="14">RouterArena #1</text>
|
|
178
178
|
</g>
|
|
179
179
|
|
|
180
180
|
<!-- Metric 3 -->
|
package/docs/GEO_OPTIMIZATION.md
CHANGED
|
@@ -8,7 +8,7 @@ Based on Princeton/GA Tech GEO (KDD 2024, arXiv:2311.09735).
|
|
|
8
8
|
| Signal | Lift | Applied In |
|
|
9
9
|
|--------|------|-----------|
|
|
10
10
|
| Quotation Addition | +41% | README hero (RouterArena quote) |
|
|
11
|
-
| Statistics Addition | +30% | README ($0.0768,
|
|
11
|
+
| Statistics Addition | +30% | README hero (RouterArena 0.9404 / 96.77%, $0.0768/1K, 1.0000 robustness) |
|
|
12
12
|
| Cite Sources | +28% | arXiv link, PR link |
|
|
13
13
|
| Technical Terms | +18% | confidence-weighted voting, semantic routing |
|
|
14
14
|
| Fluency Optimization | +28% | All docs |
|
package/docs/QUICK_START.md
CHANGED
|
@@ -34,8 +34,10 @@ const response = await client.chat.completions.create({
|
|
|
34
34
|
|
|
35
35
|
| Feature | A3M Router |
|
|
36
36
|
|---------|-----------|
|
|
37
|
-
| Routing Accuracy | 96.77% |
|
|
38
|
-
| Cost
|
|
37
|
+
| Routing Accuracy | 96.77% RouterArena PR #144 |
|
|
38
|
+
| Cost | $0.0768/1K — No. 1 with published cost |
|
|
39
|
+
| Robustness | 1.0000, 0 abnormal entries |
|
|
40
|
+
| RouterArena Score | 0.9404 — No. 1 among known public baselines |
|
|
39
41
|
| Providers | 47+ |
|
|
40
42
|
| Semantic Cache | ✅ 30%+ hit rate |
|
|
41
43
|
| Budget Enforcement | ✅ Hard caps |
|
package/docs/ROUTING_RUBRIC.md
CHANGED
|
@@ -29,9 +29,9 @@ composite_score = 0.30 × RoutingAccuracy
|
|
|
29
29
|
|
|
30
30
|
| Score | Criterion |
|
|
31
31
|
|-------|-----------|
|
|
32
|
-
| 90-100 | >95% within ±1 tier. RouterArena score
|
|
33
|
-
| 75-89 | 85-95% within ±1 tier. RouterArena score
|
|
34
|
-
| 60-74 | 70-85% within ±1 tier. RouterArena score
|
|
32
|
+
| 90-100 | >95% within ±1 tier. RouterArena score 0.90+. Fewer than 1 in 20 queries misrouted by more than one tier. |
|
|
33
|
+
| 75-89 | 85-95% within ±1 tier. RouterArena score 0.75-0.90. Occasional over-tiering on simple queries. |
|
|
34
|
+
| 60-74 | 70-85% within ±1 tier. RouterArena score 0.60-0.75. Noticeable over-tiering on medium queries. |
|
|
35
35
|
| 45-59 | 50-70% within ±1 tier. Frequent misrouting on complex/expert queries. |
|
|
36
36
|
| <45 | <50% within ±1 tier. Router is essentially random. Major overhaul needed. |
|
|
37
37
|
|
|
@@ -39,7 +39,7 @@ composite_score = 0.30 × RoutingAccuracy
|
|
|
39
39
|
|
|
40
40
|
- **RouteLLM comparison** — where RouteLLM routes vs A3M (reference benchmark)
|
|
41
41
|
- **Tier confusion matrix** — which query types cause the most over/under-tiering
|
|
42
|
-
- **RouterArena score** —
|
|
42
|
+
- **RouterArena score** — current A3M anchor: **0.9404 / 96.77% accuracy** on PR #144
|
|
43
43
|
- **Golden route deviation** — percentage of queries where A3M disagrees with golden route
|
|
44
44
|
|
|
45
45
|
### Common failure patterns
|
package/docs/USE_CASES.md
CHANGED
|
@@ -34,7 +34,7 @@ npx a3m-router serve --per-team-budgets --metrics-port 9090
|
|
|
34
34
|
|
|
35
35
|
**Solution:** Intelligent routing to cheapest capable model. Trivial → Groq/DeepSeek. Complex → GPT-4o.
|
|
36
36
|
|
|
37
|
-
**
|
|
37
|
+
**Routing proof:** RouterArena PR #144 — 0.9404 score, 96.77% accuracy, $0.0768/1K, 1.0000 robustness
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
curl http://localhost:8787/v1/chat/completions \
|
package/docs/benchmark.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@context": "https://schema.org",
|
|
16
16
|
"@type": "WebPage",
|
|
17
17
|
"name": "A3M Router Benchmark",
|
|
18
|
-
"description": "Independent benchmark results for A3M Router LLM gateway showing latency, cost
|
|
18
|
+
"description": "Independent benchmark results for A3M Router LLM gateway showing latency, RouterArena cost/accuracy/robustness proof, and routing behavior.",
|
|
19
19
|
"url": "https://das-rebel.github.io/a3m-router/benchmark"
|
|
20
20
|
}
|
|
21
21
|
</script>
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
<h2>Latency Comparison</h2>
|
|
95
95
|
|
|
96
96
|
<div class="chart-container">
|
|
97
|
-
<img src="benchmark-chart.png" alt="A3M Router Benchmark Chart — latency comparison and cost
|
|
98
|
-
<p class="chart-caption">Left: latency comparison. Right: cost
|
|
97
|
+
<img src="benchmark-chart.png" alt="A3M Router Benchmark Chart — latency comparison and RouterArena cost/accuracy/robustness proof">
|
|
98
|
+
<p class="chart-caption">Left: latency comparison. Right: RouterArena cost/accuracy/robustness proof. Dark theme. Measured with <a href="https://github.com/taffy-owo/llm-gateway-bench" target="_blank" rel="noopener">llm-gateway-bench</a> v0.2.0, Groq (llama-3.3-70b-versatile), 15 calls per scenario.</p>
|
|
99
99
|
</div>
|
|
100
100
|
|
|
101
101
|
<div class="table-wrapper">
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
|
|
221
221
|
<!-- Tab: Cost -->
|
|
222
222
|
<div id="tab-cost" class="tab-content">
|
|
223
|
-
<h2>Cost
|
|
223
|
+
<h2>Cost / Accuracy / Robustness</h2>
|
|
224
224
|
|
|
225
225
|
<h3>Cost Breakdown (200 real API calls)</h3>
|
|
226
226
|
<pre><code> GPT-4o only: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $0.25 (all premium)
|
package/docs/comparison.md
CHANGED
|
@@ -94,7 +94,7 @@ Query -> Run GPT-4o + Claude + Gemini simultaneously -> Score -> Pick best
|
|
|
94
94
|
- **+26%** answer quality over single-best provider
|
|
95
95
|
- **-57%** hallucination rate (1.8% vs 4.2%)
|
|
96
96
|
- **+19pp** multi-step reasoning accuracy (91% vs 72%)
|
|
97
|
-
- **
|
|
97
|
+
- **RouterArena PR #144:** 0.9404 score, 96.77% accuracy, $0.0768/1K, 1.0000 robustness, 0 abnormal entries across 8,400 queries
|
|
98
98
|
|
|
99
99
|
---
|
|
100
100
|
|
package/docs/demo.html
CHANGED
|
@@ -243,9 +243,9 @@
|
|
|
243
243
|
</div>
|
|
244
244
|
</div>
|
|
245
245
|
|
|
246
|
-
<!-- SCENE 3:
|
|
246
|
+
<!-- SCENE 3: RouterArena Proof -->
|
|
247
247
|
<div class="scene" id="s3">
|
|
248
|
-
<h2 style="color: #3fb950; margin-bottom: 16px;"
|
|
248
|
+
<h2 style="color: #3fb950; margin-bottom: 16px;">🏆 RouterArena No. 1 Accuracy, Cost & Robustness</h2>
|
|
249
249
|
|
|
250
250
|
<div class="comparison">
|
|
251
251
|
<div class="col bad">
|
|
@@ -266,22 +266,22 @@
|
|
|
266
266
|
|
|
267
267
|
<div class="stat-row">
|
|
268
268
|
<div class="stat">
|
|
269
|
-
<div class="stat-value"
|
|
270
|
-
<div class="stat-label">Cost
|
|
269
|
+
<div class="stat-value">$0.0768/1K</div>
|
|
270
|
+
<div class="stat-label">No. 1 RouterArena Cost</div>
|
|
271
271
|
</div>
|
|
272
272
|
<div class="stat">
|
|
273
273
|
<div class="stat-value">96.77%</div>
|
|
274
|
-
<div class="stat-label">
|
|
274
|
+
<div class="stat-label">RouterArena Accuracy</div>
|
|
275
275
|
</div>
|
|
276
276
|
<div class="stat">
|
|
277
|
-
<div class="stat-value"
|
|
278
|
-
<div class="stat-label">
|
|
277
|
+
<div class="stat-value">1.0000</div>
|
|
278
|
+
<div class="stat-label">Robustness</div>
|
|
279
279
|
</div>
|
|
280
280
|
</div>
|
|
281
281
|
|
|
282
282
|
<div class="box success">
|
|
283
|
-
<div class="line success-text"
|
|
284
|
-
<div class="line muted">
|
|
283
|
+
<div class="line success-text">🏆 0.9404 score, 96.77% accuracy, $0.0768/1K, 1.0000 robustness</div>
|
|
284
|
+
<div class="line muted"> RouterArena PR #144: 8,400 queries, 0 abnormal entries</div>
|
|
285
285
|
</div>
|
|
286
286
|
</div>
|
|
287
287
|
|
package/docs/index.html
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>A3M Router —
|
|
7
|
-
<meta name="description" content="
|
|
6
|
+
<title>A3M Router — No. 1 RouterArena Accuracy, Cost & Robustness | $0.0768/1K</title>
|
|
7
|
+
<meta name="description" content="No. 1 LLM routing benchmark result among known public baselines: 0.9404 score, 96.77% accuracy, $0.0768/1K, 1.0000 robustness. Parallel multi-LLM execution across 47+ providers.">
|
|
8
8
|
<meta name="keywords" content="LLM router, AI gateway, open-source, multi-provider, cost optimization, parallel LLM, semantic cache, load balancing, OpenAI proxy">
|
|
9
|
-
<meta property="og:title" content="A3M Router —
|
|
10
|
-
<meta property="og:description" content="RouterArena
|
|
9
|
+
<meta property="og:title" content="A3M Router — No. 1 RouterArena Accuracy, Cost & Robustness | $0.0768/1K">
|
|
10
|
+
<meta property="og:description" content="RouterArena PR #144: 0.9404 score, 96.77% accuracy, $0.0768/1K, 1.0000 robustness, 0 abnormal entries across 8,400 queries.">
|
|
11
11
|
<meta property="og:image" content="https://das-rebel.github.io/a3m-router/benchmark-chart.png">
|
|
12
12
|
<meta property="og:url" content="https://das-rebel.github.io/a3m-router/">
|
|
13
13
|
<meta property="og:type" content="website">
|
|
14
14
|
<meta name="twitter:card" content="summary_large_image">
|
|
15
|
-
<meta name="twitter:title" content="A3M Router —
|
|
16
|
-
<meta name="twitter:description" content="RouterArena
|
|
15
|
+
<meta name="twitter:title" content="A3M Router — No. 1 RouterArena Accuracy, Cost & Robustness | $0.0768/1K">
|
|
16
|
+
<meta name="twitter:description" content="RouterArena PR #144: 0.9404 score, 96.77% accuracy, $0.0768/1K, 1.0000 robustness, 0 abnormal entries across 8,400 queries.">
|
|
17
17
|
<link rel="canonical" href="https://das-rebel.github.io/a3m-router/">
|
|
18
18
|
<link rel="stylesheet" href="styles.css">
|
|
19
19
|
<script type="application/ld+json">
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"macOS",
|
|
39
39
|
"Windows"
|
|
40
40
|
],
|
|
41
|
-
"description": "
|
|
41
|
+
"description": "No. 1 LLM routing benchmark result among known public baselines: 0.9404 score, 96.77% accuracy, $0.0768/1K, 1.0000 robustness. Open-source AI gateway with parallel multi-LLM execution across 47+ providers. Ensemble voting, semantic cache, budget enforcement, circuit breaker.",
|
|
42
42
|
"url": "https://github.com/Das-rebel/a3m-router",
|
|
43
43
|
"sameAs": [
|
|
44
44
|
"https://www.npmjs.com/package/adaptive-memory-multi-model-router",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"https://das-rebel.github.io/a3m-router/"
|
|
47
47
|
],
|
|
48
48
|
"downloadUrl": "https://www.npmjs.com/package/adaptive-memory-multi-model-router",
|
|
49
|
-
"softwareVersion": "2.
|
|
49
|
+
"softwareVersion": "2.14.55",
|
|
50
50
|
"license": "https://opensource.org/licenses/MIT",
|
|
51
51
|
"author": {
|
|
52
52
|
"@type": "Person",
|
|
@@ -75,7 +75,9 @@
|
|
|
75
75
|
"Budget enforcement with per-query cost tracking",
|
|
76
76
|
"Circuit breaker with auto failover",
|
|
77
77
|
"Persistent episodic memory",
|
|
78
|
-
"RouterArena #1 benchmark score",
|
|
78
|
+
"RouterArena #1 benchmark score among known public baselines",
|
|
79
|
+
"1.0000 robustness with 0 abnormal entries",
|
|
80
|
+
"8,400-query RouterArena full-split evaluation",
|
|
79
81
|
"Cost $0.0768/1K queries",
|
|
80
82
|
"19.5KB, zero ML dependencies",
|
|
81
83
|
"OpenAI-compatible proxy"
|
|
@@ -92,7 +94,7 @@
|
|
|
92
94
|
"name": "What is the best open-source LLM router?",
|
|
93
95
|
"acceptedAnswer": {
|
|
94
96
|
"@type": "Answer",
|
|
95
|
-
"text": "A3M Router
|
|
97
|
+
"text": "A3M Router is the No. 1 LLM router among known public RouterArena baselines: 0.9404 score, 96.77% accuracy, $0.0768 per 1K queries, and 1.0000 robustness across 8,400 queries. It uses rule-based routing with no ML training required."
|
|
96
98
|
}
|
|
97
99
|
},
|
|
98
100
|
{
|
|
@@ -100,15 +102,15 @@
|
|
|
100
102
|
"name": "How is A3M different from RouteLLM?",
|
|
101
103
|
"acceptedAnswer": {
|
|
102
104
|
"@type": "Answer",
|
|
103
|
-
"text": "A3M is rule-based with zero ML training (19.5KB). RouteLLM uses BERT-based ML
|
|
105
|
+
"text": "A3M is rule-based with zero ML training (19.5KB). RouteLLM uses BERT-based ML. A3M scores 0.9404 / 96.77% on RouterArena PR #144 at $0.0768 per 1K queries with 1.0000 robustness, ranking No. 1 among known public baselines."
|
|
104
106
|
}
|
|
105
107
|
},
|
|
106
108
|
{
|
|
107
109
|
"@type": "Question",
|
|
108
|
-
"name": "How much does A3M save vs
|
|
110
|
+
"name": "How much does A3M save vs premium models?",
|
|
109
111
|
"acceptedAnswer": {
|
|
110
112
|
"@type": "Answer",
|
|
111
|
-
"text": "A3M costs $0.0768 per 1K queries
|
|
113
|
+
"text": "A3M costs $0.0768 per 1K queries versus premium models around $10.02 per 1K — approximately 130x cheaper — while RouterArena PR #144 confirms 96.77% accuracy and 1.0000 robustness."
|
|
112
114
|
}
|
|
113
115
|
},
|
|
114
116
|
{
|
|
@@ -167,10 +169,10 @@
|
|
|
167
169
|
<p class="tagline">One prompt in. The right model out. An open-source <strong>AI gateway</strong> that routes every query to the cheapest capable model across 47+ LLM providers.</p>
|
|
168
170
|
|
|
169
171
|
<div class="badges">
|
|
170
|
-
<span class="badge green">✅
|
|
172
|
+
<span class="badge green">✅ RouterArena No. 1</span>
|
|
171
173
|
<span class="badge">📡 47+ Providers</span>
|
|
172
|
-
<span class="badge orange">💰
|
|
173
|
-
<span class="badge purple">⚡
|
|
174
|
+
<span class="badge orange">💰 $0.0768/1K</span>
|
|
175
|
+
<span class="badge purple">⚡ 1.0000 Robustness</span>
|
|
174
176
|
<span class="badge green">MIT License</span>
|
|
175
177
|
</div>
|
|
176
178
|
|
|
@@ -193,16 +195,16 @@ npx a3m-router serve
|
|
|
193
195
|
<section>
|
|
194
196
|
<div class="stats-grid">
|
|
195
197
|
<div class="stat-card">
|
|
196
|
-
<div class="stat-value"
|
|
197
|
-
<div class="stat-label"
|
|
198
|
+
<div class="stat-value">96.77%</div>
|
|
199
|
+
<div class="stat-label">RouterArena Accuracy</div>
|
|
198
200
|
</div>
|
|
199
201
|
<div class="stat-card">
|
|
200
|
-
<div class="stat-value"
|
|
201
|
-
<div class="stat-label">
|
|
202
|
+
<div class="stat-value">$0.0768/1K</div>
|
|
203
|
+
<div class="stat-label">No. 1 RouterArena Cost</div>
|
|
202
204
|
</div>
|
|
203
205
|
<div class="stat-card">
|
|
204
|
-
<div class="stat-value">
|
|
205
|
-
<div class="stat-label">
|
|
206
|
+
<div class="stat-value">1.0000</div>
|
|
207
|
+
<div class="stat-label">Robustness</div>
|
|
206
208
|
</div>
|
|
207
209
|
<div class="stat-card">
|
|
208
210
|
<div class="stat-value">30%+</div>
|
|
@@ -223,7 +225,7 @@ npx a3m-router serve
|
|
|
223
225
|
<section>
|
|
224
226
|
<h2>🔥 What Makes A3M Different</h2>
|
|
225
227
|
<div class="callout callout-info">
|
|
226
|
-
<strong>Everyone does sequential fallback.</strong> A3M
|
|
228
|
+
<strong>Everyone does sequential fallback.</strong> A3M combines parallel multi-LLM execution, semantic cache, provider health, and cost-aware routing — validated by RouterArena PR #144.
|
|
227
229
|
</div>
|
|
228
230
|
|
|
229
231
|
<div class="table-wrapper">
|
|
@@ -384,21 +386,22 @@ npx a3m-router serve
|
|
|
384
386
|
</div>
|
|
385
387
|
</section>
|
|
386
388
|
|
|
387
|
-
<!-- Cost
|
|
389
|
+
<!-- Cost / Accuracy / Robustness -->
|
|
388
390
|
<section>
|
|
389
|
-
<h2>💰 Cost
|
|
391
|
+
<h2>💰 Cost / Accuracy / Robustness</h2>
|
|
390
392
|
<div class="callout callout-success">
|
|
391
|
-
<strong>
|
|
393
|
+
<strong>RouterArena PR #144 confirms the trade-off:</strong> A3M reaches No. 1 accuracy, No. 1 cost, and No. 1 robustness among known public baselines at $0.0768/1K.
|
|
392
394
|
</div>
|
|
393
395
|
<div class="table-wrapper">
|
|
394
396
|
<table>
|
|
395
397
|
<thead>
|
|
396
|
-
<tr><th>
|
|
398
|
+
<tr><th>Metric</th><th>A3M Result</th><th>Context</th></tr>
|
|
397
399
|
</thead>
|
|
398
400
|
<tbody>
|
|
399
|
-
<tr><td>
|
|
400
|
-
<tr><td>
|
|
401
|
-
<tr><td>
|
|
401
|
+
<tr><td>RouterArena Score</td><td><strong>0.9404</strong></td><td>No. 1 among known public baselines</td></tr>
|
|
402
|
+
<tr><td>Accuracy</td><td><strong>96.77%</strong></td><td>8,400-query full split</td></tr>
|
|
403
|
+
<tr><td>Cost / 1K</td><td><strong>$0.0768</strong></td><td>No. 1 with published cost</td></tr>
|
|
404
|
+
<tr><td>Robustness</td><td><strong>1.0000</strong></td><td>0 abnormal entries</td></tr>
|
|
402
405
|
</tbody>
|
|
403
406
|
</table>
|
|
404
407
|
</div>
|
|
@@ -421,7 +424,7 @@ npx a3m-router serve
|
|
|
421
424
|
<tbody>
|
|
422
425
|
<tr><td>Parallel ensemble</td><td class="check">✅</td><td class="cross">❌</td><td class="cross">❌</td><td class="cross">❌</td></tr>
|
|
423
426
|
<tr><td>Confidence scoring</td><td class="check">✅</td><td class="cross">❌</td><td class="cross">❌</td><td class="cross">❌</td></tr>
|
|
424
|
-
<tr><td>Routing accuracy</td><td>
|
|
427
|
+
<tr><td>Routing accuracy</td><td><strong>96.77%</strong></td><td>Manual</td><td>Manual</td><td>Manual</td></tr>
|
|
425
428
|
<tr><td>Self-hosted</td><td class="check">✅</td><td class="check">✅</td><td class="cross">❌</td><td class="check">✅</td></tr>
|
|
426
429
|
<tr><td>Semantic cache</td><td class="check">✅</td><td class="cross">❌</td><td class="cross">❌</td><td class="cross">❌</td></tr>
|
|
427
430
|
<tr><td>Budget enforcement</td><td class="check">✅</td><td class="cross">❌</td><td class="cross">❌</td><td class="cross">❌</td></tr>
|
package/hf-space/app.py
CHANGED
|
@@ -143,7 +143,7 @@ with gr.Blocks(
|
|
|
143
143
|
summary = gr.Markdown(label="Best Result")
|
|
144
144
|
|
|
145
145
|
with gr.Row():
|
|
146
|
-
cost_comparison = gr.Markdown(label="
|
|
146
|
+
cost_comparison = gr.Markdown(label="RouterArena Proof")
|
|
147
147
|
|
|
148
148
|
with gr.Accordion("Raw JSON Output", open=False):
|
|
149
149
|
raw_output = gr.JSON()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adaptive-memory-multi-model-router",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.56",
|
|
4
4
|
"shortName": "A3M Router",
|
|
5
5
|
"displayName": "A3M Router - Adaptive Memory Multi-Model Router",
|
|
6
6
|
"description": "RouterArena #1 among known public baselines: 96.77% accuracy, $0.0768/1K, 1.0000 robustness. OpenAI-compatible LLM router across 47+ providers.",
|