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

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 (80) hide show
  1. package/.env +2 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +13 -40
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +10 -27
  4. package/.github/workflows/ci.yml +8 -49
  5. package/.github/workflows/pages.yml +37 -0
  6. package/Awesome-LLM/LICENSE.md +121 -0
  7. package/Awesome-LLM/README.md +625 -0
  8. package/Awesome-LLM/contributing.md +24 -0
  9. package/Awesome-LLM/paper_list/RLHF.md +1 -0
  10. package/Awesome-LLM/paper_list/Retrieval_Augmented_Generation.md +6 -0
  11. package/Awesome-LLM/paper_list/acceleration.md +10 -0
  12. package/Awesome-LLM/paper_list/alignment.md +20 -0
  13. package/Awesome-LLM/paper_list/application.md +19 -0
  14. package/Awesome-LLM/paper_list/augmentation.md +14 -0
  15. package/Awesome-LLM/paper_list/chain_of_thougt.md +16 -0
  16. package/Awesome-LLM/paper_list/code_pretraining.md +0 -0
  17. package/Awesome-LLM/paper_list/detection.md +11 -0
  18. package/Awesome-LLM/paper_list/evaluation.md +64 -0
  19. package/Awesome-LLM/paper_list/in_context_learning.md +4 -0
  20. package/Awesome-LLM/paper_list/instruction-tuning.md +35 -0
  21. package/Awesome-LLM/paper_list/moe.md +0 -0
  22. package/Awesome-LLM/paper_list/prompt_learning.md +15 -0
  23. package/Awesome-LLM/resources/DeepSpeed_light.svg +27 -0
  24. package/Awesome-LLM/resources/alpa-logo-cropped.png +0 -0
  25. package/Awesome-LLM/resources/colossal-ai_logo_vertical.png +0 -0
  26. package/Awesome-LLM/resources/creepy_llm.jpeg +0 -0
  27. package/Awesome-LLM/resources/image8.gif +0 -0
  28. package/Awesome-LLM/resources/jax_logo_250px.png +0 -0
  29. package/Awesome-LLM/resources/logo.png +0 -0
  30. package/Awesome-LLM/resources/nvidia.png +0 -0
  31. package/Awesome-LLM/resources/tensorflow.png +0 -0
  32. 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
  33. package/README.md +5 -4
  34. package/SUBMISSIONS.md +43 -0
  35. package/assets/chart-cost-v2.svg +91 -0
  36. package/assets/chart-cost-v3.svg +143 -0
  37. package/assets/chart-features-v2.svg +132 -0
  38. package/assets/chart-features-v3.svg +211 -0
  39. package/assets/chart-growth-v2.svg +122 -0
  40. package/assets/chart-growth-v3.svg +189 -0
  41. package/assets/cost-simple.svg +64 -0
  42. package/assets/growth-simple.svg +69 -0
  43. package/assets/hero-diagram.svg +81 -0
  44. package/assets/logo-new.svg +21 -0
  45. package/assets/social-preview-new.svg +100 -0
  46. package/assets/social-v2.svg +130 -0
  47. package/assets/social-v3.svg +212 -0
  48. package/awesome-ai-gateways/CONTRIBUTING.md +49 -0
  49. package/awesome-ai-gateways/LICENSE +3 -0
  50. package/awesome-ai-gateways/README.md +190 -0
  51. package/awesome-selfhosted/.github/ISSUE_TEMPLATE/config.yml +5 -0
  52. package/awesome-selfhosted/.github/PULL_REQUEST_TEMPLATE.md +1 -0
  53. package/awesome-selfhosted/LICENSE +376 -0
  54. package/awesome-selfhosted/README.md +2303 -0
  55. package/awesome-selfhosted/_static/awesome.png +0 -0
  56. package/awesome-selfhosted/non-free.md +377 -0
  57. package/demo-new.tape +71 -0
  58. package/demo-real.sh +198 -0
  59. package/demo-simple.tape +205 -0
  60. package/demo.html +520 -0
  61. package/demo.tape +259 -0
  62. package/dist/cli/setupWizard.d.ts +136 -0
  63. package/dist/cli/setupWizard.js +142 -165
  64. package/dist/cli/setupWizard.js.map +1 -0
  65. package/dist/cli/tui.js +152 -0
  66. package/dist/providers/providerConfig.js +28 -1
  67. package/dist/providers/providerConfig.js.map +1 -1
  68. package/dist/server/proxyServer.js +15 -0
  69. package/docs/QUICK_START.md +43 -0
  70. package/docs/USE_CASES.md +59 -0
  71. package/docs/demo-auto.html +264 -0
  72. package/docs/demo.html +416 -0
  73. package/docs/index.html +112 -599
  74. package/index.html +667 -0
  75. package/package.json +26 -169
  76. package/src/providers/providerConfig.ts +29 -1
  77. package/docs/assets/cost-comparison.svg +0 -134
  78. package/docs/assets/growth-chart-animated.svg +0 -76
  79. package/docs/assets/og-banner.svg +0 -194
  80. package/docs/assets/social-preview.svg +0 -194
