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/demo.html ADDED
@@ -0,0 +1,520 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>A3M Router - 90 Second Demo</title>
7
+ <style>
8
+ * { margin: 0; padding: 0; box-sizing: border-box; }
9
+
10
+ body {
11
+ background: #0d1117;
12
+ color: #e6edf3;
13
+ font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, monospace;
14
+ min-height: 100vh;
15
+ display: flex;
16
+ flex-direction: column;
17
+ align-items: center;
18
+ justify-content: center;
19
+ padding: 20px;
20
+ }
21
+
22
+ .container {
23
+ max-width: 1000px;
24
+ width: 100%;
25
+ }
26
+
27
+ .header {
28
+ text-align: center;
29
+ margin-bottom: 30px;
30
+ }
31
+
32
+ .header h1 {
33
+ font-size: 2rem;
34
+ color: #58a6ff;
35
+ margin-bottom: 8px;
36
+ }
37
+
38
+ .header .tagline {
39
+ color: #8b949e;
40
+ font-size: 1rem;
41
+ }
42
+
43
+ .terminal {
44
+ background: #161b22;
45
+ border: 1px solid #30363d;
46
+ border-radius: 12px;
47
+ overflow: hidden;
48
+ box-shadow: 0 8px 32px rgba(0,0,0,0.4);
49
+ }
50
+
51
+ .terminal-header {
52
+ background: #21262d;
53
+ padding: 12px 16px;
54
+ display: flex;
55
+ align-items: center;
56
+ gap: 8px;
57
+ border-bottom: 1px solid #30363d;
58
+ }
59
+
60
+ .terminal-dot {
61
+ width: 12px;
62
+ height: 12px;
63
+ border-radius: 50%;
64
+ }
65
+
66
+ .dot-red { background: #ff5f56; }
67
+ .dot-yellow { background: #ffbd2e; }
68
+ .dot-green { background: #27ca40; }
69
+
70
+ .terminal-title {
71
+ flex: 1;
72
+ text-align: center;
73
+ color: #8b949e;
74
+ font-size: 0.85rem;
75
+ }
76
+
77
+ .terminal-body {
78
+ padding: 20px;
79
+ min-height: 500px;
80
+ position: relative;
81
+ }
82
+
83
+ .scene {
84
+ display: none;
85
+ animation: fadeIn 0.3s ease;
86
+ }
87
+
88
+ .scene.active {
89
+ display: block;
90
+ }
91
+
92
+ @keyframes fadeIn {
93
+ from { opacity: 0; transform: translateY(10px); }
94
+ to { opacity: 1; transform: translateY(0); }
95
+ }
96
+
97
+ .line {
98
+ margin: 4px 0;
99
+ line-height: 1.6;
100
+ }
101
+
102
+ .comment { color: #8b949e; }
103
+ .keyword { color: #ff7b72; }
104
+ .string { color: #a5d6ff; }
105
+ .function { color: #d2a8ff; }
106
+ .number { color: #79c0ff; }
107
+ .operator { color: #ff7b72; }
108
+
109
+ .success { color: #3fb950; }
110
+ .error { color: #f85149; }
111
+ .warning { color: #d29922; }
112
+ .info { color: #58a6ff; }
113
+ .muted { color: #8b949e; }
114
+
115
+ .progress-bar {
116
+ height: 4px;
117
+ background: #21262d;
118
+ border-radius: 2px;
119
+ margin-top: 20px;
120
+ overflow: hidden;
121
+ }
122
+
123
+ .progress-fill {
124
+ height: 100%;
125
+ background: linear-gradient(90deg, #58a6ff, #a371f7);
126
+ width: 0%;
127
+ transition: width 0.3s ease;
128
+ }
129
+
130
+ .controls {
131
+ display: flex;
132
+ justify-content: center;
133
+ gap: 12px;
134
+ margin-top: 20px;
135
+ }
136
+
137
+ .btn {
138
+ background: #238636;
139
+ color: white;
140
+ border: none;
141
+ padding: 10px 24px;
142
+ border-radius: 6px;
143
+ cursor: pointer;
144
+ font-size: 0.9rem;
145
+ font-family: inherit;
146
+ transition: background 0.2s;
147
+ }
148
+
149
+ .btn:hover { background: #2ea043; }
150
+ .btn:disabled { background: #484f58; cursor: not-allowed; }
151
+
152
+ .btn-secondary {
153
+ background: #21262d;
154
+ border: 1px solid #30363d;
155
+ }
156
+
157
+ .btn-secondary:hover { background: #30363d; }
158
+
159
+ .scene-indicator {
160
+ display: flex;
161
+ justify-content: center;
162
+ gap: 8px;
163
+ margin-top: 16px;
164
+ }
165
+
166
+ .dot {
167
+ width: 8px;
168
+ height: 8px;
169
+ border-radius: 50%;
170
+ background: #30363d;
171
+ transition: background 0.3s;
172
+ }
173
+
174
+ .dot.active { background: #58a6ff; }
175
+
176
+ .time-display {
177
+ text-align: center;
178
+ color: #8b949e;
179
+ margin-top: 12px;
180
+ font-size: 0.85rem;
181
+ }
182
+
183
+ .highlight-box {
184
+ background: #161b22;
185
+ border: 1px solid #30363d;
186
+ border-radius: 8px;
187
+ padding: 16px;
188
+ margin: 16px 0;
189
+ }
190
+
191
+ .highlight-box.success { border-color: #238636; }
192
+
193
+ .ascii-box {
194
+ background: #0d1117;
195
+ border: 1px solid #30363d;
196
+ border-radius: 6px;
197
+ padding: 12px;
198
+ font-size: 0.85rem;
199
+ white-space: pre;
200
+ overflow-x: auto;
201
+ }
202
+
203
+ .cost-compare {
204
+ display: flex;
205
+ gap: 20px;
206
+ margin: 16px 0;
207
+ }
208
+
209
+ .cost-col {
210
+ flex: 1;
211
+ padding: 16px;
212
+ border-radius: 8px;
213
+ text-align: center;
214
+ }
215
+
216
+ .cost-without {
217
+ background: rgba(248, 81, 73, 0.1);
218
+ border: 1px solid rgba(248, 81, 73, 0.3);
219
+ }
220
+
221
+ .cost-with {
222
+ background: rgba(63, 185, 80, 0.1);
223
+ border: 1px solid rgba(63, 185, 80, 0.3);
224
+ }
225
+
226
+ .cost-value {
227
+ font-size: 1.5rem;
228
+ font-weight: bold;
229
+ margin: 8px 0;
230
+ }
231
+
232
+ .cost-without .cost-value { color: #f85149; }
233
+ .cost-with .cost-value { color: #3fb950; }
234
+
235
+ .install-box {
236
+ background: #161b22;
237
+ border: 2px solid #58a6ff;
238
+ border-radius: 12px;
239
+ padding: 24px;
240
+ text-align: center;
241
+ }
242
+
243
+ .install-cmd {
244
+ background: #0d1117;
245
+ padding: 12px 24px;
246
+ border-radius: 6px;
247
+ font-size: 1.1rem;
248
+ color: #3fb950;
249
+ margin: 12px 0;
250
+ border: 1px solid #30363d;
251
+ }
252
+
253
+ .footer {
254
+ text-align: center;
255
+ margin-top: 30px;
256
+ color: #8b949e;
257
+ font-size: 0.85rem;
258
+ }
259
+
260
+ .footer a {
261
+ color: #58a6ff;
262
+ text-decoration: none;
263
+ }
264
+
265
+ .footer a:hover {
266
+ text-decoration: underline;
267
+ }
268
+ </style>
269
+ </head>
270
+ <body>
271
+ <div class="container">
272
+ <div class="header">
273
+ <h1>🔀 A3M Router</h1>
274
+ <p class="tagline">One prompt in. The right model out.</p>
275
+ </div>
276
+
277
+ <div class="terminal">
278
+ <div class="terminal-header">
279
+ <div class="terminal-dot dot-red"></div>
280
+ <div class="terminal-dot dot-yellow"></div>
281
+ <div class="terminal-dot dot-green"></div>
282
+ <div class="terminal-title">a3m-demo — 90-second walkthrough</div>
283
+ </div>
284
+
285
+ <div class="terminal-body" id="terminal">
286
+ <!-- Scene 1: Without A3M -->
287
+ <div class="scene active" id="scene-1">
288
+ <div class="line comment">#!/bin/bash</div>
289
+ <div class="line comment"># Your LLM app today</div>
290
+ <div class="line"></div>
291
+ <div class="line keyword">const</span> response = <span class="keyword">await</span> openai.chat.completions.create({</div>
292
+ <div class="line"> model: <span class="string">"gpt-4o"</span>, <span class="comment">// Always expensive</span></div>
293
+ <div class="line"> messages: [{ role: <span class="string">"user"</span>, content: <span class="string">"Explain quantum entanglement"</span> }]</div>
294
+ <div class="line">});</div>
295
+ <div class="line"></div>
296
+ <div class="highlight-box" style="border-color: #f85149;">
297
+ <div class="line error">❌ Problem: $0.015 per request</div>
298
+ <div class="line error">❌ No fallback if OpenAI goes down</div>
299
+ <div class="line error">❌ Manual model selection forever</div>
300
+ </div>
301
+ </div>
302
+
303
+ <!-- Scene 2: With A3M -->
304
+ <div class="scene" id="scene-2">
305
+ <div class="line comment"># With A3M: one line change</div>
306
+ <div class="line keyword">const</span> response = <span class="keyword">await</span> fetch(<span class="string">"http://localhost:8787/v1/chat/completions"</span>, {</div>
307
+ <div class="line"> method: <span class="string">"POST"</span>,</div>
308
+ <div class="line"> headers: { <span class="string">"Content-Type"</span>: <span class="string">"application/json"</span> },</div>
309
+ <div class="line"> body: JSON.stringify({</div>
310
+ <div class="line"> model: <span class="string">"auto"</span>, <span class="comment">// ← A3M picks the best</span></div>
311
+ <div class="line"> messages: [{ role: <span class="string">"user"</span>, content: <span class="string">"Explain quantum entanglement"</span> }]</div>
312
+ <div class="line"> })</div>
313
+ <div class="line">});</div>
314
+ <div class="line"></div>
315
+ <div class="highlight-box success">
316
+ <div class="line info">📊 Task: explanation → Complexity: simple → Budget: minimize</div>
317
+ <div class="line success">✅ Routed to: Groq (FREE, 847ms)</div>
318
+ <div class="line muted"> Cost: $0.00 | Quality: 94%</div>
319
+ </div>
320
+ </div>
321
+
322
+ <!-- Scene 3: Failover -->
323
+ <div class="scene" id="scene-3">
324
+ <div class="line comment"># A3M gracefully handles provider failures...</div>
325
+ <div class="line"></div>
326
+ <div class="ascii-box">
327
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
328
+ [Groq] — Attempting connection...
329
+ [Groq] — ✗ FAILED — 503 Service Unavailable
330
+ [Circuit Breaker] — Tripped after 3 failures
331
+ [DeepSeek] — HEALTHY — Switching...
332
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
333
+ </div>
334
+ <div class="line"></div>
335
+ <div class="highlight-box success">
336
+ <div class="line success">✅ Response delivered via DeepSeek fallback</div>
337
+ <div class="line muted"> Your app: never knew there was a problem</div>
338
+ </div>
339
+ </div>
340
+
341
+ <!-- Scene 4: Cost Comparison -->
342
+ <div class="scene" id="scene-4">
343
+ <div class="line comment"># Same query. Dramatically different costs.</div>
344
+ <div class="line"></div>
345
+ <div class="cost-compare">
346
+ <div class="cost-col cost-without">
347
+ <div class="muted">WITHOUT A3M</div>
348
+ <div class="cost-value">$0.0015</div>
349
+ <div class="muted">GPT-4o @ $3.00/1K</div>
350
+ <div class="muted">500 tokens</div>
351
+ </div>
352
+ <div class="cost-col cost-with">
353
+ <div class="muted">WITH A3M</div>
354
+ <div class="cost-value">$0.00</div>
355
+ <div class="muted">Groq @ $0.00/1K</div>
356
+ <div class="muted">500 tokens</div>
357
+ </div>
358
+ </div>
359
+ <div class="highlight-box success">
360
+ <div class="line success">💰 SAVINGS: 100% per query</div>
361
+ <div class="line"> At 1000 queries/day → <strong>$1.50 saved daily</strong></div>
362
+ <div class="line"> At 1000 queries/day → <strong>$547 saved yearly</strong></div>
363
+ </div>
364
+ </div>
365
+
366
+ <!-- Scene 5: One Command -->
367
+ <div class="scene" id="scene-5">
368
+ <div class="install-box">
369
+ <div class="line" style="color: #58a6ff; font-size: 1.1rem;">Get started in 10 seconds:</div>
370
+ <div class="install-cmd">npm install -g adaptive-memory-multi-model-router</div>
371
+ <div class="line muted"># Auto-detects your API keys, zero config</div>
372
+ <div class="install-cmd" style="color: #58a6ff;">npx a3m-router serve</div>
373
+ <div class="line muted"># Change: model: 'gpt-4o' → model: 'auto'</div>
374
+ </div>
375
+ <div class="line"></div>
376
+ <div class="highlight-box">
377
+ <div class="line info">🔗 github.com/Das-rebel/adaptive-memory-multi-model-router</div>
378
+ <div class="line info">📦 npmjs.com/package/adaptive-memory-multi-model-router</div>
379
+ </div>
380
+ <div class="line" style="text-align: center; margin-top: 24px; color: #a371f7; font-size: 1.1rem;">
381
+ ✨ One prompt in. The right model out. ✨
382
+ </div>
383
+ </div>
384
+ </div>
385
+
386
+ <div class="progress-bar">
387
+ <div class="progress-fill" id="progress"></div>
388
+ </div>
389
+
390
+ <div class="scene-indicator" id="dots">
391
+ <div class="dot active" data-scene="1"></div>
392
+ <div class="dot" data-scene="2"></div>
393
+ <div class="dot" data-scene="3"></div>
394
+ <div class="dot" data-scene="4"></div>
395
+ <div class="dot" data-scene="5"></div>
396
+ </div>
397
+
398
+ <div class="time-display">
399
+ <span id="current-time">0</span>s / ~90s
400
+ </div>
401
+ </div>
402
+
403
+ <div class="controls">
404
+ <button class="btn" id="playBtn">▶ Play Demo</button>
405
+ <button class="btn btn-secondary" id="resetBtn">↺ Reset</button>
406
+ </div>
407
+
408
+ <div class="footer">
409
+ <p>Open Source LLM Router • 47+ Providers • Budget Enforcement • Semantic Cache</p>
410
+ </div>
411
+ </div>
412
+
413
+ <script>
414
+ const scenes = 5;
415
+ const sceneDuration = 15000; // 15 seconds per scene
416
+ let currentScene = 1;
417
+ let timer = null;
418
+
419
+ const progress = document.getElementById('progress');
420
+ const currentTimeEl = document.getElementById('current-time');
421
+ const playBtn = document.getElementById('playBtn');
422
+ const resetBtn = document.getElementById('resetBtn');
423
+ const dots = document.querySelectorAll('.dot');
424
+
425
+ function showScene(n) {
426
+ // Hide all scenes
427
+ document.querySelectorAll('.scene').forEach(s => s.classList.remove('active'));
428
+
429
+ // Show target scene
430
+ const scene = document.getElementById(`scene-${n}`);
431
+ if (scene) scene.classList.add('active');
432
+
433
+ // Update dots
434
+ dots.forEach(d => d.classList.remove('active'));
435
+ document.querySelector(`.dot[data-scene="${n}"]`)?.classList.add('active');
436
+
437
+ currentScene = n;
438
+
439
+ // Update progress
440
+ const pct = ((n - 1) / (scenes - 1)) * 100;
441
+ progress.style.width = `${pct}%`;
442
+
443
+ // Update time
444
+ currentTimeEl.textContent = (n - 1) * 15;
445
+ }
446
+
447
+ function nextScene() {
448
+ if (currentScene < scenes) {
449
+ showScene(currentScene + 1);
450
+ return true;
451
+ }
452
+ return false;
453
+ }
454
+
455
+ function startDemo() {
456
+ if (timer) return;
457
+
458
+ playBtn.disabled = true;
459
+ showScene(1);
460
+
461
+ timer = setInterval(() => {
462
+ if (!nextScene()) {
463
+ clearInterval(timer);
464
+ timer = null;
465
+ playBtn.disabled = false;
466
+ playBtn.textContent = '✓ Demo Complete';
467
+ currentTimeEl.textContent = '90';
468
+ progress.style.width = '100%';
469
+ }
470
+ }, sceneDuration);
471
+ }
472
+
473
+ function resetDemo() {
474
+ if (timer) {
475
+ clearInterval(timer);
476
+ timer = null;
477
+ }
478
+ showScene(1);
479
+ playBtn.disabled = false;
480
+ playBtn.textContent = '▶ Play Demo';
481
+ currentTimeEl.textContent = '0';
482
+ }
483
+
484
+ playBtn.addEventListener('click', startDemo);
485
+ resetBtn.addEventListener('click', resetDemo);
486
+
487
+ // Click on dots to jump to scene
488
+ dots.forEach(dot => {
489
+ dot.addEventListener('click', () => {
490
+ const n = parseInt(dot.dataset.scene);
491
+ if (timer) {
492
+ clearInterval(timer);
493
+ timer = null;
494
+ }
495
+ showScene(n);
496
+ playBtn.disabled = false;
497
+ playBtn.textContent = '▶ Play Demo';
498
+ });
499
+ });
500
+
501
+ // Keyboard controls
502
+ document.addEventListener('keydown', (e) => {
503
+ if (e.code === 'Space') {
504
+ e.preventDefault();
505
+ if (timer) {
506
+ resetDemo();
507
+ } else {
508
+ startDemo();
509
+ }
510
+ }
511
+ if (e.code === 'ArrowRight' && !timer) {
512
+ if (currentScene < scenes) showScene(currentScene + 1);
513
+ }
514
+ if (e.code === 'ArrowLeft' && !timer) {
515
+ if (currentScene > 1) showScene(currentScene - 1);
516
+ }
517
+ });
518
+ </script>
519
+ </body>
520
+ </html>