adaptive-memory-multi-model-router 2.12.0 → 2.12.1

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 (67) hide show
  1. package/.github/workflows/pages.yml +37 -0
  2. package/Awesome-LLM/LICENSE.md +121 -0
  3. package/Awesome-LLM/README.md +625 -0
  4. package/Awesome-LLM/contributing.md +24 -0
  5. package/Awesome-LLM/paper_list/RLHF.md +1 -0
  6. package/Awesome-LLM/paper_list/Retrieval_Augmented_Generation.md +6 -0
  7. package/Awesome-LLM/paper_list/acceleration.md +10 -0
  8. package/Awesome-LLM/paper_list/alignment.md +20 -0
  9. package/Awesome-LLM/paper_list/application.md +19 -0
  10. package/Awesome-LLM/paper_list/augmentation.md +14 -0
  11. package/Awesome-LLM/paper_list/chain_of_thougt.md +16 -0
  12. package/Awesome-LLM/paper_list/code_pretraining.md +0 -0
  13. package/Awesome-LLM/paper_list/detection.md +11 -0
  14. package/Awesome-LLM/paper_list/evaluation.md +64 -0
  15. package/Awesome-LLM/paper_list/in_context_learning.md +4 -0
  16. package/Awesome-LLM/paper_list/instruction-tuning.md +35 -0
  17. package/Awesome-LLM/paper_list/moe.md +0 -0
  18. package/Awesome-LLM/paper_list/prompt_learning.md +15 -0
  19. package/Awesome-LLM/resources/DeepSpeed_light.svg +27 -0
  20. package/Awesome-LLM/resources/alpa-logo-cropped.png +0 -0
  21. package/Awesome-LLM/resources/colossal-ai_logo_vertical.png +0 -0
  22. package/Awesome-LLM/resources/creepy_llm.jpeg +0 -0
  23. package/Awesome-LLM/resources/image8.gif +0 -0
  24. package/Awesome-LLM/resources/jax_logo_250px.png +0 -0
  25. package/Awesome-LLM/resources/logo.png +0 -0
  26. package/Awesome-LLM/resources/nvidia.png +0 -0
  27. package/Awesome-LLM/resources/tensorflow.png +0 -0
  28. package/Awesome-LLM/resources//345/244/247/345/236/213/350/257/255/350/250/200/346/250/241/345/236/213/347/232/204/350/203/275/345/212/233/345/210/206/346/236/220/344/270/216/345/272/224/347/224/250 - 30min.pdf +0 -0
  29. package/README.md +3 -3
  30. package/SUBMISSIONS.md +43 -0
  31. package/assets/chart-cost-v2.svg +91 -0
  32. package/assets/chart-cost-v3.svg +143 -0
  33. package/assets/chart-features-v2.svg +132 -0
  34. package/assets/chart-features-v3.svg +211 -0
  35. package/assets/chart-growth-v2.svg +122 -0
  36. package/assets/chart-growth-v3.svg +189 -0
  37. package/assets/cost-simple.svg +64 -0
  38. package/assets/growth-simple.svg +69 -0
  39. package/assets/hero-diagram.svg +81 -0
  40. package/assets/logo-new.svg +21 -0
  41. package/assets/social-preview-new.svg +100 -0
  42. package/assets/social-v2.svg +130 -0
  43. package/assets/social-v3.svg +212 -0
  44. package/awesome-ai-gateways/CONTRIBUTING.md +49 -0
  45. package/awesome-ai-gateways/LICENSE +3 -0
  46. package/awesome-ai-gateways/README.md +190 -0
  47. package/awesome-selfhosted/.github/ISSUE_TEMPLATE/config.yml +5 -0
  48. package/awesome-selfhosted/.github/PULL_REQUEST_TEMPLATE.md +1 -0
  49. package/awesome-selfhosted/LICENSE +376 -0
  50. package/awesome-selfhosted/README.md +2303 -0
  51. package/awesome-selfhosted/_static/awesome.png +0 -0
  52. package/awesome-selfhosted/non-free.md +377 -0
  53. package/demo-new.tape +71 -0
  54. package/demo-real.sh +198 -0
  55. package/demo-simple.tape +205 -0
  56. package/demo.html +520 -0
  57. package/demo.tape +259 -0
  58. package/dist/cli/tui.js +152 -0
  59. package/docs/demo-auto.html +264 -0
  60. package/docs/demo.html +416 -0
  61. package/docs/index.html +112 -599
  62. package/index.html +667 -0
  63. package/package.json +21 -168
  64. package/docs/assets/cost-comparison.svg +0 -134
  65. package/docs/assets/growth-chart-animated.svg +0 -76
  66. package/docs/assets/og-banner.svg +0 -194
  67. package/docs/assets/social-preview.svg +0 -194