package/demo.tape ADDED
@@ -0,0 +1,259 @@
1
+ # A3M Router VHS Demo - 90 Second Terminal Demo
2
+ # Target: 60-90 seconds
3
+ # Output: a3m-demo.gif
4
+
5
+ # =============================================================================
6
+ # SETUP
7
+ # =============================================================================
8
+
9
+ Output demo.gif
10
+ Set FontSize 16
11
+ Set Width 1200
12
+ Set Height 675
13
+ Set TypingSpeed 30ms
14
+ Set Shell bash
15
+ Set FontFamily "JetBrains Mono"
16
+
17
+ # Theme - dark terminal
18
+ Set ThemeFlavor catppuccin-mocha
19
+
20
+ # =============================================================================
21
+ # SCENE 1: THE PROBLEM (0-15s)
22
+ # =============================================================================
23
+
24
+ Type "#!/bin/bash"
25
+ Enter
26
+
27
+ Sleep 500ms
28
+
29
+ Type "# Your LLM app today — costs $0.015 per request, no fallback"
30
+ Enter
31
+
32
+ Type "cat << 'EOF'"
33
+ Enter
34
+ Sleep 100ms
35
+ Type "// Without A3M: you manage everything manually"
36
+ Enter
37
+ Type "const response = await openai.chat.completions.create({"
38
+ Enter
39
+ Type " model: \"gpt-4o\", // Always expensive"
40
+ Enter
41
+ Type " messages: [{ role: \"user\", content: \"Explain quantum entanglement\" }]"
42
+ Enter
43
+ Type "});"
44
+ Enter
45
+ Type "// If OpenAI goes down → your app crashes"
46
+ Enter
47
+ Type "// You pay $0.015 per request forever"
48
+ Enter
49
+ Type "EOF"
50
+ Enter
51
+
52
+ Sleep 1s
53
+
54
+ # Red X marks
55
+ Type "echo \"❌ Problem: $0.015/req, no fallback, manual management\""
56
+ Enter
57
+
58
+ Sleep 2s
59
+
60
+ # =============================================================================
61
+ # SCENE 2: WITH A3M - ONE LINE CHANGE (15-35s)
62
+ # =============================================================================
63
+
64
+ Ctrl+L
65
+ Sleep 500ms
66
+
67
+ Type "# With A3M: one line change, infinite benefits"
68
+ Enter
69
+
70
+ Type "cat << 'EOF'"
71
+ Enter
72
+ Sleep 100ms
73
+ Type "// Same request with A3M router"
74
+ Enter
75
+ Type "const response = await fetch(\"http://localhost:8787/v1/chat/completions\", {"
76
+ Enter
77
+ Type " method: \"POST\","
78
+ Enter
79
+ Type " headers: { \"Content-Type\": \"application/json\" },"
80
+ Enter
81
+ Type " body: JSON.stringify({"
82
+ Enter
83
+ Type " model: \"auto\", // ← A3M picks the best model"
84
+ Enter
85
+ Type " messages: [{ role: \"user\", content: \"Explain quantum entanglement\" }]"
86
+ Enter
87
+ Type " })"
88
+ Enter
89
+ Type "});"
90
+ Enter
91
+ Type "EOF"
92
+ Enter
93
+
94
+ Sleep 1s
95
+
96
+ # Show routing decision
97
+ Enter
98
+ Type "# A3M analyzes and decides:"
99
+ Enter
100
+ Sleep 200ms
101
+ Type "echo \"📊 Task: explanation → Complexity: simple → Budget: minimize\""
102
+ Enter
103
+ Sleep 500ms
104
+ Type "echo \"\""
105
+ Enter
106
+ Sleep 200ms
107
+ Type "echo \"✅ Routed to: Groq (FREE, 847ms)\""
108
+ Enter
109
+ Sleep 500ms
110
+ Type "echo \" Cost: $0.00 | Quality: 94%\""
111
+ Enter
112
+
113
+ Sleep 2s
114
+
115
+ # =============================================================================
116
+ # SCENE 3: FAILURE RECOVERY (35-55s)
117
+ # =============================================================================
118
+
119
+ Ctrl+L
120
+ Sleep 500ms
121
+
122
+ Type "# But what happens when a provider fails?"
123
+ Enter
124
+ Sleep 1s
125
+
126
+ Type "# A3M gracefully handles failures..."
127
+ Enter
128
+
129
+ Sleep 1s
130
+
131
+ # Simulate the failure scenario
132
+ Type "echo \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\""
133
+ Enter
134
+ Sleep 300ms
135
+ Type "echo \" [Groq] — Attempting connection...\""
136
+ Enter
137
+ Sleep 1s
138
+ Type "echo \" [Groq] — ✗ FAILED — 503 Service Unavailable\""
139
+ Enter
140
+ Sleep 500ms
141
+ Type "echo \" [Circuit Breaker] — Tripped after 3 failures\""
142
+ Enter
143
+ Sleep 500ms
144
+ Type "echo \" [DeepSeek] — HEALTHY — Switching...\""
145
+ Enter
146
+ Sleep 1s
147
+ Type "echo \"\""
148
+ Enter
149
+ Sleep 300ms
150
+ Type "echo \"✅ Response delivered via DeepSeek fallback\""
151
+ Enter
152
+ Sleep 500ms
153
+ Type "echo \" Your app: never knew there was a problem\""
154
+ Enter
155
+ Sleep 500ms
156
+ Type "echo \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\""
157
+ Enter
158
+
159
+ Sleep 2s
160
+
161
+ # =============================================================================
162
+ # SCENE 4: COST SAVINGS (55-70s)
163
+ # =============================================================================
164
+
165
+ Ctrl+L
166
+ Sleep 500ms
167
+
168
+ Type "# Same query. Dramatically different costs."
169
+ Enter
170
+ Sleep 500ms
171
+
172
+ Type "echo \"\""
173
+ Enter
174
+ Sleep 200ms
175
+ Type "echo \" WITHOUT A3M WITH A3M\""
176
+ Enter
177
+ Sleep 200ms
178
+ Type "echo \" ───────────────── ────────────────\""
179
+ Enter
180
+ Sleep 200ms
181
+ Type "echo \" GPT-4o @ $3.00/1K Groq @ $0.00/1K\""
182
+ Enter
183
+ Sleep 200ms
184
+ Type "echo \" 500 tokens = $0.0015 500 tokens = $0.00\""
185
+ Enter
186
+ Sleep 1s
187
+ Type "echo \"\""
188
+ Enter
189
+ Sleep 200ms
190
+ Type "echo \"💰 SAVINGS: 100% per query\""
191
+ Enter
192
+ Sleep 300ms
193
+ Type "echo \" At 1000 queries/day → $1.50 saved daily\""
194
+ Enter
195
+ Sleep 300ms
196
+ Type "echo \" At 1000 queries/day → $547 saved yearly\""
197
+ Enter
198
+
199
+ Sleep 2s
200
+
201
+ # =============================================================================
202
+ # SCENE 5: ONE COMMAND (70-90s)
203
+ # =============================================================================
204
+
205
+ Ctrl+L
206
+ Sleep 500ms
207
+
208
+ Type "echo \"\""
209
+ Enter
210
+ Sleep 200ms
211
+ Type "echo \"╔═══════════════════════════════════════════════════╗\""
212
+ Enter
213
+ Sleep 100ms
214
+ Type "echo \"║ Get started in 10 seconds: ║\""
215
+ Enter
216
+ Sleep 100ms
217
+ Type "echo \"╚═══════════════════════════════════════════════════╝\""
218
+ Enter
219
+ Sleep 500ms
220
+ Type "echo \"\""
221
+ Enter
222
+ Sleep 200ms
223
+ Type "echo \" npm install -g adaptive-memory-multi-model-router\""
224
+ Enter
225
+ Sleep 300ms
226
+ Type "echo \"\""
227
+ Enter
228
+ Sleep 200ms
229
+ Type "echo \" # Auto-detects your API keys, zero config\""
230
+ Enter
231
+ Sleep 300ms
232
+ Type "echo \" npx a3m-router serve\""
233
+ Enter
234
+ Sleep 500ms
235
+ Type "echo \"\""
236
+ Enter
237
+ Sleep 200ms
238
+ Type "echo \" # Change: model: 'gpt-4o' → model: 'auto'\""
239
+ Enter
240
+ Sleep 500ms
241
+ Type "echo \"\""
242
+ Enter
243
+ Sleep 300ms
244
+ Type "echo \" GitHub: github.com/Das-rebel/adaptive-memory-multi-model-router\""
245
+ Enter
246
+ Sleep 200ms
247
+ Type "echo \" npm: npmjs.com/package/adaptive-memory-multi-model-router\""
248
+ Enter
249
+
250
+ Sleep 2s
251
+
252
+ # Final pulse effect
253
+ Type "echo \"\""
254
+ Enter
255
+ Sleep 200ms
256
+ Type "echo \"✨ One prompt in. The right model out. ✨\""
257
+ Enter
258
+
259
+ Sleep 1s
@@ -0,0 +1,136 @@
1
+ /**
2
+ * A3M Router Setup Wizard
3
+ * Interactive configuration wizard
4
+ */
5
+ declare const fs: any;
6
+ declare const path: any;
7
+ declare const readline: any;
8
+ declare const CONFIG_DIR: any;
9
+ declare const CONFIG_FILE: any;
10
+ declare const API_KEY_ENV_MAP: {
11
+ GROQ_API_KEY: string;
12
+ OPENAI_API_KEY: string;
13
+ ANTHROPIC_API_KEY: string;
14
+ DEEPSEEK_API_KEY: string;
15
+ MISTRAL_API_KEY: string;
16
+ GOOGLE_API_KEY: string;
17
+ CEREBRAS_API_KEY: string;
18
+ TOGETHER_API_KEY: string;
19
+ AI21_API_KEY: string;
20
+ COHERE_API_KEY: string;
21
+ MINIMAX_API_KEY: string;
22
+ KIMI_API_KEY: string;
23
+ MOONSHOT_API_KEY: string;
24
+ QWEN_API_KEY: string;
25
+ ZHIPU_API_KEY: string;
26
+ YI_API_KEY: string;
27
+ BAICHUAN_API_KEY: string;
28
+ };
29
+ declare const PROVIDER_INFO: {
30
+ groq: {
31
+ name: string;
32
+ models: string;
33
+ tier: string;
34
+ strength: string;
35
+ };
36
+ openai: {
37
+ name: string;
38
+ models: string;
39
+ tier: string;
40
+ strength: string;
41
+ };
42
+ anthropic: {
43
+ name: string;
44
+ models: string;
45
+ tier: string;
46
+ strength: string;
47
+ };
48
+ deepseek: {
49
+ name: string;
50
+ models: string;
51
+ tier: string;
52
+ strength: string;
53
+ };
54
+ mistral: {
55
+ name: string;
56
+ models: string;
57
+ tier: string;
58
+ strength: string;
59
+ };
60
+ google: {
61
+ name: string;
62
+ models: string;
63
+ tier: string;
64
+ strength: string;
65
+ };
66
+ cerebras: {
67
+ name: string;
68
+ models: string;
69
+ tier: string;
70
+ strength: string;
71
+ };
72
+ together: {
73
+ name: string;
74
+ models: string;
75
+ tier: string;
76
+ strength: string;
77
+ };
78
+ ai21: {
79
+ name: string;
80
+ models: string;
81
+ tier: string;
82
+ strength: string;
83
+ };
84
+ cohere: {
85
+ name: string;
86
+ models: string;
87
+ tier: string;
88
+ strength: string;
89
+ };
90
+ minimax: {
91
+ name: string;
92
+ models: string;
93
+ tier: string;
94
+ strength: string;
95
+ };
96
+ kimi: {
97
+ name: string;
98
+ models: string;
99
+ tier: string;
100
+ strength: string;
101
+ };
102
+ moonshot: {
103
+ name: string;
104
+ models: string;
105
+ tier: string;
106
+ strength: string;
107
+ };
108
+ qwen: {
109
+ name: string;
110
+ models: string;
111
+ tier: string;
112
+ strength: string;
113
+ };
114
+ zhipu: {
115
+ name: string;
116
+ models: string;
117
+ tier: string;
118
+ strength: string;
119
+ };
120
+ yi: {
121
+ name: string;
122
+ models: string;
123
+ tier: string;
124
+ strength: string;
125
+ };
126
+ baichuan: {
127
+ name: string;
128
+ models: string;
129
+ tier: string;
130
+ strength: string;
131
+ };
132
+ };
133
+ declare function createInterface(): any;
134
+ declare function question(rl: any, text: any): Promise<unknown>;
135
+ declare function detectApiKeys(): Promise<any[]>;
136
+ declare function runWizard(): Promise<void>;