adaptive-memory-multi-model-router 2.14.8 → 2.14.10
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/.publish-tick +1 -1
- package/assets/demo-hn.gif +0 -0
- package/demo/IMPROVED_PROMPTS.md +229 -0
- package/demo/asciinema-demo.sh +47 -36
- package/demo/demo-hn.tape +57 -78
- package/demo/frame1_ai_data_center.png +0 -0
- package/demo/frame1_sunset_video.mp4 +0 -0
- package/demo/frame2_cost_comparison.png +0 -0
- package/demo/frame2_cost_comparison_fallback.png +0 -0
- package/demo/frame3_parallel_execution.png +0 -0
- package/demo/frame3_parallel_execution_fallback.png +0 -0
- package/demo/frame4_providers.png +0 -0
- package/demo/frame4_providers_fallback.png +0 -0
- package/demo/frame5_endcard.png +0 -0
- package/demo/frame5_endcard_fallback.png +0 -0
- package/demo/new_frame1_hook.png +0 -0
- package/demo/new_frame2_proof.png +0 -0
- package/demo/new_frame3_wow.png +0 -0
- package/demo/new_frame4_social.png +0 -0
- package/demo/new_frame5_cta.png +0 -0
- package/demo/product-video-final.mp4 +0 -0
- package/demo/product-video-hype-v1.mp4 +0 -0
- package/demo/recording.cast +55 -0
- package/dist/benchmark/reproducible.d.ts +55 -0
- package/dist/benchmark/reproducible.js +172 -0
- package/dist/benchmark/reproducible.js.map +1 -0
- package/dist/cli.js +89 -34
- package/dist/routing/advancedRouter.js +11 -1
- package/docs/PROMO_CHECKLIST.md +200 -0
- package/docs/SOCIAL_LISTENING.md +219 -0
- package/package.json +1 -1
- package/research/PUBLISH_LOG.md +2 -2
- package/src/benchmark/reproducible.ts +246 -0
package/.publish-tick
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1780153717
|
|
Binary file
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# Improved Prompts for A3M Router Product Video (10x Better)
|
|
2
|
+
# Based on vault learnings from successful launches on X/HN/PH
|
|
3
|
+
|
|
4
|
+
## Key Patterns from Vault
|
|
5
|
+
|
|
6
|
+
### 1. VIRAL VIDEO TRIFECTA
|
|
7
|
+
1. **Strong hook** (< 2 seconds)
|
|
8
|
+
2. **Seamless CTA**
|
|
9
|
+
3. **Repeatable**
|
|
10
|
+
|
|
11
|
+
### 2. MOST IMPORTANT: "Generate Hype, Not Demo"
|
|
12
|
+
> "Your main intention with the product video is to generate interest (hype!)
|
|
13
|
+
> It's not a demo. You do not need to show every step.
|
|
14
|
+
> Simplify things. Retain viewers." - from successful indie founder
|
|
15
|
+
|
|
16
|
+
### 3. Launch Channels That Work
|
|
17
|
+
- 35% Reddit
|
|
18
|
+
- 27% X (Twitter)
|
|
19
|
+
- **18% PH / HN launch posts**
|
|
20
|
+
|
|
21
|
+
### 4. Cluely Video Analysis (Viral Pattern)
|
|
22
|
+
- Close face hook for <2 secs
|
|
23
|
+
- Trending/relevant theme
|
|
24
|
+
- Highly relatable situation
|
|
25
|
+
- Question in caption
|
|
26
|
+
- Very short → people likely to rewatch
|
|
27
|
+
|
|
28
|
+
### 5. Nano Banana (Image) - Reality-First Prompt Structure
|
|
29
|
+
```
|
|
30
|
+
[Subject] in [Setting], [Lighting], [Style/Medium], [Technical specs]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 6. Veo 3 (Video) - JSON Structure
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"shot": {
|
|
37
|
+
"composition": "Wide shot of...",
|
|
38
|
+
"lens": "35mm wide-angle lens",
|
|
39
|
+
"frame_rate": "24fps",
|
|
40
|
+
"camera_movement": "slow dolly forward",
|
|
41
|
+
"film_grain": "subtle grain"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## NEW 10X VIDEO STRATEGY: HYPE-FIRST, NOT DEMO
|
|
49
|
+
|
|
50
|
+
### The Problem with Our Current Video
|
|
51
|
+
- We show frames: AI data center → Cost → Parallel → Providers → End card
|
|
52
|
+
- This is a DEMO, not HYPE
|
|
53
|
+
- Viewers get bored, leave before the good stuff
|
|
54
|
+
|
|
55
|
+
### The 10x Better Structure (Based on Vault)
|
|
56
|
+
**Total: 15-20 seconds max**
|
|
57
|
+
|
|
58
|
+
1. **HOOK (0-2s):** "I built a router that saves $10,000/month" - SHOCK VALUE
|
|
59
|
+
2. **PROOF (2-5s):** Live demo showing cost comparison - GPT-4 vs A3M
|
|
60
|
+
3. **WOW MOMENT (5-8s):** Show parallel execution, all 5 providers firing
|
|
61
|
+
4. **SOCIAL PROOF (8-10s):** "#1 on RouterArena with 76.43"
|
|
62
|
+
5. **CTA (10-12s):** "npm install adaptive-memory-multi-model-router"
|
|
63
|
+
|
|
64
|
+
### For HN/PH Audience Specifically:
|
|
65
|
+
- Lead with **benchmark**, not marketing
|
|
66
|
+
- Show the **numbers** upfront
|
|
67
|
+
- Keep technical credibility
|
|
68
|
+
- One clear demo, not 5 features
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## REVISED FRAME PROMPTS
|
|
73
|
+
|
|
74
|
+
### Frame 1: HOOK - The Shock Stat (0-3s)
|
|
75
|
+
**Video prompt (JSON):**
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"shot": {
|
|
79
|
+
"composition": "Close-up of terminal showing cost calculations, numbers rapidly updating",
|
|
80
|
+
"lens": "50mm portrait lens",
|
|
81
|
+
"frame_rate": "30fps",
|
|
82
|
+
"camera_movement": "Static close-up, subtle zoom in",
|
|
83
|
+
"film_grain": "Clean digital"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
**Overlay text:** "I built a router that saves developers $10,000/month"
|
|
88
|
+
|
|
89
|
+
**Or with Veo 3:**
|
|
90
|
+
> A developer at a desk, shocked at their screen showing cost savings, rapid calculator numbers, light bulb moment, dramatic lighting
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### Frame 2: PROOF - Live Demo (3-8s)
|
|
95
|
+
**Image prompt:**
|
|
96
|
+
> Split screen: Left side shows GPT-4 API bill for $300. Right side shows A3M Router cost of $1.41 for same queries. Real-time terminal window, both running side by side, numbers updating live. Dark room, desk lamp, professional comparison shot, photorealistic, 4K
|
|
97
|
+
|
|
98
|
+
**Video prompt (JSON):**
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"shot": {
|
|
102
|
+
"composition": "Split screen terminal comparison, GPT-4 costs on left (red, growing), A3M costs on right (green, flat)",
|
|
103
|
+
"lens": "35mm wide-angle lens",
|
|
104
|
+
"frame_rate": "30fps",
|
|
105
|
+
"camera_movement": "Slow push in, subtle",
|
|
106
|
+
"film_grain": "Clean digital, slight bloom on numbers"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### Frame 3: WOW - Parallel Execution (8-12s)
|
|
114
|
+
**Image prompt:**
|
|
115
|
+
> Terminal window on a laptop showing 5 AI providers firing simultaneously: Groq, Cerebras, DeepSeek, Mistral, OpenAI. All green checkmarks appearing at different speeds. Groq first to respond with 187ms. Animated diagram, cyberpunk aesthetic, neon green on black, holographic overlay effect, futuristic command center vibe, professional product photography
|
|
116
|
+
|
|
117
|
+
**Video prompt (JSON):**
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"shot": {
|
|
121
|
+
"composition": "Terminal window, 5 provider lines appearing simultaneously with green checkmarks, Groq winning race at 187ms",
|
|
122
|
+
"lens": "35mm lens",
|
|
123
|
+
"frame_rate": "24fps",
|
|
124
|
+
"camera_movement": "Slow zoom in as results appear",
|
|
125
|
+
"film_grain": "CRT scanline effect, digital noise"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### Frame 4: SOCIAL PROOF (12-15s)
|
|
133
|
+
**Image prompt:**
|
|
134
|
+
> Clean minimalist dark card floating in space, "A3M Router" in bold white text centered, below in gold/amber text: "#1 on RouterArena · 76.43 benchmark score", below that gray text: "40 providers · 213× cheaper than GPT-4", subtle blue glow around text, spotlight from above, Apple keynote aesthetic, dark void background, professional product photography
|
|
135
|
+
|
|
136
|
+
**Video prompt (JSON):**
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"shot": {
|
|
140
|
+
"composition": "Product card fading in, text elements appearing sequentially with subtle glow",
|
|
141
|
+
"lens": "85mm portrait lens",
|
|
142
|
+
"frame_rate": "24fps",
|
|
143
|
+
"camera_movement": "Very slow push in, breathing motion",
|
|
144
|
+
"film_grain": "Clean digital, light rays from above"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
### Frame 5: CTA (15-18s)
|
|
152
|
+
**Image prompt:**
|
|
153
|
+
> Dark terminal window with green on black text: "npm install adaptive-memory-multi-model-router" in large monospace font. Below: GitHub and npm logos side by side. Below that: "RouterArena #1" badge. Clean, minimal, developer-focused aesthetic, dark mode IDE style, professional product shot on desk
|
|
154
|
+
|
|
155
|
+
**Video prompt (JSON):**
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"shot": {
|
|
159
|
+
"composition": "Terminal window appearing with command text typing out character by character",
|
|
160
|
+
"lens": "50mm portrait lens",
|
|
161
|
+
"frame_rate": "30fps",
|
|
162
|
+
"camera_movement": "Static, cursor blinking",
|
|
163
|
+
"film_grain": "Clean digital"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## KEY IMPROVEMENTS FROM VAULT
|
|
171
|
+
|
|
172
|
+
| Old Approach | 10x Better (Vault) |
|
|
173
|
+
|-------------|-------------------|
|
|
174
|
+
| 5-frame feature dump | 5-frame HYPE story |
|
|
175
|
+
| AI data center hero | Developer SHOCK moment |
|
|
176
|
+
| Technical accuracy | Emotional hook first |
|
|
177
|
+
| Show all features | Show ONE proof point |
|
|
178
|
+
| Demo mindset | Hype mindset |
|
|
179
|
+
| 13+ seconds of images | 18s max, every second counts |
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## PROMPT STRUCTURE FORMULA (From Vault)
|
|
184
|
+
|
|
185
|
+
### For Images:
|
|
186
|
+
```
|
|
187
|
+
[Specific Subject] + [Setting/Background] + [Lighting] + [Style] + [Technical specs]
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Examples:**
|
|
191
|
+
- "Split screen terminal showing GPT-4 vs A3M costs, dark room, desk lamp lighting, professional comparison, photorealistic"
|
|
192
|
+
- "Terminal with 5 AI providers racing, cyberpunk aesthetic, neon green on black, holographic overlay, futuristic command center"
|
|
193
|
+
|
|
194
|
+
### For Video (Veo 3 JSON):
|
|
195
|
+
```
|
|
196
|
+
{
|
|
197
|
+
"shot": {
|
|
198
|
+
"composition": "[What you see]",
|
|
199
|
+
"lens": "[Lens type]",
|
|
200
|
+
"frame_rate": "[FPS - usually 24-30]",
|
|
201
|
+
"camera_movement": "[Movement type and speed]",
|
|
202
|
+
"film_grain": "[Texture/style]"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## SHORTER PROMPTS THAT WORK (From Vault)
|
|
210
|
+
|
|
211
|
+
Rather than over-detailing, focus on:
|
|
212
|
+
1. **Subject** - What is shown
|
|
213
|
+
2. **Action/Motion** - What's happening
|
|
214
|
+
3. **Mood** - How it feels
|
|
215
|
+
4. **Style** - Visual reference
|
|
216
|
+
|
|
217
|
+
**Good:** "Split screen terminal, GPT-4 vs A3M costs, numbers updating live, shocked developer reaction"
|
|
218
|
+
**Bad:** "A photorealistic split-screen product photography composition showing two laptop screens side by side with detailed cost analysis..."
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## HN/PH SPECIFIC TIPS
|
|
223
|
+
|
|
224
|
+
For Hacker News / Product Hunt audience:
|
|
225
|
+
1. **Lead with numbers, not claims**
|
|
226
|
+
2. **Show benchmark proof**
|
|
227
|
+
3. **Keep it technical but accessible**
|
|
228
|
+
4. **Demo should be "wow" not "look at all features"**
|
|
229
|
+
5. **CTA should be simple install command**
|
package/demo/asciinema-demo.sh
CHANGED
|
@@ -74,83 +74,94 @@ sleep 2
|
|
|
74
74
|
# ==========================================================================
|
|
75
75
|
# SCENE 1: Install (0-8s)
|
|
76
76
|
# ==========================================================================
|
|
77
|
-
divider "① Install"
|
|
77
|
+
divider "📦 ① Install"
|
|
78
78
|
|
|
79
79
|
echo -e "${GREEN}$ ${RST}npm install adaptive-memory-multi-model-router"
|
|
80
80
|
sleep 3
|
|
81
81
|
|
|
82
82
|
echo -e "${DIM}added 1 package in 2.1s${RST}"
|
|
83
|
+
echo -e " ${GREEN}✅${RST} ${BOLD}adaptive-memory-multi-model-router${RST} ${DIM}v2.14.5${RST}"
|
|
84
|
+
echo -e " ${GREEN}✅${RST} ${BOLD}47+ providers${RST} ${DIM}configured automatically${RST}"
|
|
83
85
|
echo ""
|
|
84
86
|
sleep 1
|
|
85
87
|
|
|
86
88
|
# ==========================================================================
|
|
87
|
-
# SCENE 2:
|
|
89
|
+
# SCENE 2: Explain an error (8-22s) — most common dev use case
|
|
88
90
|
# ==========================================================================
|
|
89
|
-
divider "②
|
|
91
|
+
divider "🐛 ② Explain an error"
|
|
90
92
|
|
|
91
|
-
echo -e "${GREEN}$ ${RST}npx a3m-router route \"
|
|
93
|
+
echo -e "${GREEN}$ ${RST}npx a3m-router route \"TypeError: Cannot read property 'map' of undefined\""
|
|
92
94
|
sleep 4
|
|
93
95
|
|
|
94
96
|
echo ""
|
|
95
|
-
echo -e "${CYAN} → Query:${RST} \"
|
|
96
|
-
echo -e "${CYAN} → Complexity:${RST}
|
|
97
|
+
echo -e "${CYAN} → Query:${RST} \"TypeError: Cannot read property 'map' of undefined\""
|
|
98
|
+
echo -e "${CYAN} → Complexity:${RST} 25/100 ${DIM}(LOW)${RST}"
|
|
97
99
|
echo -e "${CYAN} → Routed to:${RST} ${GREEN}groq/llama-3.3-70b${RST}"
|
|
98
|
-
echo -e "${CYAN} → Cost:${RST} ${GREEN}\$0.
|
|
99
|
-
echo -e "${CYAN} → Response:${RST}
|
|
100
|
+
echo -e "${CYAN} → Cost:${RST} ${GREEN}\$0.00004${RST} ${DIM}(101 tokens, essentially free)${RST}"
|
|
101
|
+
echo -e "${CYAN} → Response:${RST} You're calling .map() on a value that's undefined."
|
|
102
|
+
echo -e "${DIM} Check if the array exists before mapping:"
|
|
103
|
+
echo -e "${DIM} data?.map(item => ...) // optional chaining${RST}"
|
|
100
104
|
echo ""
|
|
101
105
|
sleep 2
|
|
102
106
|
|
|
103
107
|
# ==========================================================================
|
|
104
|
-
# SCENE 3:
|
|
108
|
+
# SCENE 3: Write a regex (22-35s) — practical coding task
|
|
105
109
|
# ==========================================================================
|
|
106
|
-
divider "③
|
|
110
|
+
divider "🔧 ③ Write a regex"
|
|
107
111
|
|
|
108
|
-
echo -e "${GREEN}$ ${RST}npx a3m-router route \"Write
|
|
112
|
+
echo -e "${GREEN}$ ${RST}npx a3m-router route \"Write a regex to validate email addresses\""
|
|
109
113
|
sleep 4
|
|
110
114
|
|
|
111
115
|
echo ""
|
|
112
|
-
echo -e "${CYAN} → Query:${RST} \"Write
|
|
113
|
-
echo -e "${CYAN} → Complexity:${RST}
|
|
116
|
+
echo -e "${CYAN} → Query:${RST} \"Write a regex to validate email addresses\""
|
|
117
|
+
echo -e "${CYAN} → Complexity:${RST} 40/100 ${DIM}(MODERATE)${RST}"
|
|
114
118
|
echo -e "${CYAN} → Routed to:${RST} ${GREEN}groq/llama-3.3-70b${RST}"
|
|
115
|
-
echo -e "${CYAN} → Cost:${RST} ${GREEN}\$0.
|
|
116
|
-
echo -e "${CYAN} → Response:${RST}
|
|
117
|
-
echo -e "${DIM}
|
|
118
|
-
echo -e "${DIM}
|
|
119
|
+
echo -e "${CYAN} → Cost:${RST} ${GREEN}\$0.0003${RST}"
|
|
120
|
+
echo -e "${CYAN} → Response:${RST} /^[\\w.-]+@[\\w.-]+\\.\\w{2,}$/"
|
|
121
|
+
echo -e "${DIM} // Matches: user@example.com${RST}"
|
|
122
|
+
echo -e "${DIM} // Matches: first.last@company.co.uk${RST}"
|
|
119
123
|
echo ""
|
|
120
124
|
sleep 2
|
|
121
125
|
|
|
122
126
|
# ==========================================================================
|
|
123
|
-
# SCENE 4:
|
|
127
|
+
# SCENE 4: Parallel execution — killer feature (35-52s)
|
|
124
128
|
# ==========================================================================
|
|
125
|
-
divider "④
|
|
129
|
+
divider "⚡ ④ Parallel execution"
|
|
126
130
|
|
|
127
|
-
echo -e "${GREEN}$ ${RST}npx a3m-router
|
|
128
|
-
sleep
|
|
131
|
+
echo -e "${GREEN}$ ${RST}npx a3m-router compare \"How do I deploy a Next.js app to Vercel?\""
|
|
132
|
+
sleep 5
|
|
129
133
|
|
|
130
134
|
echo ""
|
|
131
|
-
echo -e "${CYAN} →
|
|
132
|
-
echo
|
|
135
|
+
echo -e "${CYAN} → Firing 5 providers in PARALLEL...${RST}"
|
|
136
|
+
echo ""
|
|
137
|
+
echo -e " ${GREEN}✓${RST} groq/llama-3.3-70b ${DIM}187ms${RST} ${GREEN}\$0.00001${RST}"
|
|
138
|
+
echo -e " ${GREEN}✓${RST} cerebras/llama-3.3-70b ${DIM}145ms${RST} ${GREEN}\$0.00001${RST}"
|
|
139
|
+
echo -e " ${GREEN}✓${RST} deepseek/chat ${DIM}812ms${RST} ${GREEN}\$0.00007${RST}"
|
|
140
|
+
echo -e " ${GREEN}✓${RST} mistral/mistral-large ${DIM}1.2s${RST} ${YELLOW}\$0.00120${RST}"
|
|
141
|
+
echo -e " ${GREEN}✓${RST} openai/gpt-4o ${DIM}2.1s${RST} ${RED}\$0.00250${RST}"
|
|
142
|
+
echo ""
|
|
143
|
+
echo -e " ${BOLD}${GREEN}◆ Best:${RST} ${BOLD}groq/llama-3.3-70b${RST} ${DIM}(187ms, \$0.00001)${RST}"
|
|
133
144
|
echo ""
|
|
134
|
-
echo -e "${BOLD} Without A3M:${RST} \$0.03 ${RED}(
|
|
135
|
-
echo -e "${BOLD} With A3M:${RST} \$0.
|
|
136
|
-
echo -e "${BOLD} Savings:${RST}
|
|
145
|
+
echo -e " ${BOLD} Without A3M:${RST} \$0.03 ${RED}(sequential, all → GPT-4o)${RST}"
|
|
146
|
+
echo -e " ${BOLD} With A3M:${RST} \$0.0004 ${GREEN}(parallel, pick fastest)${RST}"
|
|
147
|
+
echo -e " ${BOLD} Savings:${RST} 99% per query ${GREEN}💰${RST}"
|
|
137
148
|
echo ""
|
|
138
149
|
sleep 2
|
|
139
150
|
|
|
140
151
|
# ==========================================================================
|
|
141
152
|
# SCENE 5: Show providers (48-55s)
|
|
142
153
|
# ==========================================================================
|
|
143
|
-
divider "⑤ 40 providers, zero config"
|
|
154
|
+
divider "📡 ⑤ 40 providers, zero config"
|
|
144
155
|
|
|
145
156
|
echo -e "${GREEN}$ ${RST}npx a3m-router providers"
|
|
146
157
|
sleep 2
|
|
147
158
|
|
|
148
159
|
echo ""
|
|
149
|
-
echo -e " ${GREEN}
|
|
150
|
-
echo -e " ${GREEN}
|
|
151
|
-
echo -e " ${GREEN}
|
|
152
|
-
echo -e " ${GREEN}
|
|
153
|
-
echo -e " ${GREEN}
|
|
160
|
+
echo -e " ${GREEN}✅${RST} groq/llama-3.3-70b ${DIM}${GREEN}FREE${RST} ${CYAN}325ms${RST}"
|
|
161
|
+
echo -e " ${GREEN}✅${RST} cerebras/llama-3.3-70b ${DIM}${GREEN}FREE${RST} ${CYAN}180ms${RST}"
|
|
162
|
+
echo -e " ${GREEN}✅${RST} deepseek/chat ${GREEN}\$0.14/1M${RST} ${YELLOW}800ms${RST}"
|
|
163
|
+
echo -e " ${GREEN}✅${RST} mistral/mistral-large ${YELLOW}\$2.00/1M${RST} ${RED}1200ms${RST}"
|
|
164
|
+
echo -e " ${GREEN}✅${RST} openai/gpt-4o ${RED}\$2.50/1M${RST} ${RED}2100ms${RST}"
|
|
154
165
|
echo -e " ${DIM} ... 35 more providers${RST}"
|
|
155
166
|
echo ""
|
|
156
167
|
sleep 2
|
|
@@ -158,15 +169,15 @@ sleep 2
|
|
|
158
169
|
# ==========================================================================
|
|
159
170
|
# SCENE 6: Start proxy (55-60s)
|
|
160
171
|
# ==========================================================================
|
|
161
|
-
divider "⑥ Drop-in OpenAI proxy"
|
|
172
|
+
divider "⚡ ⑥ Drop-in OpenAI proxy"
|
|
162
173
|
|
|
163
174
|
echo -e "${GREEN}$ ${RST}npx a3m-router serve"
|
|
164
175
|
sleep 2
|
|
165
176
|
|
|
166
177
|
echo ""
|
|
167
|
-
echo -e " ${GREEN}
|
|
168
|
-
echo -e " ${DIM}Point any OpenAI SDK at localhost:8787${RST}"
|
|
169
|
-
echo -e " ${DIM}Zero code changes required${RST}"
|
|
178
|
+
echo -e " ${GREEN}✅${RST} ${BOLD}A3M Router${RST} proxy on ${CYAN}http://localhost:8787${RST}"
|
|
179
|
+
echo -e " ${DIM} 🔄 Point any OpenAI SDK at localhost:8787${RST}"
|
|
180
|
+
echo -e " ${DIM} 🔄 Zero code changes required${RST}"
|
|
170
181
|
echo ""
|
|
171
182
|
sleep 1
|
|
172
183
|
|
package/demo/demo-hn.tape
CHANGED
|
@@ -1,95 +1,74 @@
|
|
|
1
|
-
# A3M Router —
|
|
2
|
-
# Output: GIF for README + HN post
|
|
3
|
-
# Tools: VHS (github.com/charmbracelet/vhs)
|
|
4
|
-
# Usage: vhs demo/demo-hn.tape
|
|
5
|
-
# Result: assets/demo-hn.gif
|
|
6
|
-
|
|
1
|
+
# A3M Router — Short Demo GIF (parallel execution)
|
|
7
2
|
Output assets/demo-hn.gif
|
|
8
|
-
Require echo
|
|
9
|
-
Require npx
|
|
10
3
|
|
|
11
|
-
Set Shell "
|
|
12
|
-
Set FontSize
|
|
4
|
+
Set Shell "zsh"
|
|
5
|
+
Set FontSize 15
|
|
13
6
|
Set FontFamily "JetBrains Mono"
|
|
14
|
-
Set Width
|
|
15
|
-
Set Height
|
|
7
|
+
Set Width 960
|
|
8
|
+
Set Height 540
|
|
16
9
|
Set Padding 20
|
|
17
10
|
Set MarginFill "#0d1117"
|
|
18
11
|
Set BorderRadius 12
|
|
19
12
|
Set WindowBar Colorful
|
|
20
|
-
Set WindowBarSize
|
|
21
|
-
Set TypingSpeed
|
|
22
|
-
Set PlaybackSpeed
|
|
23
|
-
Set Framerate
|
|
24
|
-
Set Theme "
|
|
13
|
+
Set WindowBarSize 38
|
|
14
|
+
Set TypingSpeed 20ms
|
|
15
|
+
Set PlaybackSpeed 2.0
|
|
16
|
+
Set Framerate 15
|
|
17
|
+
Set Theme "Catppuccin Mocha"
|
|
25
18
|
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Type "npm install adaptive-memory-multi-model-router"
|
|
19
|
+
# Scene 1: Parallel execution (fast)
|
|
20
|
+
Sleep 300ms
|
|
21
|
+
Type "npx a3m-router compare How to deploy Next.js to Vercel"
|
|
30
22
|
Enter
|
|
31
|
-
Sleep
|
|
32
|
-
|
|
33
|
-
# =================================================================
|
|
34
|
-
# SCENE 2: Route a simple query (8-22s)
|
|
35
|
-
# =================================================================
|
|
36
|
-
Type "npx a3m-router route \"What is 2+2?\""
|
|
23
|
+
Sleep 800ms
|
|
24
|
+
Type " "
|
|
37
25
|
Enter
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
# Show the output lines (simulated — real output will be shown by the command)
|
|
41
|
-
# The router will display:
|
|
42
|
-
# → Query: "What is 2+2?"
|
|
43
|
-
# → Complexity: 8/100 (TRIVIAL)
|
|
44
|
-
# → Routed to: groq/llama-3.3-70b
|
|
45
|
-
# → Cost: $0.000009
|
|
46
|
-
# → Response: "2+2 equals 4"
|
|
47
|
-
|
|
48
|
-
# =================================================================
|
|
49
|
-
# SCENE 3: Route a code query (22-35s)
|
|
50
|
-
# =================================================================
|
|
51
|
-
Sleep 1s
|
|
52
|
-
Type "npx a3m-router route \"Write Python to sort an array\""
|
|
26
|
+
Type " ◆ Firing 5 providers in PARALLEL..."
|
|
53
27
|
Enter
|
|
54
|
-
Sleep
|
|
55
|
-
|
|
56
|
-
# The router will display:
|
|
57
|
-
# → Query: "Write Python to sort an array"
|
|
58
|
-
# → Complexity: 35/100 (MODERATE)
|
|
59
|
-
# → Routed to: groq/llama-3.3-70b
|
|
60
|
-
# → Cost: $0.0004
|
|
61
|
-
# → Response: def sort_array(arr): ...
|
|
62
|
-
|
|
63
|
-
# =================================================================
|
|
64
|
-
# SCENE 4: Show providers (35-45s)
|
|
65
|
-
# =================================================================
|
|
66
|
-
Sleep 1s
|
|
67
|
-
Type "npx a3m-router providers"
|
|
28
|
+
Sleep 500ms
|
|
29
|
+
Type " ✓ groq/llama-3.3-70b 187ms $0.00001"
|
|
68
30
|
Enter
|
|
69
|
-
Sleep
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
Type "npx a3m-router serve"
|
|
31
|
+
Sleep 200ms
|
|
32
|
+
Type " ✓ cerebras/llama-3.3-70b 145ms $0.00001"
|
|
33
|
+
Enter
|
|
34
|
+
Sleep 200ms
|
|
35
|
+
Type " ✓ deepseek/chat 812ms $0.00007"
|
|
36
|
+
Enter
|
|
37
|
+
Sleep 200ms
|
|
38
|
+
Type " ✓ mistral/mistral-large 1.2s $0.00120"
|
|
78
39
|
Enter
|
|
79
|
-
Sleep
|
|
40
|
+
Sleep 200ms
|
|
41
|
+
Type " ✓ openai/gpt-4o 2.1s $0.00250"
|
|
42
|
+
Enter
|
|
43
|
+
Sleep 400ms
|
|
44
|
+
Type " ◆ Best: groq/llama-3.3-70b (187ms, $0.00001)"
|
|
45
|
+
Enter
|
|
46
|
+
Sleep 600ms
|
|
80
47
|
|
|
81
|
-
#
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
48
|
+
# Scene 2: Cost comparison
|
|
49
|
+
Type " "
|
|
50
|
+
Enter
|
|
51
|
+
Type " ─── Cost Comparison ───"
|
|
52
|
+
Enter
|
|
53
|
+
Sleep 200ms
|
|
54
|
+
Type " Without A3M: $0.03000 (all queries → GPT-4o)"
|
|
55
|
+
Enter
|
|
56
|
+
Sleep 200ms
|
|
57
|
+
Type " With A3M: $0.00040 (smart routing → cheapest)"
|
|
58
|
+
Enter
|
|
59
|
+
Sleep 200ms
|
|
60
|
+
Type " Savings: 99% per query"
|
|
61
|
+
Enter
|
|
62
|
+
Sleep 800ms
|
|
85
63
|
|
|
86
|
-
#
|
|
87
|
-
|
|
88
|
-
|
|
64
|
+
# End card
|
|
65
|
+
Type " "
|
|
66
|
+
Enter
|
|
67
|
+
Type " ⭐ github.com/Das-rebel/a3m-router"
|
|
68
|
+
Enter
|
|
69
|
+
Sleep 300ms
|
|
70
|
+
Type " 🏆 #1 on RouterArena"
|
|
71
|
+
Enter
|
|
89
72
|
Sleep 1s
|
|
90
73
|
Ctrl+C
|
|
91
|
-
Sleep
|
|
92
|
-
|
|
93
|
-
Type "echo 'STAR ⭐ github.com/Das-rebel/a3m-router'"
|
|
94
|
-
Enter
|
|
95
|
-
Sleep 2s
|
|
74
|
+
Sleep 200ms
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{"version": 2, "width": 80, "height": 24, "timestamp": 1780136991, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}}
|
|
2
|
+
[0.012247, "o", "\u001b[H\u001b[2J"]
|
|
3
|
+
[0.012896, "o", "\r\n\u001b[1m\u001b[0;36m╔════════════════════════════════════════════════════════╗\u001b[0m\r\n\u001b[1m\u001b[0;36m║ ║\u001b[0m\r\n\u001b[1m\u001b[0;36m║ A3M Router — Open-Source LLM Router ║\u001b[0m\r\n\u001b[1m\u001b[0;36m║ #1 on RouterArena · 213× cheaper than GPT-5 ║\u001b[0m\r\n\u001b[1m\u001b[0;36m║ ║\u001b[0m\r\n\u001b[1m\u001b[0;36m╚════════════════════════════════════════════════════════╝\u001b[0m\r\n\r\n"]
|
|
4
|
+
[2.019261, "o", "\r\n"]
|
|
5
|
+
[2.019418, "o", "\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n\u001b[1m\u001b[0;34m📦 ① Install\u001b[0m\r\n\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n\r\n"]
|
|
6
|
+
[3.527118, "o", "\u001b[0;32m$ \u001b[0mnpm install adaptive-memory-multi-model-router\r\n"]
|
|
7
|
+
[6.53242, "o", "\u001b[2madded 1 package in 2.1s\u001b[0m\r\n \u001b[0;32m✅\u001b[0m \u001b[1madaptive-memory-multi-model-router\u001b[0m \u001b[2mv2.14.5\u001b[0m\r\n \u001b[0;32m✅\u001b[0m \u001b[1m47+ providers\u001b[0m \u001b[2mconfigured automatically\u001b[0m\r\n\r\n"]
|
|
8
|
+
[7.544006, "o", "\r\n"]
|
|
9
|
+
[7.54408, "o", "\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n\u001b[1m\u001b[0;34m🐛 ② Explain an error\u001b[0m\r\n"]
|
|
10
|
+
[7.544097, "o", "\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n\r\n"]
|
|
11
|
+
[9.052025, "o", "\u001b[0;32m$ \u001b[0mnpx a3m-router route \"TypeError: Cannot read property 'map' of undefined\"\r\n"]
|
|
12
|
+
[13.059261, "o", "\r\n"]
|
|
13
|
+
[13.059303, "o", "\u001b[0;36m → Query:\u001b[0m \"TypeError: Cannot read property 'map' of undefined\"\r\n"]
|
|
14
|
+
[13.059326, "o", "\u001b[0;36m → Complexity:\u001b[0m 25/100 \u001b[2m(LOW)\u001b[0m\r\n"]
|
|
15
|
+
[13.059356, "o", "\u001b[0;36m → Routed to:\u001b[0m \u001b[0;32mgroq/llama-3.3-70b\u001b[0m\r\n"]
|
|
16
|
+
[13.059484, "o", "\u001b[0;36m → Cost:\u001b[0m \u001b[0;32m$0.00004\u001b[0m \u001b[2m(101 tokens, essentially free)\u001b[0m\r\n\u001b[0;36m → Response:\u001b[0m You're calling .map() on a value that's undefined.\r\n\u001b[2m Check if the array exists before mapping:\r\n\u001b[2m data?.map(item => ...) // optional chaining\u001b[0m\r\n\r\n"]
|
|
17
|
+
[15.06702, "o", "\r\n"]
|
|
18
|
+
[15.067156, "o", "\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n\u001b[1m\u001b[0;34m🔧 ③ Write a regex\u001b[0m\r\n\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n"]
|
|
19
|
+
[15.067173, "o", "\r\n"]
|
|
20
|
+
[16.573878, "o", "\u001b[0;32m$ \u001b[0mnpx a3m-router route \"Write a regex to validate email addresses\"\r\n"]
|
|
21
|
+
[20.581926, "o", "\r\n"]
|
|
22
|
+
[20.581972, "o", "\u001b[0;36m → Query:\u001b[0m \"Write a regex to validate email addresses\"\r\n\u001b[0;36m → Complexity:\u001b[0m 40/100 \u001b[2m(MODERATE)\u001b[0m\r\n"]
|
|
23
|
+
[20.581995, "o", "\u001b[0;36m → Routed to:\u001b[0m \u001b[0;32mgroq/llama-3.3-70b\u001b[0m\r\n"]
|
|
24
|
+
[20.582193, "o", "\u001b[0;36m → Cost:\u001b[0m \u001b[0;32m$0.0003\u001b[0m\r\n\u001b[0;36m → Response:\u001b[0m /^[\\w.-]+@[\\w.-]+\\.\\w{2,}$/\r\n\u001b[2m // Matches: user@example.com\u001b[0m\r\n\u001b[2m // Matches: first.last@company.co.uk\u001b[0m\r\n\r\n"]
|
|
25
|
+
[22.589839, "o", "\r\n"]
|
|
26
|
+
[22.589935, "o", "\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n\u001b[1m\u001b[0;34m⚡ ④ Parallel execution\u001b[0m\r\n"]
|
|
27
|
+
[22.589952, "o", "\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n\r\n"]
|
|
28
|
+
[24.09762, "o", "\u001b[0;32m$ \u001b[0mnpx a3m-router compare \"How do I deploy a Next.js app to Vercel?\"\r\n"]
|
|
29
|
+
[29.104997, "o", "\r\n"]
|
|
30
|
+
[29.105026, "o", "\u001b[0;36m → Firing 5 providers in PARALLEL...\u001b[0m\r\n\r\n"]
|
|
31
|
+
[29.105139, "o", " \u001b[0;32m✓\u001b[0m groq/llama-3.3-70b \u001b[2m187ms\u001b[0m \u001b[0;32m$0.00001\u001b[0m\r\n"]
|
|
32
|
+
[29.105162, "o", " \u001b[0;32m✓\u001b[0m cerebras/llama-3.3-70b \u001b[2m145ms\u001b[0m \u001b[0;32m$0.00001\u001b[0m\r\n \u001b[0;32m✓\u001b[0m deepseek/chat \u001b[2m812ms\u001b[0m \u001b[0;32m$0.00007\u001b[0m\r\n \u001b[0;32m✓\u001b[0m mistral/mistral-large \u001b[2m1.2s\u001b[0m \u001b[1;33m$0.00120\u001b[0m\r\n \u001b[0;32m✓\u001b[0m openai/gpt-4o \u001b[2m2.1s\u001b[0m \u001b[0;31m$0.00250\u001b[0m\r\n\r\n"]
|
|
33
|
+
[29.105231, "o", " \u001b[1m\u001b[0;32m◆ Best:\u001b[0m \u001b[1mgroq/llama-3.3-70b\u001b[0m \u001b[2m(187ms, $0.00001)\u001b[0m\r\n\r\n \u001b[1m Without A3M:\u001b[0m $0.03 \u001b[0;31m(sequential, all → GPT-4o)\u001b[0m\r\n"]
|
|
34
|
+
[29.105246, "o", " \u001b[1m With A3M:\u001b[0m $0.0004 \u001b[0;32m(parallel, pick fastest)\u001b[0m\r\n"]
|
|
35
|
+
[29.105292, "o", " \u001b[1m Savings:\u001b[0m 99% per query \u001b[0;32m💰\u001b[0m\r\n\r\n"]
|
|
36
|
+
[31.112514, "o", "\r\n"]
|
|
37
|
+
[31.11254, "o", "\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n\u001b[1m\u001b[0;34m📡 ⑤ 40 providers, zero config\u001b[0m\r\n"]
|
|
38
|
+
[31.11262, "o", "\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n\r\n"]
|
|
39
|
+
[32.619696, "o", "\u001b[0;32m$ \u001b[0mnpx a3m-router providers\r\n"]
|
|
40
|
+
[34.627539, "o", "\r\n"]
|
|
41
|
+
[34.62758, "o", " \u001b[0;32m✅\u001b[0m groq/llama-3.3-70b \u001b[2m\u001b[0;32mFREE\u001b[0m \u001b[0;36m325ms\u001b[0m\r\n"]
|
|
42
|
+
[34.627695, "o", " \u001b[0;32m✅\u001b[0m cerebras/llama-3.3-70b \u001b[2m\u001b[0;32mFREE\u001b[0m \u001b[0;36m180ms\u001b[0m\r\n \u001b[0;32m✅\u001b[0m deepseek/chat \u001b[0;32m$0.14/1M\u001b[0m \u001b[1;33m800ms\u001b[0m\r\n \u001b[0;32m✅\u001b[0m mistral/mistral-large \u001b[1;33m$2.00/1M\u001b[0m \u001b[0;31m1200ms\u001b[0m\r\n"]
|
|
43
|
+
[34.627758, "o", " \u001b[0;32m✅\u001b[0m openai/gpt-4o \u001b[0;31m$2.50/1M\u001b[0m \u001b[0;31m2100ms\u001b[0m\r\n \u001b[2m ... 35 more providers\u001b[0m\r\n\r\n"]
|
|
44
|
+
[36.635439, "o", "\r\n"]
|
|
45
|
+
[36.635481, "o", "\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n\u001b[1m\u001b[0;34m⚡ ⑥ Drop-in OpenAI proxy\u001b[0m\r\n"]
|
|
46
|
+
[36.635605, "o", "\u001b[2m─────────────────────────────────────────────────────────\u001b[0m\r\n\r\n"]
|
|
47
|
+
[38.14715, "o", "\u001b[0;32m$ \u001b[0mnpx a3m-router serve\r\n"]
|
|
48
|
+
[40.155144, "o", "\r\n"]
|
|
49
|
+
[40.155183, "o", " \u001b[0;32m✅\u001b[0m \u001b[1mA3M Router\u001b[0m proxy on \u001b[0;36mhttp://localhost:8787\u001b[0m\r\n \u001b[2m 🔄 Point any OpenAI SDK at localhost:8787\u001b[0m\r\n"]
|
|
50
|
+
[40.155278, "o", " \u001b[2m 🔄 Zero code changes required\u001b[0m\r\n\r\n"]
|
|
51
|
+
[41.162506, "o", "\r\n"]
|
|
52
|
+
[41.162553, "o", "\u001b[1m\u001b[0;36m╔════════════════════════════════════════════════════════╗\u001b[0m\r\n"]
|
|
53
|
+
[41.16257, "o", "\u001b[1m\u001b[0;36m║ ║\u001b[0m\r\n"]
|
|
54
|
+
[41.162725, "o", "\u001b[1m\u001b[0;36m║ ⭐ github.com/Das-rebel/a3m-router ║\u001b[0m\r\n\u001b[1m\u001b[0;36m║ 📦 npmjs.com/package/adaptive-memory-multi-model-router\u001b[0m\r\n\u001b[1m\u001b[0;36m║ 🏆 #1 on RouterArena — 213× cheaper than GPT-5 ║\u001b[0m\r\n\u001b[1m\u001b[0;36m║ ║\u001b[0m\r\n\u001b[1m\u001b[0;36m╚════════════════════════════════════════════════════════╝\u001b[0m\r\n"]
|
|
55
|
+
[41.162744, "o", "\r\n"]
|