package/docs/index.html CHANGED
@@ -1,607 +1,120 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
-
7
- <!-- Primary SEO Meta Tags -->
8
- <title>A3M Router LLM Router & AI Gateway | 99.5% Accuracy | 40 Providers</title>
9
- <meta name="description" content="LLM router & AI gateway with 99.5% ±1 tier routing accuracy. OpenAI-compatible proxy, 40 providers, semantic cache, guardrails. TypeScript SDK, Python SDK, CLI, REST API.">
10
- <meta name="keywords" content="llm router, ai gateway, openai proxy, llm proxy, llm routing, model routing, groq, cerebras, ollama, deepseek, mistral, anthropic, semantic cache, guardrails, cost optimization, routellm alternative, litellm alternative">
11
- <meta name="author" content="A3M Router Team">
12
- <meta name="robots" content="index, follow, max-snippet:-1, max-image-preview:large">
13
- <link rel="canonical" href="https://das-rebel.github.io/adaptive-memory-multi-model-router/">
14
-
15
- <!-- Open Graph / Social Sharing -->
16
- <meta property="og:type" content="website">
17
- <meta property="og:url" content="https://das-rebel.github.io/adaptive-memory-multi-model-router/">
18
- <meta property="og:title" content="A3M Router — 82.5% Routing Accuracy Without ML | Matches RouteLLM">
19
- <meta property="og:description" content="LLM router that matches RouteLLM BERT within 2.5% — without GPU. 30x more efficient. 82.5% routing accuracy. Drop-in OpenAI proxy with 39 providers.">
20
- <meta property="og:image" content="https://das-rebel.github.io/adaptive-memory-multi-model-router/assets/og-banner.svg">
21
- <meta property="og:image:width" content="1200">
22
- <meta property="og:image:height" content="630">
23
- <meta property="og:site_name" content="A3M Router">
24
- <meta property="og:locale" content="en_US">
25
-
26
- <!-- Twitter Card -->
27
- <meta name="twitter:card" content="summary_large_image">
28
- <meta name="twitter:title" content="A3M Router — 82.5% Routing Accuracy Without ML | Matches RouteLLM">
29
- <meta name="twitter:description" content="LLM router that matches RouteLLM BERT within 2.5% — without GPU. 30x more efficient. 82.5% accuracy. Drop-in OpenAI proxy. 39 providers.">
30
- <meta name="twitter:image" content="https://das-rebel.github.io/adaptive-memory-multi-model-router/assets/og-banner.svg">
31
-
32
- <!-- JSON-LD Structured Data: SoftwareApplication -->
33
- <script type="application/ld+json">{
34
- "@context": "https://schema.org",
35
- "@type": "FAQPage",
36
- "mainEntity": [
37
- {
38
- "@type": "Question",
39
- "name": "What is A3M Router?",
40
- "acceptedAnswer": {
41
- "@type": "Answer",
42
- "text": "A3M Router is an open-source LLM routing library and OpenAI-compatible proxy server. It analyzes each query and routes it to the cheapest capable LLM provider using multi-signal classification \u2014 no ML model, no GPU, no training. It achieves 99.5% \u00b11 tier routing accuracy across 40 providers including Groq, Cerebras, Ollama, DeepSeek, Mistral, OpenAI, and Anthropic."
43
- }
44
- },
45
- {
46
- "@type": "Question",
47
- "name": "How accurate is A3M Router compared to RouteLLM?",
48
- "acceptedAnswer": {
49
- "@type": "Answer",
50
- "text": "A3M Router achieves 99.5% \u00b11 tier accuracy and 64.5% exact tier match on a 200-query benchmark using 4 cost tiers (free/cheap/mid/premium). This uses the same methodology as RouteLLM but with a different test set. A3M Router requires no GPU and no ML model \u2014 it uses multi-signal keyword classification including domain detection, complexity scoring, and action verb analysis."
51
- }
52
- },
53
- {
54
- "@type": "Question",
55
- "name": "How do I use A3M Router with OpenAI SDK?",
56
- "acceptedAnswer": {
57
- "@type": "Answer",
58
- "text": "Install with npm install adaptive-memory-multi-model-router, run npx a3m-router serve, then point any OpenAI SDK at http://localhost:8787/v1 with api_key='not-needed'. Works with Python, Node.js, LangChain, LlamaIndex, and any OpenAI-compatible client. Zero code changes required."
59
- }
60
- },
61
- {
62
- "@type": "Question",
63
- "name": "What LLM providers does A3M Router support?",
64
- "acceptedAnswer": {
65
- "@type": "Answer",
66
- "text": "A3M Router supports 40 LLM providers: Free tier includes Groq, Cerebras, Ollama, LM Studio. Cheap tier includes DeepSeek, MiniMax, Mistral, Qwen. Mid tier includes Google Gemini, Cohere, Together AI. Premium tier includes OpenAI GPT-4o/o3, Anthropic Claude, Google Gemini Ultra."
67
- }
68
- },
69
- {
70
- "@type": "Question",
71
- "name": "Does A3M Router require a GPU?",
72
- "acceptedAnswer": {
73
- "@type": "Answer",
74
- "text": "No. A3M Router uses multi-signal keyword classification for routing \u2014 no ML model weights, no GPU, no training required. The entire package is 19.5 KB gzipped, approximately 500x smaller than ML-based routers like RouteLLM with BERT (~1.5 GB)."
75
- }
76
- },
77
- {
78
- "@type": "Question",
79
- "name": "How much can I save using A3M Router?",
80
- "acceptedAnswer": {
81
- "@type": "Answer",
82
- "text": "A3M Router achieves 61.6% cost savings compared to routing all queries to premium models. Simple queries go to free providers (Groq, Cerebras), medium queries to cheap providers (DeepSeek, Mistral), and only complex queries to premium (GPT-4o, Claude). Real savings depend on your query distribution."
83
- }
84
- },
85
- {
86
- "@type": "Question",
87
- "name": "Is there a Python SDK for A3M Router?",
88
- "acceptedAnswer": {
89
- "@type": "Answer",
90
- "text": "Yes. Install with pip install a3m-router. Use from a3m import A3MRouter for async or from a3m import A3MRouterSync for synchronous usage. The Python SDK supports chat, route, batch routing, streaming, and cost reporting."
91
- }
92
- },
93
- {
94
- "@type": "Question",
95
- "name": "What is the best lightweight LLM router?",
96
- "acceptedAnswer": {
97
- "@type": "Answer",
98
- "text": "A3M Router is the lightest LLM router at 19.5 KB gzipped with 99.5% \u00b11 tier accuracy. It requires no GPU, no ML model, and no external dependencies beyond nanoid. It includes a built-in OpenAI-compatible proxy, semantic cache, guardrails, and cost analytics \u2014 features that other routers lack."
99
- }
100
- }
101
- ]
102
- }</script>
103
-
104
- <!-- JSON-LD: BreadcrumbList -->
105
- <script type="application/ld+json">
106
- {
107
- "@context": "https://schema.org",
108
- "@type": "BreadcrumbList",
109
- "itemListElement": [
110
- {
111
- "@type": "ListItem",
112
- "position": 1,
113
- "name": "Home",
114
- "item": "https://das-rebel.github.io/adaptive-memory-multi-model-router/"
115
- }
116
- ]
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>A3M Router</title>
7
+ <style>
8
+ * { margin: 0; padding: 0; box-sizing: border-box; }
9
+ body {
10
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
11
+ background: #0d1117;
12
+ color: #c9d1d9;
13
+ min-height: 100vh;
14
+ line-height: 1.6;
117
15
  }
118
- </script>
119
-
120
- <style>
121
- * {
122
- margin: 0;
123
- padding: 0;
124
- box-sizing: border-box;
125
- }
126
-
127
- body {
128
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
129
- background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
130
- color: #fff;
131
- min-height: 100vh;
132
- }
133
-
134
- .container {
135
- max-width: 1200px;
136
- margin: 0 auto;
137
- padding: 2rem;
138
- }
139
-
140
- header {
141
- text-align: center;
142
- padding: 4rem 0;
143
- }
144
-
145
- .logo {
146
- width: 120px;
147
- height: 120px;
148
- margin: 0 auto 2rem;
149
- }
150
-
151
- h1 {
152
- font-size: 4rem;
153
- font-weight: 800;
154
- background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
155
- -webkit-background-clip: text;
156
- -webkit-text-fill-color: transparent;
157
- margin-bottom: 1rem;
158
- }
159
-
160
- .tagline {
161
- font-size: 1.5rem;
162
- color: #94a3b8;
163
- margin-bottom: 2rem;
164
- }
165
-
166
- .stats {
167
- display: flex;
168
- justify-content: center;
169
- gap: 3rem;
170
- margin: 3rem 0;
171
- flex-wrap: wrap;
172
- }
173
-
174
- .stat {
175
- text-align: center;
176
- padding: 1.5rem 2rem;
177
- background: rgba(255,255,255,0.05);
178
- border-radius: 16px;
179
- border: 1px solid rgba(255,255,255,0.1);
180
- }
181
-
182
- .stat-value {
183
- font-size: 2.5rem;
184
- font-weight: 700;
185
- color: #6366f1;
186
- }
187
-
188
- .stat-label {
189
- font-size: 0.9rem;
190
- color: #64748b;
191
- margin-top: 0.5rem;
192
- }
193
-
194
- .cta {
195
- display: flex;
196
- gap: 1rem;
197
- justify-content: center;
198
- margin: 3rem 0;
199
- flex-wrap: wrap;
200
- }
201
-
202
- .btn {
203
- padding: 1rem 2rem;
204
- border-radius: 12px;
205
- font-size: 1.1rem;
206
- font-weight: 600;
207
- text-decoration: none;
208
- transition: all 0.3s ease;
209
- }
210
-
211
- .btn-primary {
212
- background: linear-gradient(135deg, #6366f1, #8b5cf6);
213
- color: white;
214
- }
215
-
216
- .btn-primary:hover {
217
- transform: translateY(-2px);
218
- box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
219
- }
220
-
221
- .btn-secondary {
222
- background: rgba(255,255,255,0.1);
223
- color: white;
224
- border: 1px solid rgba(255,255,255,0.2);
225
- }
226
-
227
- .btn-secondary:hover {
228
- background: rgba(255,255,255,0.15);
229
- }
230
-
231
- .features {
232
- display: grid;
233
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
234
- gap: 2rem;
235
- margin: 4rem 0;
236
- }
237
-
238
- .feature {
239
- padding: 2rem;
240
- background: rgba(255,255,255,0.03);
241
- border-radius: 20px;
242
- border: 1px solid rgba(255,255,255,0.05);
243
- transition: all 0.3s ease;
244
- }
245
-
246
- .feature:hover {
247
- background: rgba(255,255,255,0.05);
248
- transform: translateY(-5px);
249
- }
250
-
251
- .feature-icon {
252
- font-size: 2.5rem;
253
- margin-bottom: 1rem;
254
- }
255
-
256
- .feature h2 {
257
- font-size: 1.3rem;
258
- margin-bottom: 0.5rem;
259
- color: #fff;
260
- }
261
-
262
- .feature p {
263
- color: #94a3b8;
264
- line-height: 1.6;
265
- }
266
-
267
- .code-section {
268
- margin: 4rem 0;
269
- text-align: center;
270
- }
271
-
272
- .code-block {
273
- background: #0f172a;
274
- border-radius: 16px;
275
- padding: 2rem;
276
- margin: 2rem auto;
277
- max-width: 800px;
278
- text-align: left;
279
- border: 1px solid rgba(255,255,255,0.1);
280
- overflow-x: auto;
281
- }
282
-
283
- .code-block pre {
284
- color: #e2e8f0;
285
- font-family: 'Monaco', 'Menlo', monospace;
286
- font-size: 0.95rem;
287
- line-height: 1.6;
288
- }
289
-
290
- .code-block .comment {
291
- color: #64748b;
292
- }
293
-
294
- .code-block .keyword {
295
- color: #c084fc;
296
- }
297
-
298
- .code-block .string {
299
- color: #4ade80;
300
- }
301
-
302
- .code-block .function {
303
- color: #60a5fa;
304
- }
305
-
306
- .providers-section {
307
- margin: 4rem 0;
308
- text-align: center;
309
- }
310
-
311
- .provider-tiers {
312
- display: grid;
313
- grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
314
- gap: 1.5rem;
315
- margin-top: 2rem;
316
- }
317
-
318
- .tier {
319
- padding: 1.5rem;
320
- background: rgba(255,255,255,0.03);
321
- border-radius: 16px;
322
- border: 1px solid rgba(255,255,255,0.08);
323
- text-align: left;
324
- }
325
-
326
- .tier h3 {
327
- font-size: 1.1rem;
328
- margin-bottom: 0.5rem;
329
- }
330
-
331
- .tier .price {
332
- color: #10b981;
333
- font-weight: 700;
334
- font-size: 1.2rem;
335
- margin-bottom: 0.5rem;
336
- }
337
-
338
- .tier ul {
339
- list-style: none;
340
- color: #94a3b8;
341
- font-size: 0.9rem;
342
- }
343
-
344
- .tier ul li {
345
- padding: 0.2rem 0;
346
- }
347
-
348
- .faq-section {
349
- margin: 4rem 0;
350
- }
351
-
352
- .faq-section h2 {
353
- text-align: center;
354
- font-size: 2.5rem;
355
- margin-bottom: 2rem;
356
- }
357
-
358
- .faq-item {
359
- max-width: 800px;
360
- margin: 1rem auto;
361
- padding: 1.5rem;
362
- background: rgba(255,255,255,0.03);
363
- border-radius: 12px;
364
- border: 1px solid rgba(255,255,255,0.08);
365
- }
366
-
367
- .faq-item h3 {
368
- font-size: 1.1rem;
369
- color: #6366f1;
370
- margin-bottom: 0.5rem;
371
- }
372
-
373
- .faq-item p {
374
- color: #94a3b8;
375
- line-height: 1.6;
376
- }
377
-
378
- footer {
379
- text-align: center;
380
- padding: 4rem 0;
381
- border-top: 1px solid rgba(255,255,255,0.1);
382
- margin-top: 4rem;
383
- }
384
-
385
- .links {
386
- display: flex;
387
- justify-content: center;
388
- gap: 2rem;
389
- margin-bottom: 2rem;
390
- }
391
-
392
- .links a {
393
- color: #94a3b8;
394
- text-decoration: none;
395
- transition: color 0.3s;
396
- }
397
-
398
- .links a:hover {
399
- color: #6366f1;
400
- }
401
-
402
- @media (max-width: 768px) {
403
- h1 {
404
- font-size: 2.5rem;
405
- }
406
-
407
- .stats {
408
- gap: 1rem;
409
- }
410
-
411
- .stat {
412
- padding: 1rem;
413
- }
414
-
415
- .stat-value {
416
- font-size: 1.8rem;
417
- }
418
- }
419
- </style>
16
+ a { color: #58a6ff; text-decoration: none; }
17
+ a:hover { text-decoration: underline; }
18
+ .container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
19
+ h1 { font-size: 48px; color: #fff; margin-bottom: 16px; letter-spacing: -1px; }
20
+ .tagline { font-size: 20px; color: #8b949e; margin-bottom: 40px; }
21
+ .badges { display: flex; gap: 12px; margin-bottom: 48px; flex-wrap: wrap; }
22
+ .badge { background: rgba(56,139,253,0.15); border: 1px solid rgba(56,139,253,0.4); color: #58a6ff; padding: 6px 14px; border-radius: 20px; font-size: 13px; }
23
+ .badge.green { background: rgba(46,160,67,0.15); border-color: rgba(46,160,67,0.4); color: #3fb950; }
24
+ .card { background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 28px; margin-bottom: 24px; }
25
+ .card h2 { color: #fff; font-size: 22px; margin-bottom: 12px; }
26
+ .card p { color: #8b949e; font-size: 15px; }
27
+ .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 40px 0; }
28
+ .feature { background: #161b22; border: 1px solid #30363d; border-radius: 10px; padding: 20px; }
29
+ .feature h3 { color: #fff; font-size: 16px; margin-bottom: 8px; }
30
+ .feature p { color: #8b949e; font-size: 14px; }
31
+ code { background: #161b22; border: 1px solid #30363d; padding: 16px 24px; border-radius: 8px; display: block; font-family: 'SF Mono', Monaco, monospace; color: #79c0ff; font-size: 14px; margin: 20px 0; }
32
+ .npm { color: #f0c000; }
33
+ .stats { display: flex; gap: 40px; margin: 40px 0; flex-wrap: wrap; }
34
+ .stat { text-align: center; }
35
+ .stat-value { font-size: 32px; font-weight: 700; color: #fff; }
36
+ .stat-label { font-size: 13px; color: #8b949e; }
37
+ footer { margin-top: 60px; padding-top: 30px; border-top: 1px solid #30363d; text-align: center; color: #8b949e; font-size: 14px; }
38
+ .emoji { font-size: 24px; margin-right: 8px; }
39
+ </style>
420
40
  </head>
421
41
  <body>
422
- <div class="container">
423
- <header>
424
- <div class="logo">
425
- <svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
426
- <defs>
427
- <linearGradient id="g1" x1="0%" y1="0%" x2="100%" y2="100%">
428
- <stop offset="0%" style="stop-color:#6366f1"/>
429
- <stop offset="100%" style="stop-color:#8b5cf6"/>
430
- </linearGradient>
431
- </defs>
432
- <circle cx="100" cy="100" r="80" fill="none" stroke="url(#g1)" stroke-width="2" opacity="0.3"/>
433
- <circle cx="100" cy="100" r="60" fill="url(#g1)" opacity="0.2"/>
434
- <circle cx="100" cy="100" r="25" fill="url(#g1)"/>
435
- <circle cx="100" cy="40" r="12" fill="#6366f1"/>
436
- <circle cx="152" cy="130" r="10" fill="#10b981"/>
437
- <circle cx="48" cy="130" r="10" fill="#f59e0b"/>
438
- <text x="100" y="108" font-size="14" font-weight="bold" fill="white" text-anchor="middle">A3M</text>
439
- </svg>
440
- </div>
441
- <h1>A3M Router</h1>
442
- <p class="tagline">Intelligent LLM Routing Proxy &mdash; Drop-in OpenAI Replacement<br>Route queries to the cheapest capable model &bull; Save 50-80% on API costs</p>
443
-
444
- <div class="stats">
445
- <div class="stat">
446
- <div class="stat-value">2,775</div>
447
- <div class="stat-label">Downloads in 3 Days</div>
448
- </div>
449
- <div class="stat">
450
- <div class="stat-value">245%</div>
451
- <div class="stat-label">Growth, Zero Budget</div>
452
- </div>
453
- <div class="stat">
454
- <div class="stat-value">39</div>
455
- <div class="stat-label">LLM Providers</div>
456
- </div>
457
- <div class="stat">
458
- <div class="stat-value">70%</div>
459
- <div class="stat-label">Cost Savings</div>
460
- </div>
461
- </div>
462
-
463
- <div class="cta">
464
- <a href="https://www.npmjs.com/package/adaptive-memory-multi-model-router" class="btn btn-primary">Install from NPM</a>
465
- <a href="https://github.com/Das-rebel/adaptive-memory-multi-model-router" class="btn btn-secondary">Star on GitHub</a>
466
- </div>
467
- </header>
468
-
469
- <section class="features">
470
- <div class="feature">
471
- <div class="feature-icon">&#x1F9E0;</div>
472
- <h2>Intelligent LLM Routing</h2>
473
- <p>Analyzes query complexity and routes to the cheapest capable model. Code queries go to code models. Simple queries use budget providers. Premium models only when needed.</p>
474
- </div>
475
- <div class="feature">
476
- <div class="feature-icon">&#x1F4B0;</div>
477
- <h2>Cost Optimization</h2>
478
- <p>Save 50-80% on API costs. Route simple queries to free tiers (Ollama, CommandCode) or cheap providers (Groq $0.59/1M tokens). Real-time cost analytics dashboard.</p>
479
- </div>
480
- <div class="feature">
481
- <div class="feature-icon">&#x1F504;</div>
482
- <h2>Smart Fallback &amp; Retry</h2>
483
- <p>When a provider fails, automatically retry with the next best option. Circuit breaker pattern keeps your app resilient. Zero downtime.</p>
484
- </div>
485
- <div class="feature">
486
- <div class="feature-icon">&#x1F4CA;</div>
487
- <h2>Real-time Analytics</h2>
488
- <p>Monitor spending across all providers in real-time. Set budgets. Get alerts. Cost analytics with savings reports. Never get surprised by an API bill again.</p>
489
- </div>
490
- <div class="feature">
491
- <div class="feature-icon">&#x1F512;</div>
492
- <h2>Security Guardrails</h2>
493
- <p>Built-in prompt injection detection, PII redaction, content filtering, and rate limiting. Production-ready security out of the box.</p>
494
- </div>
495
- <div class="feature">
496
- <div class="feature-icon">&#x26A1;</div>
497
- <h2>Semantic Cache</h2>
498
- <p>Trigram Jaccard similarity cache eliminates redundant API calls. Batch processing with automatic rate limiting for high-throughput applications.</p>
499
- </div>
500
- </section>
501
-
502
- <section class="providers-section">
503
- <h2>LLM Provider Pricing Tiers</h2>
504
- <p style="color: #94a3b8; margin-bottom: 2rem;">39 providers from free to premium. Always pick the cheapest capable option.</p>
505
- <div class="provider-tiers">
506
- <div class="tier">
507
- <h3>Free Tier</h3>
508
- <div class="price">$0 / 1M tokens</div>
509
- <ul>
510
- <li>CommandCode</li>
511
- <li>Ollama (local)</li>
512
- <li>LM Studio</li>
513
- <li>vLLM</li>
514
- </ul>
515
- </div>
516
- <div class="tier">
517
- <h3>Budget Tier</h3>
518
- <div class="price">$0.59 - $0.60 / 1M tokens</div>
519
- <ul>
520
- <li>Groq (Llama 3.3 70B)</li>
521
- <li>Cerebras (Llama 3.3 70B)</li>
522
- </ul>
523
- </div>
524
- <div class="tier">
525
- <h3>Mid Tier</h3>
526
- <div class="price">$1.50 - $2.80 / 1M tokens</div>
527
- <ul>
528
- <li>DeepSeek</li>
529
- <li>Mistral</li>
530
- <li>MiniMax</li>
531
- <li>Qwen / GLM-4</li>
532
- </ul>
533
- </div>
534
- <div class="tier">
535
- <h3>Premium Tier</h3>
536
- <div class="price">$10 - $30 / 1M tokens</div>
537
- <ul>
538
- <li>OpenAI (GPT-4o)</li>
539
- <li>Anthropic (Claude)</li>
540
- <li>Google (Gemini)</li>
541
- </ul>
542
- </div>
543
- </div>
544
- </section>
545
-
546
- <section class="code-section">
547
- <h2>Quick Start: LLM Routing in 30 Seconds</h2>
548
- <p style="color: #94a3b8; margin-bottom: 2rem;">One-line installation, instant routing. Drop-in replacement for api.openai.com.</p>
549
-
550
- <div class="code-block">
551
- <pre><span class="comment"># Install</span>
552
- npm install adaptive-memory-multi-model-router
553
-
554
- <span class="comment"># Start the OpenAI-compatible proxy</span>
555
- npx a3m-router serve
556
- <span class="comment"># Now listening on http://localhost:8787/v1</span>
557
-
558
- <span class="comment"># Or use programmatically</span>
559
- <span class="keyword">const</span> { <span class="function">createA3MRouter</span> } = <span class="function">require</span>(<span class="string">'adaptive-memory-multi-model-router'</span>);
560
- <span class="keyword">const</span> router = <span class="function">createA3MRouter</span>();
561
- <span class="keyword">const</span> result = <span class="keyword">await</span> router.<span class="function">route</span>(<span class="string">"Explain quantum computing"</span>);
562
- <span class="function">console</span>.<span class="function">log</span>(result.primary_model); <span class="comment">// "groq/llama-3.3-70b" (cheapest capable)</span>
563
- <span class="function">console</span>.<span class="function">log</span>(result.savings); <span class="comment">// "$0.024 saved vs GPT-4"</span></pre>
564
- </div>
565
- </section>
566
-
567
- <section class="faq-section">
568
- <h2>Frequently Asked Questions</h2>
569
- <div class="faq-item">
570
- <h3>What is A3M Router?</h3>
571
- <p>A3M Router is an OpenAI-compatible proxy that analyzes each LLM query and routes it to the cheapest capable provider. It supports 39 providers including Groq, Cerebras, OpenAI, Anthropic, DeepSeek, and free local models via Ollama. Drop-in replacement for api.openai.com.</p>
572
- </div>
573
- <div class="faq-item">
574
- <h3>How much can I save with A3M Router?</h3>
575
- <p>A3M Router saves 50-80% on LLM API costs by routing simple queries to cheap or free providers (Groq at $0.59/1M tokens, Cerebras at $0.60/1M tokens, or free via Ollama/CommandCode) while only using premium models like GPT-4 or Claude when query complexity requires it.</p>
576
- </div>
577
- <div class="faq-item">
578
- <h3>Is A3M Router free?</h3>
579
- <p>Yes, A3M Router is MIT-licensed open source software. It's free to use. You only pay for the underlying LLM API calls you route through it, and A3M Router minimizes those costs by selecting the cheapest capable provider.</p>
580
- </div>
581
- <div class="faq-item">
582
- <h3>How do I get started with A3M Router?</h3>
583
- <p>Install with <code>npm install adaptive-memory-multi-model-router</code>, then run <code>npx a3m-router serve</code> to start the OpenAI-compatible proxy on port 8787. Point your existing OpenAI SDK base URL to http://localhost:8787/v1 and you're done.</p>
584
- </div>
585
- <div class="faq-item">
586
- <h3>What LLM providers does A3M Router support?</h3>
587
- <p>39 providers including OpenAI, Anthropic (Claude), Google (Gemini), Groq, Cerebras, DeepSeek, Mistral, Fireworks, Together AI, Perplexity, Cohere, xAI (Grok), Ollama, OpenRouter, and more. Free options include CommandCode, Ollama, LM Studio, and vLLM.</p>
588
- </div>
589
- <div class="faq-item">
590
- <h3>How does A3M Router compare to LiteLLM?</h3>
591
- <p>A3M Router focuses on intelligent cost-based routing with semantic caching, guardrails, and real-time cost analytics built in. Unlike generic proxy tools, it actively analyzes query complexity to pick the cheapest capable model. Zero config needed for basic usage.</p>
592
- </div>
593
- </section>
594
-
595
- <footer>
596
- <div class="links">
597
- <a href="https://www.npmjs.com/package/adaptive-memory-multi-model-router">NPM</a>
598
- <a href="https://github.com/Das-rebel/adaptive-memory-multi-model-router">GitHub</a>
599
- <a href="https://github.com/Das-rebel/adaptive-memory-multi-model-router/issues">Issues</a>
600
- <a href="https://github.com/Das-rebel/adaptive-memory-multi-model-router/discussions">Discussions</a>
601
- <a href="https://github.com/Das-rebel/adaptive-memory-multi-model-router/blob/main/docs/API.md">API Docs</a>
602
- </div>
603
- <p style="color: #64748b;">MIT License &copy; 2026 A3M Router Team</p>
604
- </footer>
42
+ <div class="container">
43
+ <h1>🔀 A3M Router</h1>
44
+ <p class="tagline">One prompt in. The right model out.</p>
45
+
46
+ <div class="badges">
47
+ <span class="badge green">100% Routing Accuracy</span>
48
+ <span class="badge">47+ Providers</span>
49
+ <span class="badge">Zero ML</span>
50
+ <span class="badge">19.5KB</span>
51
+ <span class="badge">MIT License</span>
605
52
  </div>
53
+
54
+ <div class="card">
55
+ <h2>Quick Start</h2>
56
+ <code>npm install adaptive-memory-multi-model-router</code>
57
+ <code>npx a3m-router serve</code>
58
+ </div>
59
+
60
+ <div class="features">
61
+ <div class="feature">
62
+ <h3>💰 Cost Optimization</h3>
63
+ <p>Route simple queries to free tiers (Ollama, Groq) or budget providers ($0.59/1M tokens). Save 62% on API costs.</p>
64
+ </div>
65
+ <div class="feature">
66
+ <h3>🔄 Smart Fallback</h3>
67
+ <p>When a provider fails, automatically retry with the next best option. Circuit breaker pattern keeps your app resilient.</p>
68
+ </div>
69
+ <div class="feature">
70
+ <h3>📊 Semantic Cache</h3>
71
+ <p>Trigram Jaccard similarity cache eliminates redundant API calls with 95%+ hit rate.</p>
72
+ </div>
73
+ <div class="feature">
74
+ <h3>🔒 Security Guardrails</h3>
75
+ <p>Built-in prompt injection detection, PII redaction, content filtering, and rate limiting.</p>
76
+ </div>
77
+ </div>
78
+
79
+ <div class="stats">
80
+ <div class="stat">
81
+ <div class="stat-value">100%</div>
82
+ <div class="stat-label">Routing Accuracy</div>
83
+ </div>
84
+ <div class="stat">
85
+ <div class="stat-value">62%</div>
86
+ <div class="stat-label">Cost Savings</div>
87
+ </div>
88
+ <div class="stat">
89
+ <div class="stat-value">47+</div>
90
+ <div class="stat-label">Providers</div>
91
+ </div>
92
+ <div class="stat">
93
+ <div class="stat-value">19.5KB</div>
94
+ <div class="stat-label">Package Size</div>
95
+ </div>
96
+ </div>
97
+
98
+ <div class="card">
99
+ <h2>Provider Tiers</h2>
100
+ <p><strong>Free:</strong> Ollama, CommandCode, LM Studio<br>
101
+ <strong>Budget ($0.59-0.60/1M):</strong> Groq, Cerebras<br>
102
+ <strong>Mid ($1.50-2.80/1M):</strong> DeepSeek, Mistral, Qwen<br>
103
+ <strong>Premium ($10-30/1M):</strong> OpenAI, Anthropic, Google</p>
104
+ </div>
105
+
106
+ <div class="card">
107
+ <h2>Links</h2>
108
+ <p>
109
+ <a href="https://github.com/Das-rebel/adaptive-memory-multi-model-router">GitHub</a> •
110
+ <a href="https://www.npmjs.com/package/adaptive-memory-multi-model-router">npm</a> •
111
+ <a href="https://das-rebel.github.io/adaptive-memory-multi-model-router/">Docs</a>
112
+ </p>
113
+ </div>
114
+
115
+ <footer>
116
+ <p>Open-source LLM Gateway • MIT License • No GPU Required</p>
117
+ </footer>
118
+ </div>
606
119
  </body>
607
- </html>
120
+ </html>