adaptive-memory-multi-model-router 2.16.0 → 2.16.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.
- package/.github/workflows/adapters-ci.yml +142 -0
- package/.github/workflows/auto-submit-sitemap.yml +41 -0
- package/.github/workflows/ci.yml +2 -5
- package/.github/workflows/mcp-pypi-publish.yml +34 -0
- package/.github/workflows/pypi-publish.yml +146 -0
- package/.github/workflows/tmlpd-publish.yml +23 -0
- package/README.md +245 -148
- package/RELEASE_v2.16.0.md +149 -0
- package/TECHNICAL_README.md +253 -0
- package/adapters/README.md +36 -0
- package/adapters/__init__.py +25 -0
- package/adapters/a3m_adapter/__init__.py +51 -0
- package/adapters/a3m_adapter/adapter/__init__.py +22 -0
- package/adapters/a3m_adapter/adapter/autogen.py +169 -0
- package/adapters/a3m_adapter/adapter/config.py +100 -0
- package/adapters/a3m_adapter/adapter/haystack.py +197 -0
- package/adapters/a3m_adapter/adapter/langchain.py +155 -0
- package/adapters/a3m_adapter/adapter/langgraph.py +196 -0
- package/adapters/a3m_adapter/adapter/llamaindex.py +162 -0
- package/adapters/a3m_adapter/adapter/pinecone.py +217 -0
- package/adapters/a3m_adapter/adapter/vercel.py +188 -0
- package/adapters/a3m_adapter/tests/__init__.py +1 -0
- package/adapters/a3m_adapter/tests/test_adapters.py +118 -0
- package/adapters/a3m_adapter/tests/test_integration.py +80 -0
- package/adapters/requirements-dev.txt +6 -0
- package/adapters/requirements.txt +4 -0
- package/adapters/setup.py +23 -0
- package/demo.py +251 -0
- package/discoverability-diagnosis.md +280 -0
- package/dist/analytics/costAnalytics.d.ts.map +1 -1
- package/dist/benchmark/reproducible.d.ts.map +1 -1
- package/dist/cache/semanticCache.d.ts.map +1 -1
- package/dist/cli/setupWizard.d.ts +257 -50
- package/dist/cli/setupWizard.d.ts.map +1 -1
- package/dist/cli/setupWizard.js +419 -109
- package/dist/cli/setupWizard.js.map +1 -1
- package/dist/cli/tui.js +96 -67
- package/dist/cli.js +9 -0
- package/dist/cost/budgetEnforcer.d.ts.map +1 -1
- package/dist/cost/costTracker.d.ts.map +1 -1
- package/dist/ensemble/multiRoundDialog.d.ts.map +1 -1
- package/dist/ensemble/shapleyValue.d.ts.map +1 -1
- package/dist/ensemble.d.ts +1 -1
- package/dist/ensemble.js +141 -0
- package/dist/integrations/langchainAdapter.d.ts.map +1 -1
- package/dist/integrations/langchainAdapter.js +3 -3
- package/dist/integrations/langchainAdapter.js.map +1 -1
- package/dist/integrations/oauth.d.ts.map +1 -1
- package/dist/integrations/scienceAdapter.d.ts.map +1 -1
- package/dist/memory/autoFetch.d.ts.map +1 -1
- package/dist/memory/hybridMemory.d.ts.map +1 -1
- package/dist/memory/memoryTree.d.ts.map +1 -1
- package/dist/memory/obsidianVault.d.ts.map +1 -1
- package/dist/memory/reasoningBank.d.ts.map +1 -1
- package/dist/observability/metrics.d.ts.map +1 -1
- package/dist/observability/tracer.d.ts.map +1 -1
- package/dist/providers/providerConfig.d.ts.map +1 -1
- package/dist/providers/providerConfig.js +32 -17
- package/dist/providers/providerConfig.js.map +1 -1
- package/dist/routing/advancedRouter.d.ts.map +1 -1
- package/dist/routing/advancedRouter.js +106 -14
- package/dist/routing/advancedRouter.js.map +1 -1
- package/dist/routing/providerHealth.d.ts.map +1 -1
- package/dist/routing/providerRetry.d.ts.map +1 -1
- package/dist/routing/shadowSampler.js.map +1 -1
- package/dist/security/guardrails.d.ts.map +1 -1
- package/dist/server/handlers/chatHandler.d.ts.map +1 -1
- package/dist/server/handlers/completionsHandler.d.ts.map +1 -1
- package/dist/server/handlers/embeddingsHandler.d.ts.map +1 -1
- package/dist/server/handlers/healthHandler.d.ts.map +1 -1
- package/dist/server/handlers/metricsHandler.d.ts.map +1 -1
- package/dist/server/handlers/modelsHandler.d.ts.map +1 -1
- package/dist/server/metrics.d.ts.map +1 -1
- package/dist/server/proxyServer.d.ts.map +1 -1
- package/dist/server/router.d.ts.map +1 -1
- package/dist/server/state.d.ts.map +1 -1
- package/dist/skills/__tests__/skill_manager.test.js +5 -265
- package/dist/skills/__tests__/skill_manager.test.js.map +1 -1
- package/dist/utils/tokenUtils.d.ts.map +1 -1
- package/docker-compose.yml +84 -60
- package/docs/ARTICLE_Biology_Inspired_Routing.md +208 -0
- package/docs/ARTICLE_Master.md +78 -0
- package/docs/ARTICLE_Master_CN.md +78 -0
- package/docs/ARTICLE_OpenRouter_Stripe.md +140 -0
- package/docs/DEVPTO_ARTICLE.md +84 -0
- package/docs/HUMAN_STYLE_GUIDE.md +75 -0
- package/docs/IMPRINT_PLAN.md +88 -0
- package/docs/OPENROUTER_ALTERNATIVE.md +184 -0
- package/docs/SOCIAL_CAMPAIGN.md +316 -0
- package/docs/anthropic.html +45 -0
- package/docs/best-llm-routers-2025.html +157 -0
- package/docs/cerebras.html +43 -0
- package/docs/cli-cheatsheet.md +286 -212
- package/docs/comparison.md +2 -2
- package/docs/deepseek.html +44 -0
- package/docs/google.html +47 -0
- package/docs/groq.html +44 -0
- package/docs/llms-full.txt +360 -138
- package/docs/llms.txt +70 -71
- package/docs/mistral.html +43 -0
- package/docs/ollama.html +50 -0
- package/docs/openai.html +57 -0
- package/docs/sitemap.xml +69 -57
- package/docs-site/blog/best-llm-routers-2025.html +157 -0
- package/docs-site/index.html +68 -9
- package/docs-site/providers/anthropic.html +45 -0
- package/docs-site/providers/cerebras.html +43 -0
- package/docs-site/providers/deepseek.html +44 -0
- package/docs-site/providers/google.html +47 -0
- package/docs-site/providers/groq.html +44 -0
- package/docs-site/providers/index.html +41 -0
- package/docs-site/providers/mistral.html +43 -0
- package/docs-site/providers/ollama.html +50 -0
- package/docs-site/providers/openai.html +57 -0
- package/docs-site/sitemap.xml +69 -0
- package/llms.txt +70 -62
- package/package.json +44 -182
- package/packages/agentkit-adapter/LICENSE +21 -0
- package/packages/agentkit-adapter/README.md +126 -0
- package/packages/agentkit-adapter/examples/agentkit-example.ts +139 -0
- package/packages/agentkit-adapter/package.json +57 -0
- package/packages/agentkit-adapter/src/adapter.ts +381 -0
- package/packages/agentkit-adapter/src/index.ts +36 -0
- package/packages/agentkit-adapter/src/types.ts +105 -0
- package/packages/agentkit-adapter/src/util.ts +13 -0
- package/packages/agentkit-adapter/tsconfig.json +22 -0
- package/prometheus.yml +8 -0
- package/python/README.md +35 -81
- package/python/a3m/__init__.py +32 -3
- package/python/a3m/adapters/__init__.py +21 -0
- package/python/a3m/adapters/langchain.py +190 -0
- package/python/a3m/adapters/llamaindex.py +249 -0
- package/python/a3m/adapters/qdrant.py +240 -0
- package/python/a3m/adapters/weaviate.py +263 -0
- package/python/a3m/client.py +5 -0
- package/python/build_verify.sh +32 -0
- package/python/mcp-server/README.md +172 -0
- package/python/mcp-server/a3m_mcp/__init__.py +25 -0
- package/python/mcp-server/a3m_mcp/__main__.py +15 -0
- package/python/mcp-server/a3m_mcp/server.py +205 -0
- package/python/mcp-server/pyproject.toml +24 -0
- package/python/pyproject.toml +60 -6
- package/python/setup.py +3 -28
- package/scripts/submit-sitemap.sh +52 -0
- package/src/__types__/registry.d.ts +14 -0
- package/src/cli/setupWizard.ts +443 -112
- package/src/cli/tui.ts +159 -0
- package/src/ensemble.ts +154 -1
- package/src/integrations/langchainAdapter.ts +2 -2
- package/src/providers/providerConfig.ts +32 -17
- package/src/providers/registry.js +27 -0
- package/src/routing/advancedRouter.ts +99 -14
- package/src/routing/shadowSampler.ts +1 -1
- package/test-install/package.json +12 -0
- package/tests/tsconfig.json +0 -1
- package/tmlpd-pi-extension/README.md +105 -44
- package/tmlpd-pi-extension/docs/demo.svg +33 -0
- package/tmlpd-pi-extension/package.json +35 -106
- package/tmlpd-pi-extension/src/tokenOptimization/contextStratifier.ts +163 -0
- package/tmlpd-pi-extension/src/tokenOptimization/fetchOnceLocal.ts +136 -0
- package/tmlpd-pi-extension/src/tokenOptimization/index.ts +197 -0
- package/tmlpd-pi-extension/src/tokenOptimization/interAgentCompression.ts +157 -0
- package/tmlpd-pi-extension/src/tokenOptimization/schemaContract.ts +101 -0
- package/tmlpd-pi-extension/src/tokenOptimization/semanticCache.ts +248 -0
- package/tmlpd-pi-extension/src/tokenOptimization/tokenAwareFallback.ts +192 -0
- package/tmlpd-pi-extension/test/verify.js +21 -0
- package/tsconfig.build.json +3 -2
- package/packages/a3m-vercel-ai/dist/a3m-language-model.d.ts +0 -12
- package/packages/a3m-vercel-ai/dist/a3m-language-model.d.ts.map +0 -1
- package/packages/a3m-vercel-ai/dist/a3m-language-model.js +0 -289
- package/packages/a3m-vercel-ai/dist/a3m-language-model.js.map +0 -1
- package/packages/a3m-vercel-ai/dist/index.d.ts +0 -82
- package/packages/a3m-vercel-ai/dist/index.d.ts.map +0 -1
- package/packages/a3m-vercel-ai/dist/index.js +0 -79
- package/packages/a3m-vercel-ai/dist/index.js.map +0 -1
- package/packages/a3m-vercel-ai/dist/types.d.ts +0 -97
- package/packages/a3m-vercel-ai/dist/types.d.ts.map +0 -1
- package/packages/a3m-vercel-ai/dist/types.js +0 -5
- package/packages/a3m-vercel-ai/dist/types.js.map +0 -1
- package/src/skills/__tests__/skill_manager.test.ts +0 -328
- package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts +0 -114
- package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/cache/prefixCache.js +0 -285
- package/tmlpd-pi-extension/dist/cache/prefixCache.js.map +0 -1
- package/tmlpd-pi-extension/dist/cache/responseCache.d.ts +0 -58
- package/tmlpd-pi-extension/dist/cache/responseCache.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/cache/responseCache.js +0 -153
- package/tmlpd-pi-extension/dist/cache/responseCache.js.map +0 -1
- package/tmlpd-pi-extension/dist/cli.js +0 -59
- package/tmlpd-pi-extension/dist/cost/costTracker.d.ts +0 -95
- package/tmlpd-pi-extension/dist/cost/costTracker.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/cost/costTracker.js +0 -240
- package/tmlpd-pi-extension/dist/cost/costTracker.js.map +0 -1
- package/tmlpd-pi-extension/dist/index.d.ts +0 -723
- package/tmlpd-pi-extension/dist/index.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/index.js +0 -239
- package/tmlpd-pi-extension/dist/index.js.map +0 -1
- package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts +0 -82
- package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/memory/episodicMemory.js +0 -145
- package/tmlpd-pi-extension/dist/memory/episodicMemory.js.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts +0 -102
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js +0 -207
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts +0 -85
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js +0 -210
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js.map +0 -1
- package/tmlpd-pi-extension/dist/providers/localProvider.d.ts +0 -102
- package/tmlpd-pi-extension/dist/providers/localProvider.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/providers/localProvider.js +0 -338
- package/tmlpd-pi-extension/dist/providers/localProvider.js.map +0 -1
- package/tmlpd-pi-extension/dist/providers/registry.d.ts +0 -55
- package/tmlpd-pi-extension/dist/providers/registry.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/providers/registry.js +0 -138
- package/tmlpd-pi-extension/dist/providers/registry.js.map +0 -1
- package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts +0 -68
- package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/routing/advancedRouter.js +0 -332
- package/tmlpd-pi-extension/dist/routing/advancedRouter.js.map +0 -1
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts +0 -101
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.js +0 -368
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts +0 -96
- package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/batchProcessor.js +0 -170
- package/tmlpd-pi-extension/dist/utils/batchProcessor.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/compression.d.ts +0 -61
- package/tmlpd-pi-extension/dist/utils/compression.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/compression.js +0 -281
- package/tmlpd-pi-extension/dist/utils/compression.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/reliability.d.ts +0 -74
- package/tmlpd-pi-extension/dist/utils/reliability.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/reliability.js +0 -177
- package/tmlpd-pi-extension/dist/utils/reliability.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts +0 -117
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js +0 -246
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts +0 -50
- package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/tokenUtils.js +0 -124
- package/tmlpd-pi-extension/dist/utils/tokenUtils.js.map +0 -1
package/demo.py
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
A3M Router Demo - Parallel Ensemble with Multiple LLMs
|
|
4
|
+
|
|
5
|
+
Run this after starting the A3M Router server:
|
|
6
|
+
npx a3m-router serve
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
python demo.py
|
|
10
|
+
|
|
11
|
+
Requirements:
|
|
12
|
+
pip install adaptive-memory-multi-model-router requests
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import json
|
|
16
|
+
import sys
|
|
17
|
+
import time
|
|
18
|
+
from typing import Dict, List, Any
|
|
19
|
+
|
|
20
|
+
# Try to import from the a3m package
|
|
21
|
+
try:
|
|
22
|
+
from a3m.router import A3MRouter
|
|
23
|
+
USING_A3M_SDK = True
|
|
24
|
+
except ImportError:
|
|
25
|
+
USING_A3M_SDK = False
|
|
26
|
+
print("Note: Using HTTP API (install a3m package for SDK access)")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def print_header(text: str) -> None:
|
|
30
|
+
"""Print a section header."""
|
|
31
|
+
print("\n" + "=" * 60)
|
|
32
|
+
print(f" {text}")
|
|
33
|
+
print("=" * 60)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def print_result(result: Any) -> None:
|
|
37
|
+
"""Print a routing result."""
|
|
38
|
+
print(f"\n📦 Provider: {getattr(result, 'provider', 'unknown')}")
|
|
39
|
+
print(f"⏱️ Latency: {getattr(result, 'latency_ms', '?')}ms")
|
|
40
|
+
print(f"💰 Cost: ${getattr(result, 'cost_usd', 0):.6f}")
|
|
41
|
+
print(f"\n📝 Response:\n{getattr(result, 'content', str(result))[:500]}")
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def demo_simple_routing():
|
|
45
|
+
"""Demo 1: Simple auto-routing."""
|
|
46
|
+
print_header("DEMO 1: Simple Auto-Routing")
|
|
47
|
+
print("Query: 'What is 2+2?'")
|
|
48
|
+
print("Expected: Routes to cheapest provider (Groq/Mistral)")
|
|
49
|
+
|
|
50
|
+
if USING_A3M_SDK:
|
|
51
|
+
router = A3MRouter(model="auto")
|
|
52
|
+
result = router.route(
|
|
53
|
+
messages=[{"role": "user", "content": "What is 2+2?"}]
|
|
54
|
+
)
|
|
55
|
+
print_result(result)
|
|
56
|
+
else:
|
|
57
|
+
import requests
|
|
58
|
+
resp = requests.post(
|
|
59
|
+
"http://localhost:8787/v1/chat/completions",
|
|
60
|
+
json={
|
|
61
|
+
"model": "auto",
|
|
62
|
+
"messages": [{"role": "user", "content": "What is 2+2?"}]
|
|
63
|
+
},
|
|
64
|
+
timeout=30
|
|
65
|
+
)
|
|
66
|
+
data = resp.json()
|
|
67
|
+
print(f"\n📦 Provider: {data.get('provider', 'unknown')}")
|
|
68
|
+
print(f"📝 Response: {data['choices'][0]['message']['content']}")
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def demo_parallel_ensemble():
|
|
72
|
+
"""Demo 2: Parallel ensemble with 3 providers."""
|
|
73
|
+
print_header("DEMO 2: Parallel Ensemble (3 Providers)")
|
|
74
|
+
print("Query: 'Explain quantum entanglement in simple terms'")
|
|
75
|
+
print("Providers: Groq + OpenAI + DeepSeek (all called in parallel)")
|
|
76
|
+
print("Expected: Best answer wins, with quality scores for each")
|
|
77
|
+
|
|
78
|
+
if USING_A3M_SDK:
|
|
79
|
+
router = A3MRouter(model="auto", parallel_ensemble=3)
|
|
80
|
+
|
|
81
|
+
start = time.time()
|
|
82
|
+
result = router.route(
|
|
83
|
+
messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms"}],
|
|
84
|
+
ensemble_config={
|
|
85
|
+
"providers": ["groq", "openai", "deepseek"],
|
|
86
|
+
"timeout_ms": 30000,
|
|
87
|
+
"score_weights": {
|
|
88
|
+
"relevance": 0.4,
|
|
89
|
+
"conciseness": 0.3,
|
|
90
|
+
"accuracy": 0.3
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
elapsed = time.time() - start
|
|
95
|
+
|
|
96
|
+
print(f"\n⏱️ Total time: {elapsed:.1f}s")
|
|
97
|
+
print_result(result)
|
|
98
|
+
|
|
99
|
+
# Show all provider scores
|
|
100
|
+
if hasattr(result, 'scores'):
|
|
101
|
+
print("\n📊 All Provider Scores:")
|
|
102
|
+
for provider, scores in result.scores.items():
|
|
103
|
+
print(f" {provider}: {scores}")
|
|
104
|
+
else:
|
|
105
|
+
import requests
|
|
106
|
+
resp = requests.post(
|
|
107
|
+
"http://localhost:8787/v1/chat/completions",
|
|
108
|
+
json={
|
|
109
|
+
"model": "auto",
|
|
110
|
+
"messages": [{"role": "user", "content": "Explain quantum entanglement"}],
|
|
111
|
+
"parallel_ensemble": 3,
|
|
112
|
+
},
|
|
113
|
+
timeout=60
|
|
114
|
+
)
|
|
115
|
+
data = resp.json()
|
|
116
|
+
print(f"\n📦 Winner: {data.get('provider', 'unknown')}")
|
|
117
|
+
print(f"📝 Response: {data['choices'][0]['message']['content'][:300]}...")
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def demo_code_generation():
|
|
121
|
+
"""Demo 3: Code generation routing."""
|
|
122
|
+
print_header("DEMO 3: Code Generation")
|
|
123
|
+
print("Query: 'Write a Python function to fibonacci'")
|
|
124
|
+
print("Expected: Routes to code-capable provider (DeepSeek/Groq)")
|
|
125
|
+
|
|
126
|
+
code_query = "Write a Python function to calculate fibonacci numbers recursively"
|
|
127
|
+
|
|
128
|
+
if USING_A3M_SDK:
|
|
129
|
+
router = A3MRouter(model="auto")
|
|
130
|
+
result = router.route(
|
|
131
|
+
messages=[{"role": "user", "content": code_query}]
|
|
132
|
+
)
|
|
133
|
+
print_result(result)
|
|
134
|
+
else:
|
|
135
|
+
import requests
|
|
136
|
+
resp = requests.post(
|
|
137
|
+
"http://localhost:8787/v1/chat/completions",
|
|
138
|
+
json={
|
|
139
|
+
"model": "auto",
|
|
140
|
+
"messages": [{"role": "user", "content": code_query}]
|
|
141
|
+
},
|
|
142
|
+
timeout=30
|
|
143
|
+
)
|
|
144
|
+
data = resp.json()
|
|
145
|
+
print(f"\n📦 Provider: {data.get('provider', 'unknown')}")
|
|
146
|
+
print(f"\n📝 Code:\n{data['choices'][0]['message']['content']}")
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def demo_complex_reasoning():
|
|
150
|
+
"""Demo 4: Complex reasoning routes to premium."""
|
|
151
|
+
print_header("DEMO 4: Complex Reasoning (Premium Tier)")
|
|
152
|
+
print("Query: 'Design a microservices architecture for a fintech app'")
|
|
153
|
+
print("Expected: Routes to premium provider (GPT-4o/Claude)")
|
|
154
|
+
|
|
155
|
+
complex_query = "Design a microservices architecture for a fintech application with payments, KYC, and trading"
|
|
156
|
+
|
|
157
|
+
if USING_A3M_SDK:
|
|
158
|
+
router = A3MRouter(model="auto")
|
|
159
|
+
result = router.route(
|
|
160
|
+
messages=[{"role": "user", "content": complex_query}]
|
|
161
|
+
)
|
|
162
|
+
print_result(result)
|
|
163
|
+
else:
|
|
164
|
+
import requests
|
|
165
|
+
resp = requests.post(
|
|
166
|
+
"http://localhost:8787/v1/chat/completions",
|
|
167
|
+
json={
|
|
168
|
+
"model": "auto",
|
|
169
|
+
"messages": [{"role": "user", "content": complex_query}]
|
|
170
|
+
},
|
|
171
|
+
timeout=60
|
|
172
|
+
)
|
|
173
|
+
data = resp.json()
|
|
174
|
+
print(f"\n📦 Provider: {data.get('provider', 'unknown')}")
|
|
175
|
+
print(f"📝 Response: {data['choices'][0]['message']['content'][:400]}...")
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def demo_health_check():
|
|
179
|
+
"""Demo 5: Check provider health."""
|
|
180
|
+
print_header("DEMO 5: Provider Health Status")
|
|
181
|
+
|
|
182
|
+
if USING_A3M_SDK:
|
|
183
|
+
router = A3MRouter(model="auto")
|
|
184
|
+
health = router.get_health()
|
|
185
|
+
print("\n🏥 Provider Status:")
|
|
186
|
+
for provider, status in health.items():
|
|
187
|
+
latency = status.get('latency_ms', 'N/A')
|
|
188
|
+
available = "✅" if status.get('available') else "❌"
|
|
189
|
+
print(f" {available} {provider}: {latency}ms")
|
|
190
|
+
else:
|
|
191
|
+
import requests
|
|
192
|
+
resp = requests.get("http://localhost:8787/health", timeout=10)
|
|
193
|
+
data = resp.json()
|
|
194
|
+
print("\n🏥 Provider Status:")
|
|
195
|
+
for p in data.get('providers', []):
|
|
196
|
+
print(f" {'✅' if p.get('available') else '❌'} {p['name']}: {p.get('latency_ms', 'N/A')}ms")
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def main():
|
|
200
|
+
"""Run all demos."""
|
|
201
|
+
print("""
|
|
202
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
203
|
+
║ ║
|
|
204
|
+
║ A3M Router Demo - Parallel Ensemble ║
|
|
205
|
+
║ ║
|
|
206
|
+
║ Intelligent routing across 47+ LLM providers ║
|
|
207
|
+
║ Save 70-95% on AI costs ║
|
|
208
|
+
║ ║
|
|
209
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
210
|
+
|
|
211
|
+
Make sure A3M Router is running:
|
|
212
|
+
npx a3m-router serve
|
|
213
|
+
|
|
214
|
+
Then run this demo:
|
|
215
|
+
python demo.py
|
|
216
|
+
""")
|
|
217
|
+
|
|
218
|
+
# Check if server is running
|
|
219
|
+
try:
|
|
220
|
+
import requests
|
|
221
|
+
resp = requests.get("http://localhost:8787/health", timeout=5)
|
|
222
|
+
print("✅ Connected to A3M Router server\n")
|
|
223
|
+
except Exception as e:
|
|
224
|
+
print(f"⚠️ Cannot connect to A3M Router server: {e}")
|
|
225
|
+
print(" Make sure it's running: npx a3m-router serve")
|
|
226
|
+
print(" Demo will use HTTP fallback...\n")
|
|
227
|
+
|
|
228
|
+
# Run demos
|
|
229
|
+
demos = [
|
|
230
|
+
("Simple Routing", demo_simple_routing),
|
|
231
|
+
("Parallel Ensemble", demo_parallel_ensemble),
|
|
232
|
+
("Code Generation", demo_code_generation),
|
|
233
|
+
("Complex Reasoning", demo_complex_reasoning),
|
|
234
|
+
("Health Check", demo_health_check),
|
|
235
|
+
]
|
|
236
|
+
|
|
237
|
+
for name, demo_fn in demos:
|
|
238
|
+
try:
|
|
239
|
+
demo_fn()
|
|
240
|
+
except Exception as e:
|
|
241
|
+
print(f"\n❌ Demo failed: {e}")
|
|
242
|
+
|
|
243
|
+
print("\n" + "=" * 60)
|
|
244
|
+
print(" Demo Complete!")
|
|
245
|
+
print("=" * 60)
|
|
246
|
+
print("\nLearn more: https://github.com/Das-rebel/a3m-router")
|
|
247
|
+
print("Documentation: https://das-rebel.github.io/a3m-router/")
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
if __name__ == "__main__":
|
|
251
|
+
main()
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# A3M Router — Discoverability Diagnosis
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-09-06
|
|
4
|
+
**Package:** adaptive-memory-multi-model-router (npm)
|
|
5
|
+
**Problem:** Down 69% — from ~15K/mo (May-Jun 2026) to ~2,831/mo (Aug-Sep 2026)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Root Cause Analysis — Why Is It Declining?
|
|
10
|
+
|
|
11
|
+
### 1.1 Traffic Spike Was a One-Time Event, Not Organic Growth
|
|
12
|
+
|
|
13
|
+
The May-Jun 2026 spike (peaking at ~1,987/day on May 22) was driven by a concentrated outreach burst — benchmark PR submissions, awesome-list PRs, and direct messaging. That campaign ended. Downloads reverted to the baseline the package was actually earning: **40–200/day organic**.
|
|
14
|
+
|
|
15
|
+
The package has **16 GitHub stars** and **0 production credibility signals** (no HN launch, no conference talk, no viral content). The "peak" was noise; the floor is the real number.
|
|
16
|
+
|
|
17
|
+
### 1.2 npm Search Presence Is Critically Weak
|
|
18
|
+
|
|
19
|
+
| Search Query | A3M Router Rank | Problem |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `llm router` | 10 | Only position; all others not in top 20 |
|
|
22
|
+
| `openai gateway` | Not in top 20 | **Major gap** |
|
|
23
|
+
| `llm gateway` | Not in top 20 | **Major gap** |
|
|
24
|
+
| `ai router` | Not in top 20 | **Major gap** |
|
|
25
|
+
| `cost savings llm` | Not in top 20 | **Major gap** |
|
|
26
|
+
| `multi provider llm` | Not in top 20 | **Major gap** |
|
|
27
|
+
|
|
28
|
+
The package has excellent keywords (150+) in `package.json` but **npm's search algorithm does not surface it** for high-intent queries where users actually discover tools. Competitors like `@kb-labs/llm-router` (score 1360) and `@blockrun/clawrouter` (score 1245) outrank A3M (score 1120) despite lower actual usage.
|
|
29
|
+
|
|
30
|
+
### 1.3 The npm Description Is a Research Paper, Not Marketing Copy
|
|
31
|
+
|
|
32
|
+
The live npm description reads:
|
|
33
|
+
|
|
34
|
+
> "Best in class open source LLM router across 47+ providers with Evolution-inspired routing: EXP3 diversity, MVT rate-limit rotation, optimal defense theory verification."
|
|
35
|
+
|
|
36
|
+
This is academic language that conveys **zero value** to the developer who lands on the npm page via search. The top of the README leads with a16z quote and "biologically inspired" philosophy — impressive for a research paper, useless for a developer trying to understand what the package does in 3 seconds.
|
|
37
|
+
|
|
38
|
+
**What a developer needs to know in 10 words:** "Intelligent LLM router that cuts costs 92% and works in 2 lines."
|
|
39
|
+
|
|
40
|
+
### 1.4 No SEO/Content Flywheel
|
|
41
|
+
|
|
42
|
+
Successful packages (litellm, langchain, vercel-ai) have:
|
|
43
|
+
- Blog posts that rank on Google for comparison queries
|
|
44
|
+
- Tutorial content on popular dev sites (sitepoint, freecodecamp, etc.)
|
|
45
|
+
- YouTube demos that generate search traffic
|
|
46
|
+
- GitHub READMEs optimized for GitHub's internal search
|
|
47
|
+
|
|
48
|
+
A3M has none of this. The GitHub Pages site (demo.html) returns "Page not found" for the root and only has a demo page. The SEO audit in `docs/SEO_AUDIT.md` identified all the right keywords but none were captured.
|
|
49
|
+
|
|
50
|
+
### 1.5 The Package Name Is Self-Undermining
|
|
51
|
+
|
|
52
|
+
`adaptive-memory-multi-model-router` is 34 characters of technical jargon. No developer searches for this. The `a3m` brand exists but is **not the npm package name** — `npx a3m-router` is a CLI alias, not the installable name. This splits brand identity across two names.
|
|
53
|
+
|
|
54
|
+
### 1.6 Stale Version Problem
|
|
55
|
+
|
|
56
|
+
The latest published version is `2.15.5` but a `2.16.0` exists in git (Aug 14). NPM shows "published 3 weeks ago" — meaning the last publish was a revert/fix, not a feature update. This signals abandonment to npm's ranking algorithm.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 2. Comparable Successful Packages — What Do They Have That This Doesn't?
|
|
61
|
+
|
|
62
|
+
### 2.1 litellm (17,750 downloads/month)
|
|
63
|
+
|
|
64
|
+
| What litellm Has | A3M Doesn't |
|
|
65
|
+
|---|---|
|
|
66
|
+
| Python SDK (largest dev community) | JS/TS only |
|
|
67
|
+
| 48K GitHub stars | 16 stars |
|
|
68
|
+
| Established in 2023 | Newer, no trust trail |
|
|
69
|
+
| Simple description: "JS implementation of LiteLLM" | Cryptic academic description |
|
|
70
|
+
| Python-first tutorials everywhere | No tutorial content |
|
|
71
|
+
| Drop-in OpenAI replacement | Requires router config |
|
|
72
|
+
|
|
73
|
+
### 2.2 @blockrun/clawrouter (growing, commercial)
|
|
74
|
+
|
|
75
|
+
| What Clawrouter Has | A3M Doesn't |
|
|
76
|
+
|---|---|
|
|
77
|
+
| Clear value prop above fold: "save 84% on inference costs" | Buried in biology metaphor |
|
|
78
|
+
| Scannable feature list | Walls of text |
|
|
79
|
+
| Commercial backing (credit card + USDC payments) | Purely OSS |
|
|
80
|
+
| Active marketing (Product Hunt, etc.) | No launch history |
|
|
81
|
+
|
|
82
|
+
### 2.3 @kb-labs/llm-router (higher npm search score)
|
|
83
|
+
|
|
84
|
+
| What KB-Labs Has | A3M Doesn't |
|
|
85
|
+
|---|---|
|
|
86
|
+
| Simple name: `llm-router` | 34-char package name |
|
|
87
|
+
| NPM search score 1360 vs A3M's 1120 | Lower ranking |
|
|
88
|
+
| Clear description | Academic description |
|
|
89
|
+
| Scoped package (`@kb-labs/`) | Unscoped, confusing brand |
|
|
90
|
+
|
|
91
|
+
### 2.4 What All Growing Packages Share
|
|
92
|
+
|
|
93
|
+
1. **One-line value prop** at the top of the npm page (not a metaphor)
|
|
94
|
+
2. **Zero-configuration demo** visible before the fold (run this → get this result)
|
|
95
|
+
3. **Python SDK** OR a JavaScript-first ecosystem presence (Vercel, Next.js, etc.)
|
|
96
|
+
4. **Community content** — tutorials, YouTube, StackOverflow questions
|
|
97
|
+
5. **Consistent publishing cadence** — weekly or biweekly minor versions
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 3. Top 3 Actionable Improvements (Ranked by Expected Impact)
|
|
102
|
+
|
|
103
|
+
### P0 — Rewrite the npm Description and README Hero (Expected Impact: +40-60% discovery)
|
|
104
|
+
|
|
105
|
+
The single highest-leverage change. The npm description must answer "what does it do for me?" in 10 words, not "what algorithms does it use."
|
|
106
|
+
|
|
107
|
+
**Change:** Replace the academic description with:
|
|
108
|
+
> "Intelligent LLM routing gateway — cuts AI costs 92%, routes across 80+ providers automatically. Two-line setup."
|
|
109
|
+
|
|
110
|
+
**Change:** Rewrite the README hero section to lead with a before/after code example that shows the value in 10 seconds, not a philosophical quote.
|
|
111
|
+
|
|
112
|
+
### P0.5 — Fix npm Search Keywords and Package Naming (Expected Impact: +30-50% search visibility)
|
|
113
|
+
|
|
114
|
+
The package does not appear in top 20 for any major search query except "llm router" at rank 10.
|
|
115
|
+
|
|
116
|
+
**Changes:**
|
|
117
|
+
1. Publish a new version under the package name `a3m-router` (or acquire the name via npm support)
|
|
118
|
+
2. Add `openai-gateway`, `llm-proxy`, `cost-saving-llm` as aliases in keywords
|
|
119
|
+
3. Ensure the npm description contains the phrase "openai gateway" explicitly (this is the #1 high-volume query)
|
|
120
|
+
4. Add a short one-line description that is **not** academic
|
|
121
|
+
|
|
122
|
+
### P1 — Build a Content/SEO Flywheel (Expected Impact: +20-40% over 90 days)
|
|
123
|
+
|
|
124
|
+
The SEO audit identified high-value keywords (litellm alternative, llm cost optimization, openai proxy free) but none were captured. A single tutorial on sitepoint.com or a YouTube demo that ranks for "best llm router 2026" would generate steady organic traffic.
|
|
125
|
+
|
|
126
|
+
**Changes:**
|
|
127
|
+
1. Publish a comparison article: "A3M Router vs LiteLLM: Open-Source Alternative Cuts Costs 92%" to dev.to, sitepoint, or freecodecamp
|
|
128
|
+
2. Submit to Hacker News with a live demo (docs/demo.html needs to be live at the root)
|
|
129
|
+
3. Create a 60-second demo video for YouTube/twitter
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## 4. Specific Changes Needed
|
|
134
|
+
|
|
135
|
+
### 4.1 package.json — npm Description
|
|
136
|
+
|
|
137
|
+
**File:** `~/a3m-router/package.json`
|
|
138
|
+
|
|
139
|
+
**Current:**
|
|
140
|
+
```json
|
|
141
|
+
"description": "🤖 A3M Router: Intelligent LLM routing gateway - 14% faster than OpenRouter, 92% cheaper | 80+ providers | npm: 6K+/mo | PyPI: 700+/mo | https://github.com/Das-rebel/a3m-router"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Change to:**
|
|
145
|
+
```json
|
|
146
|
+
"description": "Intelligent LLM routing gateway — 92% cost savings, 80+ providers, drop-in OpenAI replacement. Route once, save forever."
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Rationale:** The current description is 130 characters of mixed claims and links. The new description is 103 characters of pure value. It contains "openai" (npm search keyword), "llm routing" (primary intent), "92% cost savings" (specific claim that earns clicks), and "80+ providers" (scale signal).
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### 4.2 package.json — Keywords Cleanup
|
|
154
|
+
|
|
155
|
+
**File:** `~/a3m-router/package.json`
|
|
156
|
+
|
|
157
|
+
**Add missing high-value keywords:**
|
|
158
|
+
```json
|
|
159
|
+
"openai-gateway",
|
|
160
|
+
"openai-proxy",
|
|
161
|
+
"llm-proxy",
|
|
162
|
+
"openai-compatible",
|
|
163
|
+
"cost-saving",
|
|
164
|
+
"llm-cost-reduction",
|
|
165
|
+
"litellm-alternative",
|
|
166
|
+
"openrouter-alternative",
|
|
167
|
+
"route-llm"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Remove noise keywords** (too generic, dilute signal):
|
|
171
|
+
- `artificial-intelligence` (too broad, 1M+ packages match)
|
|
172
|
+
- `machine-learning` (same problem)
|
|
173
|
+
- `nlp` (same problem)
|
|
174
|
+
- `transformers` (misleading — no transformers used)
|
|
175
|
+
- `browser-automation`, `playwright`, `puppeteer` (not relevant to the core package)
|
|
176
|
+
|
|
177
|
+
**Rationale:** npm's search weights exact substring matches in the keyword list. "openai-gateway" appearing as a keyword directly improves ranking for "openai gateway" searches.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### 4.3 README.md — Hero Section
|
|
182
|
+
|
|
183
|
+
**File:** `~/a3m-router/README.md`
|
|
184
|
+
|
|
185
|
+
**Change the top of the README from:**
|
|
186
|
+
```
|
|
187
|
+
> *"Intelligence now has a universal medium of exchange: tokens..."* — Sarah Wang
|
|
188
|
+
|
|
189
|
+
**Building AI's nervous system, the biologically inspired way.**
|
|
190
|
+
[wall of biology metaphors]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Change to:**
|
|
194
|
+
```markdown
|
|
195
|
+
# A3M Router — Intelligent LLM Gateway
|
|
196
|
+
|
|
197
|
+
**Route LLM requests across 80+ providers automatically. Cut your AI costs 92%. Works in 2 lines.**
|
|
198
|
+
|
|
199
|
+
[](https://www.npmjs.com/package/adaptive-memory-multi-model-router)
|
|
200
|
+
[](https://www.npmjs.com/package/adaptive-memory-multi-model-router)
|
|
201
|
+
|
|
202
|
+
## In 30 seconds
|
|
203
|
+
|
|
204
|
+
\`\`\`bash
|
|
205
|
+
npm install adaptive-memory-multi-model-router
|
|
206
|
+
npx a3m-router serve
|
|
207
|
+
\`\`\`
|
|
208
|
+
|
|
209
|
+
\`\`\`python
|
|
210
|
+
from openai import OpenAI
|
|
211
|
+
client = OpenAI(base_url="http://localhost:8787/v1", api_key="not-needed")
|
|
212
|
+
response = client.chat.completions.create(model="auto", messages=[...])
|
|
213
|
+
# Routes to cheapest capable provider automatically. Done.
|
|
214
|
+
\`\`\`
|
|
215
|
+
|
|
216
|
+
**Result:** Simple queries → DeepSeek/Groq ($0.0001). Complex queries → GPT-4o. You don't think about it.
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Rationale:** Developers decide to try a package in the first 10 seconds. The biology metaphor requires intellectual investment before the value is clear. Leading with a working code example in 30 seconds is the industry standard (see: shadcn/ui, tRPC, drizzle-orm).
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
### 4.4 GitHub Pages — Fix Broken Links
|
|
224
|
+
|
|
225
|
+
**Files:** `~/a3m-router/docs/index.html`, `~/a3m-router/docs/.nojekyll`
|
|
226
|
+
|
|
227
|
+
**Problem:** `curl das-rebel.github.io/a3m-router/` returns "Page not found." Only `demo.html` works.
|
|
228
|
+
|
|
229
|
+
**Changes:**
|
|
230
|
+
1. Copy `docs/index.html` to the `docs/` root and ensure it is served (GitHub Pages should serve `docs/index.html` as the root of `username.github.io/repo/`)
|
|
231
|
+
2. Verify the `docs/.nojekyll` file exists (it does, per `ls`)
|
|
232
|
+
3. Check that `docs/` is set as the GitHub Pages source in repo settings
|
|
233
|
+
4. Ensure `index.html` has a working demo link and links to the npm page above the fold
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
### 4.5 npm — Publish Latest Version
|
|
238
|
+
|
|
239
|
+
**File:** `~/a3m-router/package.json`
|
|
240
|
+
|
|
241
|
+
**Problem:** `2.16.0` exists in git (Aug 14) but `2.15.5` is the latest published npm version.
|
|
242
|
+
|
|
243
|
+
**Change:** Run `npm publish` to publish `2.16.0` with the improved metadata.
|
|
244
|
+
|
|
245
|
+
**Rationale:** npm's search ranking penalizes packages that haven't published recently. A 3-week gap signals stagnation. Publishing weekly (even minor versions) is a known npm SEO signal.
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
### 4.6 README.md — Add Badges Above the Fold
|
|
250
|
+
|
|
251
|
+
**Current position:** Badges appear after the philosophical intro.
|
|
252
|
+
|
|
253
|
+
**Change:** Move the npm/PyPI/GitHub badges to be the **first visible element** in the rendered README, above all prose.
|
|
254
|
+
|
|
255
|
+
**Rationale:** Badges provide instant social proof (download count, test status, stars). A developer scrolling past the philosophy wall should first see "6,000+/month downloads" and "28/28 tests passing."
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
### 4.7 README.md — Comparison Table for litellm
|
|
260
|
+
|
|
261
|
+
**File:** `~/a3m-router/docs/comparison-litellm.md` (already excellent)
|
|
262
|
+
|
|
263
|
+
**Change:** Move a condensed version of the comparison table into the main README, replacing the "Why Not Just Use OpenRouter?" section or merging it.
|
|
264
|
+
|
|
265
|
+
**Rationale:** The litellm comparison table is the most compelling proof point for converting litellm users. It currently lives in a subdoc that almost no one reads. It should be in the README's first 3 screens.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Summary of Changes
|
|
270
|
+
|
|
271
|
+
| Priority | File | Change | Expected Impact |
|
|
272
|
+
|---|---|---|---|
|
|
273
|
+
| P0 | `package.json` description | Rewrite as value prop, not academic abstract | +40-60% click-through from npm search |
|
|
274
|
+
| P0 | `README.md` hero | Lead with code example + cost claim, not philosophy | +20-30% try-rate after landing |
|
|
275
|
+
| P0.5 | `package.json` keywords | Add `openai-gateway`, `llm-proxy`, `litellm-alternative`, remove noise | +30-50% search visibility |
|
|
276
|
+
| P0.5 | npm publish | Publish `2.16.0` now | Signals active maintenance |
|
|
277
|
+
| P1 | GitHub Pages | Fix `index.html` serving | HN/demo traffic can't convert if pages 404 |
|
|
278
|
+
| P1 | README.md | Add litellm comparison table above fold | Captures litellm-switching intent |
|
|
279
|
+
| P2 | Content flywheel | Tutorial article on dev.to / sitepoint | Long-tail Google traffic |
|
|
280
|
+
| P2 | Badges | Move above prose | Instant social proof |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"costAnalytics.d.ts","sourceRoot":"","sources":["../../src/analytics/costAnalytics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