adaptive-memory-multi-model-router 2.0.5 → 2.0.6
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/dist/cli.js +33 -0
- package/docs-site/assets/og-banner.svg +109 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -54,10 +54,43 @@ function formatRoute(result) {
|
|
|
54
54
|
}
|
|
55
55
|
if (result.reasoning) {
|
|
56
56
|
console.log(' Reason: ' + result.reasoning);
|
|
57
|
+
showStarPrompt();
|
|
57
58
|
}
|
|
58
59
|
console.log('');
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
|
|
63
|
+
// ============================================================
|
|
64
|
+
// STAR PROMPT (shown once per user)
|
|
65
|
+
// ============================================================
|
|
66
|
+
function showStarPrompt() {
|
|
67
|
+
const fs = require('fs');
|
|
68
|
+
const path = require('path');
|
|
69
|
+
const home = process.env.HOME || process.env.USERPROFILE || '/tmp';
|
|
70
|
+
const marker = path.join(home, '.a3m-router', '.star-prompt-shown');
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
// Only show once
|
|
74
|
+
if (fs.existsSync(marker)) return;
|
|
75
|
+
|
|
76
|
+
// Create directory if needed
|
|
77
|
+
const dir = path.dirname(marker);
|
|
78
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
79
|
+
|
|
80
|
+
console.log('');
|
|
81
|
+
console.log(' \x1b[2m── ────────────────────────────────────────\x1b[0m');
|
|
82
|
+
console.log(' \x1b[2m⭐ Found this useful? Star us on GitHub:\x1b[0m');
|
|
83
|
+
console.log(' \x1b[1m\x1b[36m https://github.com/Das-rebel/adaptive-memory-multi-model-router\x1b[0m');
|
|
84
|
+
console.log(' \x1b[2m── ────────────────────────────────────────\x1b[0m');
|
|
85
|
+
console.log('');
|
|
86
|
+
|
|
87
|
+
// Mark as shown
|
|
88
|
+
fs.writeFileSync(marker, new Date().toISOString());
|
|
89
|
+
} catch (e) {
|
|
90
|
+
// Silently fail - don't break CLI for this
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
61
94
|
async function callProvider(providerId, model, prompt, maxTokens) {
|
|
62
95
|
providerId = providerId || 'groq';
|
|
63
96
|
model = model || 'llama-3.3-70b-versatile';
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 630" width="1200" height="630">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bgGradient" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" style="stop-color:#0f172a;stop-opacity:1" />
|
|
5
|
+
<stop offset="50%" style="stop-color:#1e1b4b;stop-opacity:1" />
|
|
6
|
+
<stop offset="100%" style="stop-color:#312e81;stop-opacity:1" />
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<linearGradient id="accentGradient" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
9
|
+
<stop offset="0%" style="stop-color:#6366f1;stop-opacity:1" />
|
|
10
|
+
<stop offset="50%" style="stop-color:#8b5cf6;stop-opacity:1" />
|
|
11
|
+
<stop offset="100%" style="stop-color:#06b6d4;stop-opacity:1" />
|
|
12
|
+
</linearGradient>
|
|
13
|
+
<filter id="glowBanner">
|
|
14
|
+
<feGaussianBlur stdDeviation="4" result="coloredBlur"/>
|
|
15
|
+
<feMerge>
|
|
16
|
+
<feMergeNode in="coloredBlur"/>
|
|
17
|
+
<feMergeNode in="SourceGraphic"/>
|
|
18
|
+
</feMerge>
|
|
19
|
+
</filter>
|
|
20
|
+
<pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse">
|
|
21
|
+
<path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/>
|
|
22
|
+
</pattern>
|
|
23
|
+
</defs>
|
|
24
|
+
|
|
25
|
+
<!-- Background -->
|
|
26
|
+
<rect width="1200" height="400" fill="url(#bgGradient)"/>
|
|
27
|
+
<rect width="1200" height="400" fill="url(#grid)"/>
|
|
28
|
+
|
|
29
|
+
<!-- Animated Particles -->
|
|
30
|
+
<g opacity="0.3">
|
|
31
|
+
<circle cx="100" cy="100" r="2" fill="#6366f1">
|
|
32
|
+
<animate attributeName="cy" values="100;120;100" dur="4s" repeatCount="indefinite"/>
|
|
33
|
+
<animate attributeName="opacity" values="0.3;0.6;0.3" dur="4s" repeatCount="indefinite"/>
|
|
34
|
+
</circle>
|
|
35
|
+
<circle cx="300" cy="300" r="3" fill="#8b5cf6">
|
|
36
|
+
<animate attributeName="cy" values="300;280;300" dur="5s" repeatCount="indefinite"/>
|
|
37
|
+
<animate attributeName="opacity" values="0.3;0.7;0.3" dur="5s" repeatCount="indefinite"/>
|
|
38
|
+
</circle>
|
|
39
|
+
<circle cx="900" cy="150" r="2" fill="#06b6d4">
|
|
40
|
+
<animate attributeName="cy" values="150;170;150" dur="3s" repeatCount="indefinite"/>
|
|
41
|
+
<animate attributeName="opacity" values="0.3;0.5;0.3" dur="3s" repeatCount="indefinite"/>
|
|
42
|
+
</circle>
|
|
43
|
+
<circle cx="1100" cy="350" r="3" fill="#10b981">
|
|
44
|
+
<animate attributeName="cy" values="350;330;350" dur="6s" repeatCount="indefinite"/>
|
|
45
|
+
<animate attributeName="opacity" values="0.3;0.6;0.3" dur="6s" repeatCount="indefinite"/>
|
|
46
|
+
</circle>
|
|
47
|
+
</g>
|
|
48
|
+
|
|
49
|
+
<!-- Main Logo Icon -->
|
|
50
|
+
<g transform="translate(150, 200)">
|
|
51
|
+
<circle cx="0" cy="0" r="60" fill="none" stroke="url(#accentGradient)" stroke-width="2" opacity="0.3"/>
|
|
52
|
+
<circle cx="0" cy="0" r="50" fill="none" stroke="url(#accentGradient)" stroke-width="1" opacity="0.2" stroke-dasharray="5 5">
|
|
53
|
+
<animateTransform attributeName="transform" type="rotate" from="0 0 0" to="360 0 0" dur="20s" repeatCount="indefinite"/>
|
|
54
|
+
</circle>
|
|
55
|
+
<circle cx="0" cy="0" r="20" fill="url(#accentGradient)" filter="url(#glowBanner)"/>
|
|
56
|
+
<circle cx="0" cy="-35" r="8" fill="#6366f1" opacity="0.9">
|
|
57
|
+
<animateTransform attributeName="transform" type="rotate" from="0 0 0" to="360 0 0" dur="8s" repeatCount="indefinite"/>
|
|
58
|
+
</circle>
|
|
59
|
+
<circle cx="30" cy="18" r="6" fill="#10b981" opacity="0.9">
|
|
60
|
+
<animateTransform attributeName="transform" type="rotate" from="120 0 0" to="480 0 0" dur="10s" repeatCount="indefinite"/>
|
|
61
|
+
</circle>
|
|
62
|
+
<circle cx="-30" cy="18" r="6" fill="#f59e0b" opacity="0.9">
|
|
63
|
+
<animateTransform attributeName="transform" type="rotate" from="240 0 0" to="600 0 0" dur="12s" repeatCount="indefinite"/>
|
|
64
|
+
</circle>
|
|
65
|
+
<text x="0" y="8" font-family="system-ui, -apple-system, sans-serif" font-size="24" font-weight="bold" fill="white" text-anchor="middle">A3M</text>
|
|
66
|
+
</g>
|
|
67
|
+
|
|
68
|
+
<!-- Title -->
|
|
69
|
+
<text x="600" y="160" font-family="system-ui, -apple-system, sans-serif" font-size="72" font-weight="bold" fill="white" text-anchor="middle" filter="url(#glowBanner)">A3M Router</text>
|
|
70
|
+
|
|
71
|
+
<!-- Subtitle -->
|
|
72
|
+
<text x="600" y="210" font-family="system-ui, -apple-system, sans-serif" font-size="28" fill="url(#accentGradient)" text-anchor="middle">Adaptive Memory Multi-Model Router</text>
|
|
73
|
+
|
|
74
|
+
<!-- Tagline -->
|
|
75
|
+
<text x="600" y="250" font-family="system-ui, -apple-system, sans-serif" font-size="18" fill="#94a3b8" text-anchor="middle">Route LLM queries to optimal providers • Save 50-80% on API costs</text>
|
|
76
|
+
|
|
77
|
+
<!-- Stats Bar -->
|
|
78
|
+
<g transform="translate(600, 320)">
|
|
79
|
+
<rect x="-350" y="0" width="700" height="50" rx="25" fill="rgba(255,255,255,0.05)" stroke="rgba(255,255,255,0.1)" stroke-width="1"/>
|
|
80
|
+
|
|
81
|
+
<!-- Stat 1 -->
|
|
82
|
+
<text x="-280" y="32" font-family="system-ui, -apple-system, sans-serif" font-size="14" font-weight="bold" fill="#6366f1" text-anchor="middle">872+</text>
|
|
83
|
+
<text x="-280" y="48" font-family="system-ui, -apple-system, sans-serif" font-size="10" fill="#64748b" text-anchor="middle">Weekly Downloads</text>
|
|
84
|
+
|
|
85
|
+
<!-- Divider -->
|
|
86
|
+
<line x1="-200" y1="10" x2="-200" y2="40" stroke="rgba(255,255,255,0.1)" stroke-width="1"/>
|
|
87
|
+
|
|
88
|
+
<!-- Stat 2 -->
|
|
89
|
+
<text x="-100" y="32" font-family="system-ui, -apple-system, sans-serif" font-size="14" font-weight="bold" fill="#10b981" text-anchor="middle">12</text>
|
|
90
|
+
<text x="-100" y="48" font-family="system-ui, -apple-system, sans-serif" font-size="10" fill="#64748b" text-anchor="middle">LLM Providers</text>
|
|
91
|
+
|
|
92
|
+
<!-- Divider -->
|
|
93
|
+
<line x1="0" y1="10" x2="0" y2="40" stroke="rgba(255,255,255,0.1)" stroke-width="1"/>
|
|
94
|
+
|
|
95
|
+
<!-- Stat 3 -->
|
|
96
|
+
<text x="100" y="32" font-family="system-ui, -apple-system, sans-serif" font-size="14" font-weight="bold" fill="#f59e0b" text-anchor="middle">116</text>
|
|
97
|
+
<text x="100" y="48" font-family="system-ui, -apple-system, sans-serif" font-size="10" fill="#64748b" text-anchor="middle">Integrations</text>
|
|
98
|
+
|
|
99
|
+
<!-- Divider -->
|
|
100
|
+
<line x1="200" y1="10" x2="200" y2="40" stroke="rgba(255,255,255,0.1)" stroke-width="1"/>
|
|
101
|
+
|
|
102
|
+
<!-- Stat 4 -->
|
|
103
|
+
<text x="280" y="32" font-family="system-ui, -apple-system, sans-serif" font-size="14" font-weight="bold" fill="#8b5cf6" text-anchor="middle">33</text>
|
|
104
|
+
<text x="280" y="48" font-family="system-ui, -apple-system, sans-serif" font-size="10" fill="#64748b" text-anchor="middle">Tests Passing</text>
|
|
105
|
+
</g>
|
|
106
|
+
|
|
107
|
+
<!-- Bottom Gradient Line -->
|
|
108
|
+
<rect x="0" y="395" width="1200" height="5" fill="url(#accentGradient)"/>
|
|
109
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adaptive-memory-multi-model-router",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"shortName": "A3M Router",
|
|
5
5
|
"displayName": "A3M Router - Adaptive Memory Multi-Model Router",
|
|
6
6
|
"description": "Drop-in OpenAI proxy that routes queries to the cheapest capable model. 39 providers, semantic cache, guardrails. 245% growth in 3 days, zero budget.",
|