adaptive-memory-multi-model-router 2.16.0 → 2.16.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 (248) hide show
  1. package/.github/workflows/adapters-ci.yml +142 -0
  2. package/.github/workflows/auto-submit-sitemap.yml +41 -0
  3. package/.github/workflows/ci.yml +2 -5
  4. package/.github/workflows/mcp-pypi-publish.yml +34 -0
  5. package/.github/workflows/pypi-publish.yml +146 -0
  6. package/.github/workflows/tmlpd-publish.yml +23 -0
  7. package/README.md +245 -148
  8. package/RELEASE_v2.16.0.md +149 -0
  9. package/TECHNICAL_README.md +253 -0
  10. package/adapters/README.md +36 -0
  11. package/adapters/__init__.py +25 -0
  12. package/adapters/a3m_adapter/__init__.py +51 -0
  13. package/adapters/a3m_adapter/adapter/__init__.py +22 -0
  14. package/adapters/a3m_adapter/adapter/autogen.py +169 -0
  15. package/adapters/a3m_adapter/adapter/config.py +100 -0
  16. package/adapters/a3m_adapter/adapter/haystack.py +197 -0
  17. package/adapters/a3m_adapter/adapter/langchain.py +155 -0
  18. package/adapters/a3m_adapter/adapter/langgraph.py +196 -0
  19. package/adapters/a3m_adapter/adapter/llamaindex.py +162 -0
  20. package/adapters/a3m_adapter/adapter/pinecone.py +217 -0
  21. package/adapters/a3m_adapter/adapter/vercel.py +188 -0
  22. package/adapters/a3m_adapter/tests/__init__.py +1 -0
  23. package/adapters/a3m_adapter/tests/test_adapters.py +118 -0
  24. package/adapters/a3m_adapter/tests/test_integration.py +80 -0
  25. package/adapters/requirements-dev.txt +6 -0
  26. package/adapters/requirements.txt +4 -0
  27. package/adapters/setup.py +23 -0
  28. package/demo.py +251 -0
  29. package/discoverability-diagnosis.md +280 -0
  30. package/dist/analytics/costAnalytics.d.ts.map +1 -1
  31. package/dist/benchmark/reproducible.d.ts.map +1 -1
  32. package/dist/cache/semanticCache.d.ts.map +1 -1
  33. package/dist/cli/setupWizard.d.ts +257 -50
  34. package/dist/cli/setupWizard.d.ts.map +1 -1
  35. package/dist/cli/setupWizard.js +419 -109
  36. package/dist/cli/setupWizard.js.map +1 -1
  37. package/dist/cli/tui.d.ts +6 -0
  38. package/dist/cli/tui.js +96 -67
  39. package/dist/cli/tui.js.map +1 -0
  40. package/dist/cli.js +9 -0
  41. package/dist/cost/budgetEnforcer.d.ts.map +1 -1
  42. package/dist/cost/costTracker.d.ts.map +1 -1
  43. package/dist/ensemble/multiRoundDialog.d.ts.map +1 -1
  44. package/dist/ensemble/shapleyValue.d.ts.map +1 -1
  45. package/dist/ensemble.d.ts +1 -1
  46. package/dist/ensemble.js +141 -0
  47. package/dist/integrations/langchainAdapter.d.ts.map +1 -1
  48. package/dist/integrations/langchainAdapter.js +3 -3
  49. package/dist/integrations/langchainAdapter.js.map +1 -1
  50. package/dist/integrations/oauth.d.ts.map +1 -1
  51. package/dist/integrations/scienceAdapter.d.ts.map +1 -1
  52. package/dist/memory/autoFetch.d.ts.map +1 -1
  53. package/dist/memory/hybridMemory.d.ts.map +1 -1
  54. package/dist/memory/memoryTree.d.ts.map +1 -1
  55. package/dist/memory/obsidianVault.d.ts.map +1 -1
  56. package/dist/memory/reasoningBank.d.ts.map +1 -1
  57. package/dist/observability/metrics.d.ts.map +1 -1
  58. package/dist/observability/tracer.d.ts.map +1 -1
  59. package/dist/providers/providerConfig.d.ts.map +1 -1
  60. package/dist/providers/providerConfig.js +32 -17
  61. package/dist/providers/providerConfig.js.map +1 -1
  62. package/dist/routing/advancedRouter.d.ts.map +1 -1
  63. package/dist/routing/advancedRouter.js +106 -14
  64. package/dist/routing/advancedRouter.js.map +1 -1
  65. package/dist/routing/providerHealth.d.ts.map +1 -1
  66. package/dist/routing/providerRetry.d.ts.map +1 -1
  67. package/dist/routing/shadowSampler.d.ts.map +1 -0
  68. package/dist/routing/shadowSampler.js.map +1 -1
  69. package/dist/security/guardrails.d.ts.map +1 -1
  70. package/dist/server/handlers/chatHandler.d.ts.map +1 -1
  71. package/dist/server/handlers/completionsHandler.d.ts.map +1 -1
  72. package/dist/server/handlers/embeddingsHandler.d.ts.map +1 -1
  73. package/dist/server/handlers/healthHandler.d.ts.map +1 -1
  74. package/dist/server/handlers/metricsHandler.d.ts.map +1 -1
  75. package/dist/server/handlers/modelsHandler.d.ts.map +1 -1
  76. package/dist/server/metrics.d.ts.map +1 -1
  77. package/dist/server/proxyServer.d.ts.map +1 -1
  78. package/dist/server/router.d.ts.map +1 -1
  79. package/dist/server/state.d.ts.map +1 -1
  80. package/dist/skills/__tests__/skill_manager.test.js +5 -265
  81. package/dist/skills/__tests__/skill_manager.test.js.map +1 -1
  82. package/dist/utils/tokenUtils.d.ts.map +1 -1
  83. package/docker-compose.yml +84 -60
  84. package/docs/ARTICLE_Biology_Inspired_Routing.md +208 -0
  85. package/docs/ARTICLE_Master.md +78 -0
  86. package/docs/ARTICLE_Master_CN.md +78 -0
  87. package/docs/ARTICLE_OpenRouter_Stripe.md +140 -0
  88. package/docs/DEVPTO_ARTICLE.md +84 -0
  89. package/docs/HUMAN_STYLE_GUIDE.md +75 -0
  90. package/docs/IMPRINT_PLAN.md +88 -0
  91. package/docs/OPENROUTER_ALTERNATIVE.md +184 -0
  92. package/docs/SOCIAL_CAMPAIGN.md +316 -0
  93. package/docs/anthropic.html +45 -0
  94. package/docs/best-llm-routers-2025.html +157 -0
  95. package/docs/cerebras.html +43 -0
  96. package/docs/cli-cheatsheet.md +286 -212
  97. package/docs/comparison.md +2 -2
  98. package/docs/deepseek.html +44 -0
  99. package/docs/google.html +47 -0
  100. package/docs/groq.html +44 -0
  101. package/docs/llms-full.txt +360 -138
  102. package/docs/llms.txt +70 -71
  103. package/docs/mistral.html +43 -0
  104. package/docs/ollama.html +50 -0
  105. package/docs/openai.html +57 -0
  106. package/docs/sitemap.xml +69 -57
  107. package/docs-site/blog/best-llm-routers-2025.html +157 -0
  108. package/docs-site/index.html +68 -9
  109. package/docs-site/providers/anthropic.html +45 -0
  110. package/docs-site/providers/cerebras.html +43 -0
  111. package/docs-site/providers/deepseek.html +44 -0
  112. package/docs-site/providers/google.html +47 -0
  113. package/docs-site/providers/groq.html +44 -0
  114. package/docs-site/providers/index.html +41 -0
  115. package/docs-site/providers/mistral.html +43 -0
  116. package/docs-site/providers/ollama.html +50 -0
  117. package/docs-site/providers/openai.html +57 -0
  118. package/docs-site/sitemap.xml +69 -0
  119. package/llms.txt +70 -62
  120. package/package.json +44 -182
  121. package/packages/agentkit-adapter/LICENSE +21 -0
  122. package/packages/agentkit-adapter/README.md +126 -0
  123. package/packages/agentkit-adapter/examples/agentkit-example.ts +139 -0
  124. package/packages/agentkit-adapter/package.json +57 -0
  125. package/packages/agentkit-adapter/src/adapter.ts +381 -0
  126. package/packages/agentkit-adapter/src/index.ts +36 -0
  127. package/packages/agentkit-adapter/src/types.ts +105 -0
  128. package/packages/agentkit-adapter/src/util.ts +13 -0
  129. package/packages/agentkit-adapter/tsconfig.json +22 -0
  130. package/prometheus.yml +8 -0
  131. package/python/README.md +35 -81
  132. package/python/a3m/__init__.py +32 -3
  133. package/python/a3m/adapters/__init__.py +21 -0
  134. package/python/a3m/adapters/langchain.py +190 -0
  135. package/python/a3m/adapters/llamaindex.py +249 -0
  136. package/python/a3m/adapters/qdrant.py +240 -0
  137. package/python/a3m/adapters/weaviate.py +263 -0
  138. package/python/a3m/client.py +5 -0
  139. package/python/build_verify.sh +32 -0
  140. package/python/mcp-server/README.md +172 -0
  141. package/python/mcp-server/a3m_mcp/__init__.py +25 -0
  142. package/python/mcp-server/a3m_mcp/__main__.py +15 -0
  143. package/python/mcp-server/a3m_mcp/server.py +205 -0
  144. package/python/mcp-server/pyproject.toml +24 -0
  145. package/python/pyproject.toml +60 -6
  146. package/python/setup.py +3 -28
  147. package/scripts/submit-sitemap.sh +52 -0
  148. package/src/__types__/registry.d.ts +14 -0
  149. package/src/cli/setupWizard.ts +443 -112
  150. package/src/cli/tui.ts +159 -0
  151. package/src/ensemble.ts +154 -1
  152. package/src/integrations/langchainAdapter.ts +2 -2
  153. package/src/providers/providerConfig.ts +32 -17
  154. package/src/providers/registry.js +27 -0
  155. package/src/routing/advancedRouter.ts +99 -14
  156. package/src/routing/shadowSampler.ts +1 -1
  157. package/test-install/package.json +12 -0
  158. package/tests/tsconfig.json +0 -1
  159. package/tmlpd-pi-extension/README.md +105 -44
  160. package/tmlpd-pi-extension/docs/demo.svg +33 -0
  161. package/tmlpd-pi-extension/package.json +35 -106
  162. package/tmlpd-pi-extension/src/tokenOptimization/contextStratifier.ts +163 -0
  163. package/tmlpd-pi-extension/src/tokenOptimization/fetchOnceLocal.ts +136 -0
  164. package/tmlpd-pi-extension/src/tokenOptimization/index.ts +197 -0
  165. package/tmlpd-pi-extension/src/tokenOptimization/interAgentCompression.ts +157 -0
  166. package/tmlpd-pi-extension/src/tokenOptimization/schemaContract.ts +101 -0
  167. package/tmlpd-pi-extension/src/tokenOptimization/semanticCache.ts +248 -0
  168. package/tmlpd-pi-extension/src/tokenOptimization/tokenAwareFallback.ts +192 -0
  169. package/tmlpd-pi-extension/test/verify.js +21 -0
  170. package/tsconfig.build.json +3 -2
  171. package/packages/a3m-vercel-ai/dist/a3m-language-model.d.ts +0 -12
  172. package/packages/a3m-vercel-ai/dist/a3m-language-model.d.ts.map +0 -1
  173. package/packages/a3m-vercel-ai/dist/a3m-language-model.js +0 -289
  174. package/packages/a3m-vercel-ai/dist/a3m-language-model.js.map +0 -1
  175. package/packages/a3m-vercel-ai/dist/index.d.ts +0 -82
  176. package/packages/a3m-vercel-ai/dist/index.d.ts.map +0 -1
  177. package/packages/a3m-vercel-ai/dist/index.js +0 -79
  178. package/packages/a3m-vercel-ai/dist/index.js.map +0 -1
  179. package/packages/a3m-vercel-ai/dist/types.d.ts +0 -97
  180. package/packages/a3m-vercel-ai/dist/types.d.ts.map +0 -1
  181. package/packages/a3m-vercel-ai/dist/types.js +0 -5
  182. package/packages/a3m-vercel-ai/dist/types.js.map +0 -1
  183. package/src/skills/__tests__/skill_manager.test.ts +0 -328
  184. package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts +0 -114
  185. package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts.map +0 -1
  186. package/tmlpd-pi-extension/dist/cache/prefixCache.js +0 -285
  187. package/tmlpd-pi-extension/dist/cache/prefixCache.js.map +0 -1
  188. package/tmlpd-pi-extension/dist/cache/responseCache.d.ts +0 -58
  189. package/tmlpd-pi-extension/dist/cache/responseCache.d.ts.map +0 -1
  190. package/tmlpd-pi-extension/dist/cache/responseCache.js +0 -153
  191. package/tmlpd-pi-extension/dist/cache/responseCache.js.map +0 -1
  192. package/tmlpd-pi-extension/dist/cli.js +0 -59
  193. package/tmlpd-pi-extension/dist/cost/costTracker.d.ts +0 -95
  194. package/tmlpd-pi-extension/dist/cost/costTracker.d.ts.map +0 -1
  195. package/tmlpd-pi-extension/dist/cost/costTracker.js +0 -240
  196. package/tmlpd-pi-extension/dist/cost/costTracker.js.map +0 -1
  197. package/tmlpd-pi-extension/dist/index.d.ts +0 -723
  198. package/tmlpd-pi-extension/dist/index.d.ts.map +0 -1
  199. package/tmlpd-pi-extension/dist/index.js +0 -239
  200. package/tmlpd-pi-extension/dist/index.js.map +0 -1
  201. package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts +0 -82
  202. package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts.map +0 -1
  203. package/tmlpd-pi-extension/dist/memory/episodicMemory.js +0 -145
  204. package/tmlpd-pi-extension/dist/memory/episodicMemory.js.map +0 -1
  205. package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts +0 -102
  206. package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts.map +0 -1
  207. package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js +0 -207
  208. package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js.map +0 -1
  209. package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts +0 -85
  210. package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts.map +0 -1
  211. package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js +0 -210
  212. package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js.map +0 -1
  213. package/tmlpd-pi-extension/dist/providers/localProvider.d.ts +0 -102
  214. package/tmlpd-pi-extension/dist/providers/localProvider.d.ts.map +0 -1
  215. package/tmlpd-pi-extension/dist/providers/localProvider.js +0 -338
  216. package/tmlpd-pi-extension/dist/providers/localProvider.js.map +0 -1
  217. package/tmlpd-pi-extension/dist/providers/registry.d.ts +0 -55
  218. package/tmlpd-pi-extension/dist/providers/registry.d.ts.map +0 -1
  219. package/tmlpd-pi-extension/dist/providers/registry.js +0 -138
  220. package/tmlpd-pi-extension/dist/providers/registry.js.map +0 -1
  221. package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts +0 -68
  222. package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts.map +0 -1
  223. package/tmlpd-pi-extension/dist/routing/advancedRouter.js +0 -332
  224. package/tmlpd-pi-extension/dist/routing/advancedRouter.js.map +0 -1
  225. package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts +0 -101
  226. package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts.map +0 -1
  227. package/tmlpd-pi-extension/dist/tools/tmlpdTools.js +0 -368
  228. package/tmlpd-pi-extension/dist/tools/tmlpdTools.js.map +0 -1
  229. package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts +0 -96
  230. package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts.map +0 -1
  231. package/tmlpd-pi-extension/dist/utils/batchProcessor.js +0 -170
  232. package/tmlpd-pi-extension/dist/utils/batchProcessor.js.map +0 -1
  233. package/tmlpd-pi-extension/dist/utils/compression.d.ts +0 -61
  234. package/tmlpd-pi-extension/dist/utils/compression.d.ts.map +0 -1
  235. package/tmlpd-pi-extension/dist/utils/compression.js +0 -281
  236. package/tmlpd-pi-extension/dist/utils/compression.js.map +0 -1
  237. package/tmlpd-pi-extension/dist/utils/reliability.d.ts +0 -74
  238. package/tmlpd-pi-extension/dist/utils/reliability.d.ts.map +0 -1
  239. package/tmlpd-pi-extension/dist/utils/reliability.js +0 -177
  240. package/tmlpd-pi-extension/dist/utils/reliability.js.map +0 -1
  241. package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts +0 -117
  242. package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts.map +0 -1
  243. package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js +0 -246
  244. package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js.map +0 -1
  245. package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts +0 -50
  246. package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts.map +0 -1
  247. package/tmlpd-pi-extension/dist/utils/tokenUtils.js +0 -124
  248. package/tmlpd-pi-extension/dist/utils/tokenUtils.js.map +0 -1
package/docs/llms.txt CHANGED
@@ -1,77 +1,76 @@
1
- # A3M Router
2
-
3
- ## Description
4
- A3M Router is an OpenAI-compatible LLM routing gateway that selects the cheapest capable provider per query using multi-signal heuristic scoring. Routes queries across 80+ providers in parallel, scores responses by confidence, and returns the best result. No GPU required; pure heuristic routing.
5
-
6
- ## Architecture
7
- - Stateless proxy between client applications and LLM providers
8
- - Pipeline: Guardrails → Semantic Cache → Multi-Signal Heuristic Routing → Provider Execution
9
- - No ML training required; no GPU resources for routing decisions
10
-
11
- ## Routing Method
12
- Multi-signal heuristic scoring across five dimensions:
13
- 1. Domain detection (legal, medical, security, finance, code, ML) — up to +0.35
14
- 2. Task indicators (code, math, translate, creative) up to +0.25
15
- 3. Query structure (clauses, length, qualifiers) up to +0.20
16
- 4. Action verb intensity (expert/mid/simple) +0.20 to −0.10
17
- 5. Multi-step detection (explicit step markers) up to +0.15
18
-
19
- Complexity score (0.0–1.0) maps to provider tiers: free (taste-1), cheap (llama-3.3-70b), mid (gpt-4o-mini), premium (gpt-4o, claude-3.5-sonnet).
20
-
21
- ## Key Technical Capabilities
22
-
23
- | Feature | Description |
24
- |---------|-------------|
25
- | Parallel Ensemble | Fire queries to multiple providers simultaneously, score by confidence, return best |
26
- | EXP3-Inspired Diversity | Adversarial bandit techniques for exploration vs exploitation balance |
27
- | Semantic Caching | Embedding-based lookup, configurable similarity threshold, per-route TTL |
28
- | Adaptive Memory | EMA-based model quality scoring, no retraining needed |
29
- | 80+ Providers | OpenAI, Anthropic, Groq, Gemini, DeepSeek, Mistral, OpenRouter, Ollama, vLLM, and 40+ more |
30
- | Circuit Breaker | 3-failure trigger, 60s cooldown per provider |
31
- | Per-Provider Retry | Exponential backoff with 429 detection and automatic failover |
32
- | Budget Enforcement | Per-user/team caps, real-time alerts at 50%/80%/100% |
33
- | Guardrails | Prompt injection detection, PII detection |
34
-
35
- ## Local Evaluation
36
-
37
- | Metric | Value |
38
- |--------|-------|
39
- | Exact tier match | 67% |
40
- | Within 1 tier | 96% |
41
- | Cost savings vs all-premium | 62.9% |
42
-
43
- ## Provider Coverage
44
- 80+ providers: OpenAI, Anthropic, Google, Groq, DeepSeek, Mistral, NVIDIA, OpenRouter, Kimi, Qwen, Zhipu, Yi, Azure OpenAI, AWS Bedrock, Local Ollama, Local vLLM.
45
-
46
- ## Features
47
- - Parallel ensemble execution (multiple providers simultaneously, confidence-weighted scoring)
48
- - Semantic cache (embedding-based, configurable similarity threshold, per-route TTL)
49
- - Budget enforcement (per-user/team caps, real-time alerts at 50%/80%/100%)
50
- - Circuit breaker (3-failure trigger, 60s cooldown)
51
- - Per-provider retry with exponential backoff and 429 detection
52
- - Guardrails (prompt injection detection, PII detection)
53
- - Adaptive memory (EMA-based model quality scoring, no retraining)
54
-
55
- ## API
56
- OpenAI-compatible proxy at localhost:8787. Model selection via `model="auto"` invokes heuristic routing.
1
+ # A3M Router — LLM Indexable Documentation
2
+
3
+ ## What is A3M Router?
4
+
5
+ A3M Router is an intelligent LLM routing proxy that automatically selects the cheapest capable model for each request across 47+ providers. Saves 70-95% on AI costs.
6
+
7
+ ## Framework Adapters (8 Total)
8
+
9
+ | Adapter | Framework | Use Case |
10
+ |---------|-----------|---------|
11
+ | A3MLangChainAdapter | LangChain | Chain-based AI workflows |
12
+ | A3MLlamaIndexAdapter | LlamaIndex | RAG and document qa |
13
+ | A3MAutoGenAdapter | AutoGen | Multi-agent conversations |
14
+ | A3MVercelAdapter | Vercel AI SDK | Next.js apps |
15
+ | A3MHaystackAdapter | Haystack | RAG pipelines |
16
+ | A3MPineconeAdapter | Pinecone | Vector search + RAG |
17
+ | A3MLangGraphAdapter | LangGraph | Stateful agents |
18
+ | A3MCompletion | CrewAI | Multi-agent systems |
19
+
20
+ ## Core Capabilities
21
+
22
+ ### 1. Automatic Model Selection
23
+ - Analyzes query complexity (domain, task type, structure, verb intensity)
24
+ - Maps to tier: Free → Cheap → Mid → Premium
25
+ - Selects cheapest healthy provider within tier
26
+ - Routing happens in ~140ms overhead
27
+
28
+ ### 2. Parallel Ensemble Execution
29
+ - Call multiple providers simultaneously
30
+ - Score responses on quality metrics
31
+ - Return best answer with full provenance
32
+ - Use case: "best answer regardless of cost" mode
33
+
34
+ ### 3. Biology-Inspired Routing
35
+ - EXP3: Prevents provider monoculture
36
+ - Charnov MVT: Optimal rate-limit rotation timing
37
+ - ODT Shadow Verification: Probabilistic verification for high-stakes queries
38
+
39
+ ### 4. Semantic Memory
40
+ - Embedding-based conversation context
41
+ - Cross-session fact retention
42
+ - Adaptive forgetting of stale info
43
+ - Semantic cache for zero-cost repeated queries
44
+
45
+ ## Supported Providers (47+)
46
+
47
+ OpenAI, Anthropic, Google, Groq, DeepSeek, Mistral, NVIDIA, Ollama, vLLM, Azure OpenAI, AWS Bedrock, and 37 more.
48
+
49
+ ## API Endpoints
50
+
51
+ - POST /v1/chat/completions OpenAI-compatible chat
52
+ - POST /v1/completions Text completions
53
+ - POST /v1/embeddings Embeddings
54
+ - GET /v1/models — Available models
55
+ - GET /health — Provider health
56
+ - GET /metrics Prometheus metrics
57
+
58
+ ## Cost Savings
59
+
60
+ | Query | GPT-4o | A3M | Savings |
61
+ |-------|---------|-----|---------|
62
+ | Simple Q&A | $0.03 | $0.0001 | 99.7% |
63
+ | Code generation | $0.05 | $0.002 | 96% |
64
+ | Complex reasoning | $0.15 | $0.15 | 0% (correct) |
65
+
66
+ ## Installation
57
67
 
58
68
  ```bash
59
69
  npm install adaptive-memory-multi-model-router
60
- npx a3m-router "your question here"
70
+ pip install adapters/
71
+ docker-compose up -d
61
72
  ```
62
73
 
63
- ## Citation
64
- ```
65
- @software{a3m_router,
66
- title = {A3M Router: OpenAI-Compatible Parallel LLM Routing Gateway},
67
- author = {Subho Mukherjee},
68
- year = {2025},
69
- url = {https://github.com/Das-rebel/a3m-router}
70
- }
71
- ```
74
+ ## Keywords
72
75
 
73
- ## References
74
- - RouteWorks/RouterArena (ICLR 2025): https://github.com/RouteWorks/RouterArena
75
- - MilkThink-Lab/RouterEval (EMNLP 2025): https://github.com/MilkThink-Lab/RouterEval
76
- - Hunter-Wrynn/MMR-Bench (ArXiv 2026): https://github.com/Hunter-Wrynn/MMR-Bench
77
- - ynulihao/LLMRouterBench (ACL 2026): https://github.com/ynulihao/LLMRouterBench
76
+ llm-router, ai-gateway, model-routing, cost-optimization, multi-provider, openai-compatible, langchain, llamaindex, autogena, vercel-ai, haystack, pinecone, langgraph, crewai, parallel-execution, semantic-cache, adaptive-routing, failover, guardrails, cache, budget-alerts, streaming, retries, circuit-breaker, multi-agent, rag, embeddings, vector-search
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Mistral AI Provider — A3M Router</title>
7
+ <meta name="description" content="Configure Mistral AI (Mistral Large, Mistral 7B) with A3M Router. European AI, rate limits, and configuration.">
8
+ <meta name="robots" content="index, follow">
9
+ <link rel="canonical" href="https://das-rebel.github.io/a3m-router/providers/mistral">
10
+ <link rel="stylesheet" href="../assets/styles.css">
11
+ </head>
12
+ <body>
13
+ <header><nav><a href="/">A3M Router</a> · <a href="/providers/">All Providers</a> · <a href="https://github.com/Das-rebel/a3m-router">GitHub</a></nav></header>
14
+ <main>
15
+ <h1>Mistral AI Provider</h1>
16
+ <p><strong>Cost Tier:</strong> Paid · <strong>Rate Limit:</strong> Varies by tier · <strong>MCP Support:</strong> ✅ Native</p>
17
+
18
+ <h2>Supported Models</h2>
19
+ <ul>
20
+ <li><strong>Mistral Large</strong> — Flagship model for complex reasoning, coding, and analysis</li>
21
+ <li><strong>Mistral 7B</strong> — Fast, efficient open model</li>
22
+ <li><strong>Mixtral 8x22B</strong> — Mixture of experts, excellent quality</li>
23
+ <li><strong>Codestral</strong> — Specialized for code generation</li>
24
+ </ul>
25
+
26
+ <h2>How A3M Router Routes to Mistral</h2>
27
+ <p>Mistral is a strong choice for:</p>
28
+ <ul>
29
+ <li>European data residency requirements (Mistral is based in France)</li>
30
+ <li>Code generation tasks (Codestral)</li>
31
+ <li>Balanced quality/cost for general reasoning</li>
32
+ </ul>
33
+
34
+ <h2>Configuration</h2>
35
+ <pre><code>MISTRAL_API_KEY=...
36
+
37
+ # Set in environment or .env file</code></pre>
38
+
39
+ <p><a href="/providers/">← All Providers</a></p>
40
+ </main>
41
+ <footer><p>&copy; 2025 A3M Router · <a href="https://github.com/Das-rebel/a3m-router">GitHub</a></p></footer>
42
+ </body>
43
+ </html>
@@ -0,0 +1,50 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Ollama Provider — A3M Router</title>
7
+ <meta name="description" content="Configure Ollama (local LLM inference) with A3M Router. Zero API costs, privacy-first, and configuration guide.">
8
+ <meta name="robots" content="index, follow">
9
+ <link rel="canonical" href="https://das-rebel.github.io/a3m-router/providers/ollama">
10
+ <link rel="stylesheet" href="../assets/styles.css">
11
+ </head>
12
+ <body>
13
+ <header><nav><a href="/">A3M Router</a> · <a href="/providers/">All Providers</a> · <a href="https://github.com/Das-rebel/a3m-router">GitHub</a></nav></header>
14
+ <main>
15
+ <h1>Ollama Provider</h1>
16
+ <p><strong>Cost Tier:</strong> Free (hardware only) · <strong>Rate Limit:</strong> GPU-dependent · <strong>MCP Support:</strong> ✅ Native</p>
17
+
18
+ <h2>Supported Models</h2>
19
+ <ul>
20
+ <li><strong>LLaMA 3.1</strong> — Meta's open instruction-tuned model (8B, 70B)</li>
21
+ <li><strong>Mistral</strong> — Efficient open model</li>
22
+ <li><strong>Qwen 2.5</strong> — Alibaba's multilingual model</li>
23
+ <li><strong>Phi-3</strong> — Microsoft's efficient small model</li>
24
+ <li><strong>Any GGUF-format model</strong> — Custom model support</li>
25
+ </ul>
26
+
27
+ <h2>How A3M Router Routes to Ollama</h2>
28
+ <p>Ollama provides completely free, local inference. A3M Router routes to Ollama for:</p>
29
+ <ul>
30
+ <li>Maximum privacy (no data leaves your infrastructure)</li>
31
+ <li>Zero API costs for high-volume simple tasks</li>
32
+ <li>Development and testing without API key requirements</li>
33
+ </ul>
34
+
35
+ <h2>Configuration</h2>
36
+ <pre><code># Install Ollama, then pull models:
37
+ # ollama pull llama3.1
38
+ # ollama pull mistral
39
+
40
+ # A3M Router connects to local Ollama at http://localhost:11434
41
+ # No API key required — zero cost for inference</code></pre>
42
+
43
+ <h2>Requirements</h2>
44
+ <p>GPU recommended for reasonable inference speed. CPU-only works for small models (7B params) but is significantly slower.</p>
45
+
46
+ <p><a href="/providers/">← All Providers</a></p>
47
+ </main>
48
+ <footer><p>&copy; 2025 A3M Router · <a href="https://github.com/Das-rebel/a3m-router">GitHub</a></p></footer>
49
+ </body>
50
+ </html>
@@ -0,0 +1,57 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>OpenAI Provider — A3M Router</title>
7
+ <meta name="description" content="Configure OpenAI (GPT-4o, o1, GPT-4o-mini) with A3M Router. Cost tier, rate limits, models, and configuration guide.">
8
+ <meta name="robots" content="index, follow">
9
+ <link rel="canonical" href="https://das-rebel.github.io/a3m-router/providers/openai">
10
+ <link rel="stylesheet" href="../assets/styles.css">
11
+ </head>
12
+ <body>
13
+ <header><nav><a href="/">A3M Router</a> · <a href="/providers/">All Providers</a> · <a href="https://github.com/Das-rebel/a3m-router">GitHub</a></nav></header>
14
+ <main>
15
+ <h1>OpenAI Provider</h1>
16
+ <p><strong>Cost Tier:</strong> Paid (~$0.002–$15/1M tokens) · <strong>Rate Limit:</strong> Varies by model and tier · <strong>MCP Support:</strong> ✅ Native</p>
17
+
18
+ <h2>Supported Models</h2>
19
+ <ul>
20
+ <li><strong>GPT-4o</strong> — Latest flagship, multimodal, 128K context</li>
21
+ <li><strong>GPT-4o-mini</strong> — Cost-optimized, fast, same capabilities</li>
22
+ <li><strong>o1-preview</strong> — Reasoning model for complex tasks</li>
23
+ <li><strong>o1-mini</strong> — Reasoning model, lower cost</li>
24
+ <li><strong>GPT-4 Turbo</strong> — Previous flagship, 128K context</li>
25
+ </ul>
26
+
27
+ <h2>How A3M Router Routes to OpenAI</h2>
28
+ <p>A3M Router automatically detects queries requiring reasoning, coding, or multimodal capabilities and routes them to OpenAI models when the query demands it. OpenAI is typically used for:</p>
29
+ <ul>
30
+ <li>Complex reasoning and chain-of-thought tasks (o1 series)</li>
31
+ <li>Code generation and debugging (GPT-4o)</li>
32
+ <li>Multimodal inputs (images + text)</li>
33
+ <li>High-precision instruction following</li>
34
+ </ul>
35
+
36
+ <h2>Configuration</h2>
37
+ <pre><code># Set in your environment or .env file
38
+ OPENAI_API_KEY=sk-...
39
+
40
+ # A3M Router automatically detects and uses OpenAI when appropriate
41
+ # No additional config needed for standard use</code></pre>
42
+
43
+ <h2>Rate Limits</h2>
44
+ <p>Rate limits vary by OpenAI API tier. A3M Router's MVT (Maximum Value-Targeted) rotation automatically distributes requests across multiple API keys if configured, reducing rate limit impact.</p>
45
+
46
+ <h2>Cost Optimization Tips</h2>
47
+ <ul>
48
+ <li>Use <code>gpt-4o-mini</code> for simple queries — 60x cheaper than GPT-4o</li>
49
+ <li>Enable semantic caching to avoid repeat API calls</li>
50
+ <li>Route straightforward Q&amp;A to free-tier providers (Groq, Cerebras) and reserve OpenAI for complex tasks</li>
51
+ </ul>
52
+
53
+ <p><a href="/providers/">← All Providers</a></p>
54
+ </main>
55
+ <footer><p>&copy; 2025 A3M Router · <a href="https://github.com/Das-rebel/a3m-router">GitHub</a></p></footer>
56
+ </body>
57
+ </html>
package/docs/sitemap.xml CHANGED
@@ -1,57 +1,69 @@
1
- <?xml version='1.0' encoding='UTF-8'?>
2
- <ns0:urlset xmlns:ns0="http://www.sitemaps.org/schemas/sitemap/0.9">
3
- <ns0:url>
4
- <ns0:loc>https://das-rebel.github.io/a3m-router/</ns0:loc>
5
- <ns0:lastmod>2026-05-31</ns0:lastmod>
6
- <ns0:changefreq>weekly</ns0:changefreq>
7
- <ns0:priority>1.0</ns0:priority>
8
- </ns0:url>
9
- <ns0:url>
10
- <ns0:loc>https://das-rebel.github.io/a3m-router/quick-start</ns0:loc>
11
- <ns0:lastmod>2026-05-31</ns0:lastmod>
12
- <ns0:changefreq>weekly</ns0:changefreq>
13
- <ns0:priority>0.9</ns0:priority>
14
- </ns0:url>
15
- <ns0:url>
16
- <ns0:loc>https://das-rebel.github.io/a3m-router/benchmark</ns0:loc>
17
- <ns0:lastmod>2026-05-31</ns0:lastmod>
18
- <ns0:changefreq>weekly</ns0:changefreq>
19
- <ns0:priority>0.9</ns0:priority>
20
- </ns0:url>
21
- <ns0:url>
22
- <ns0:loc>https://das-rebel.github.io/a3m-router/api</ns0:loc>
23
- <ns0:lastmod>2026-05-31</ns0:lastmod>
24
- <ns0:changefreq>monthly</ns0:changefreq>
25
- <ns0:priority>0.8</ns0:priority>
26
- </ns0:url>
27
- <ns0:url>
28
- <ns0:loc>https://das-rebel.github.io/a3m-router/llms.txt</ns0:loc>
29
- <ns0:lastmod>2026-05-31</ns0:lastmod>
30
- <ns0:changefreq>weekly</ns0:changefreq>
31
- <ns0:priority>0.7</ns0:priority>
32
- </ns0:url>
33
- <ns0:url>
34
- <ns0:loc>https://das-rebel.github.io/a3m-router/llms-full.txt</ns0:loc>
35
- <ns0:lastmod>2026-05-31</ns0:lastmod>
36
- <ns0:changefreq>weekly</ns0:changefreq>
37
- <ns0:priority>0.7</ns0:priority>
38
- </ns0:url>
39
- <ns0:url>
40
- <ns0:loc>https://das-rebel.github.io/a3m-router/docs/ai-plugin.json</ns0:loc>
41
- <ns0:lastmod>2026-05-31</ns0:lastmod>
42
- <ns0:changefreq>monthly</ns0:changefreq>
43
- <ns0:priority>0.6</ns0:priority>
44
- </ns0:url>
45
- <ns0:url>
46
- <ns0:loc>https://github.com/Das-rebel/a3m-router</ns0:loc>
47
- <ns0:lastmod>2026-05-31</ns0:lastmod>
48
- <ns0:changefreq>weekly</ns0:changefreq>
49
- <ns0:priority>0.9</ns0:priority>
50
- </ns0:url>
51
- <ns0:url>
52
- <ns0:loc>https://www.npmjs.com/package/adaptive-memory-multi-model-router</ns0:loc>
53
- <ns0:lastmod>2026-05-31</ns0:lastmod>
54
- <ns0:changefreq>weekly</ns0:changefreq>
55
- <ns0:priority>0.8</ns0:priority>
56
- </ns0:url>
57
- </ns0:urlset>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
+ <url>
4
+ <loc>https://das-rebel.github.io/a3m-router/</loc>
5
+ <priority>1.0</priority>
6
+ <changefreq>weekly</changefreq>
7
+ <lastmod>2026-08-14</lastmod>
8
+ </url>
9
+ <url>
10
+ <loc>https://das-rebel.github.io/a3m-router/best-llm-routers-2025.html</loc>
11
+ <priority>0.8</priority>
12
+ <changefreq>monthly</changefreq>
13
+ <lastmod>2026-08-14</lastmod>
14
+ </url>
15
+ <url>
16
+ <loc>https://das-rebel.github.io/a3m-router/quick-start.html</loc>
17
+ <priority>0.9</priority>
18
+ <changefreq>weekly</changefreq>
19
+ <lastmod>2026-08-14</lastmod>
20
+ </url>
21
+ <url>
22
+ <loc>https://das-rebel.github.io/a3m-router/openai.html</loc>
23
+ <priority>0.6</priority>
24
+ <changefreq>monthly</changefreq>
25
+ <lastmod>2026-08-14</lastmod>
26
+ </url>
27
+ <url>
28
+ <loc>https://das-rebel.github.io/a3m-router/anthropic.html</loc>
29
+ <priority>0.6</priority>
30
+ <changefreq>monthly</changefreq>
31
+ <lastmod>2026-08-14</lastmod>
32
+ </url>
33
+ <url>
34
+ <loc>https://das-rebel.github.io/a3m-router/google.html</loc>
35
+ <priority>0.6</priority>
36
+ <changefreq>monthly</changefreq>
37
+ <lastmod>2026-08-14</lastmod>
38
+ </url>
39
+ <url>
40
+ <loc>https://das-rebel.github.io/a3m-router/groq.html</loc>
41
+ <priority>0.6</priority>
42
+ <changefreq>monthly</changefreq>
43
+ <lastmod>2026-08-14</lastmod>
44
+ </url>
45
+ <url>
46
+ <loc>https://das-rebel.github.io/a3m-router/mistral.html</loc>
47
+ <priority>0.6</priority>
48
+ <changefreq>monthly</changefreq>
49
+ <lastmod>2026-08-14</lastmod>
50
+ </url>
51
+ <url>
52
+ <loc>https://das-rebel.github.io/a3m-router/ollama.html</loc>
53
+ <priority>0.6</priority>
54
+ <changefreq>monthly</changefreq>
55
+ <lastmod>2026-08-14</lastmod>
56
+ </url>
57
+ <url>
58
+ <loc>https://das-rebel.github.io/a3m-router/deepseek.html</loc>
59
+ <priority>0.6</priority>
60
+ <changefreq>monthly</changefreq>
61
+ <lastmod>2026-08-14</lastmod>
62
+ </url>
63
+ <url>
64
+ <loc>https://das-rebel.github.io/a3m-router/cerebras.html</loc>
65
+ <priority>0.6</priority>
66
+ <changefreq>monthly</changefreq>
67
+ <lastmod>2026-08-14</lastmod>
68
+ </url>
69
+ </urlset>
@@ -0,0 +1,157 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Best LLM Routers 2025: A Comprehensive Comparison | A3M Router</title>
7
+ <meta name="description" content="Compare the best LLM routers of 2025: A3M Router vs LiteLLM vs Vercel AI Gateway vs LocalAI vs Portkey. Parallel execution, provider count, cost, MCP support, and open source analyzed.">
8
+ <meta name="keywords" content="best llm router, llm gateway comparison, litellm vs a3m, vercel ai gateway vs litellm, llm routing 2025, open source llm router">
9
+ <meta name="robots" content="index, follow">
10
+ <link rel="canonical" href="https://a3m-router.com/blog/best-llm-routers-2025">
11
+ <link rel="stylesheet" href="../assets/styles.css">
12
+ <script type="application/ld+json">
13
+ {
14
+ "@context": "https://schema.org",
15
+ "@type": "Article",
16
+ "headline": "Best LLM Routers 2025: A Comprehensive Comparison",
17
+ "description": "A thorough comparison of the leading LLM routing solutions including A3M Router, LiteLLM, Vercel AI Gateway, LocalAI, and Portkey.",
18
+ "author": {"@type": "Organization", "name": "A3M Router Team"},
19
+ "datePublished": "2025-01-15",
20
+ "dateModified": "2025-01-15"
21
+ }
22
+ </script>
23
+ </head>
24
+ <body>
25
+ <header>
26
+ <nav>
27
+ <a href="/">A3M Router</a>
28
+ <a href="/providers/">Providers</a>
29
+ <a href="/blog/">Blog</a>
30
+ <a href="https://github.com/Das-rebel/a3m-router">GitHub</a>
31
+ </nav>
32
+ </header>
33
+
34
+ <main>
35
+ <article>
36
+
37
+ # Best LLM Routers 2025: A Comprehensive Comparison
38
+
39
+ *Published January 2025 · 12 min read*
40
+
41
+ ## What is an LLM Router?
42
+
43
+ An LLM router intelligently directs incoming queries to the most appropriate language model provider based on query characteristics, cost, availability, and capability requirements. Instead of hardcoding a single provider, a router acts as a smart gateway that optimizes for cost, speed, or quality on a per-query basis.
44
+
45
+ ## The Core Difference: Parallel vs Sequential
46
+
47
+ Most LLM gateways use **sequential fallback**: try Provider A → fail → try Provider B → fail → try Provider C → success → return. The first provider to succeed wins, regardless of cost or quality.
48
+
49
+ **A3M Router pioneered parallel execution**: call all suitable providers simultaneously → score responses → return the best one. This means you get the optimal answer at the lowest appropriate cost, not just the first one that works.
50
+
51
+ ## Comparison Table
52
+
53
+ | Router | Parallel Execution | Providers | Open Source | MCP Support | Python SDK | JS/TS SDK | Free Tier |
54
+ |--------|:-----------------:|----------:|:-----------:|:-----------:|:----------:|:---------:|:---------:|
55
+ | **A3M Router** | ✅ Yes | 47+ | ✅ Apache 2.0 | ✅ | ✅ | ✅ | ✅ |
56
+ | LiteLLM | ❌ Sequential | 100+ | ✅ Apache 2.0 | ❌ | ✅ | ✅ | ✅ |
57
+ | Vercel AI Gateway | ❌ Sequential | 12+ | ❌ Proprietary | ❌ | ✅ | ✅ | ✅ |
58
+ | LocalAI | ❌ Sequential | Local only | ✅ AGPL | ❌ | ✅ | ❌ | ✅ |
59
+ | Portkey | ❌ Sequential | 100+ | ❌ Proprietary | ❌ | ✅ | ✅ | ✅ |
60
+ | RouteLLM | ❌ Sequential | 6+ | ✅ Apache 2.0 | ❌ | ✅ | ❌ | ✅ |
61
+
62
+ ## Detailed Analysis
63
+
64
+ ### A3M Router
65
+ **Best for:** Teams wanting parallel execution with a unique ensemble scoring approach.
66
+
67
+ A3M Router calls multiple providers simultaneously and uses a weighted scoring system across domain match, specificity, structure alignment, verb matching, and cost tier. The cheapest provider that fully satisfies the query wins. It also features semantic caching, EXP3 diversity routing, and MVT rate-limit rotation.
68
+
69
+ - **Strengths:** Parallel execution, semantic cache, 47+ providers, open source, MCP server
70
+ - **Weaknesses:** Smaller community than LiteLLM
71
+ - **Cost:** Free (Apache 2.0); API costs depend on selected providers
72
+
73
+ ### LiteLLM
74
+ **Best for:** Maximum provider coverage with simple fallback configuration.
75
+
76
+ LiteLLM is the most mature open-source option with 100+ provider support. It uses sequential fallback and provides a unified interface for calling any LLM. Very popular (50K+ GitHub stars) with extensive documentation.
77
+
78
+ - **Strengths:** Largest provider ecosystem, battle-tested, excellent docs
79
+ - **Weaknesses:** Sequential fallback only, no parallel execution, no MCP support
80
+ - **Cost:** Free to self-host; hosted option available
81
+
82
+ ### Vercel AI Gateway
83
+ **Best for:** Teams already on Vercel wanting managed infrastructure.
84
+
85
+ Vercel's AI Gateway provides routing, caching, and failover for AI applications deployed on Vercel. Simple setup for Vercel users but proprietary and limited to Vercel's infrastructure.
86
+
87
+ - **Strengths:** Tight Vercel integration, managed service, simple setup
88
+ - **Weaknesses:** Proprietary, sequential fallback only, vendor lock-in
89
+ - **Cost:** Usage-based via Vercel
90
+
91
+ ### LocalAI
92
+ **Best for:** Teams running models entirely on-premise for data privacy.
93
+
94
+ LocalAI routes to local model instances (Ollama, llama.cpp, etc.) without any external API calls. Fully self-hosted, privacy-first.
95
+
96
+ - **Strengths:** Complete data privacy, no API costs, fully on-prem
97
+ - **Weaknesses:** Requires GPU hardware, sequential only, local models only
98
+ - **Cost:** Hardware + electricity
99
+
100
+ ### Portkey
101
+ **Best for:** Enterprise teams wanting observability and managed fallback.
102
+
103
+ Portkey provides a managed gateway with tracking, analytics, and automatic fallback across 100+ providers. Strong observability features.
104
+
105
+ - **Strengths:** Excellent observability, managed service, 100+ providers
106
+ - **Weaknesses:** Sequential fallback, proprietary, enterprise pricing
107
+ - **Cost:** Usage-based + subscription
108
+
109
+ ### RouteLLM
110
+ **Best for:** Researchers and teams wanting an open-source routing framework.
111
+
112
+ RouteLLM provides an open-source framework for routing with learning-based approaches. Supports multiple routers and fallback strategies.
113
+
114
+ - **Strengths:** Open source, research-friendly, multiple routing strategies
115
+ - **Weaknesses:** Sequential fallback, smaller provider count, less production-ready
116
+ - **Cost:** Free to self-host
117
+
118
+ ## Key Decision Factors
119
+
120
+ | Use Case | Recommended |
121
+ |----------|------------|
122
+ | Parallel execution + cost savings | A3M Router |
123
+ | Maximum provider variety | LiteLLM |
124
+ | Vercel deployment | Vercel AI Gateway |
125
+ | Privacy / on-premise | LocalAI |
126
+ | Enterprise observability | Portkey |
127
+ | Research / experimentation | RouteLLM |
128
+
129
+ ## FAQ
130
+
131
+ ### What is an LLM router?
132
+ An LLM router is a gateway that intelligently directs queries to the optimal language model provider based on query characteristics, cost, availability, and capability requirements, rather than hardcoding a single provider.
133
+
134
+ ### How does A3M Router differ from sequential fallback?
135
+ A3M Router calls multiple providers in parallel and scores every response using weighted signals (domain match, specificity, structure alignment). The cheapest provider that fully satisfies the query wins — not just the first one to respond successfully.
136
+
137
+ ### Which providers does A3M Router support?
138
+ A3M Router supports 47+ providers including OpenAI (GPT-4o, o1), Anthropic (Claude 3.5), Google (Gemini 1.5), Groq (LLaMA 3.3 70B), Mistral, DeepSeek, Cerebras, Ollama, and more.
139
+
140
+ ### Is A3M Router open source?
141
+ Yes, A3M Router is Apache 2.0 licensed and available on GitHub at [github.com/Das-rebel/a3m-router](https://github.com/Das-rebel/a3m-router).
142
+
143
+ ### How do I get started with A3M Router?
144
+ ```bash
145
+ npm install -g adaptive-memory-multi-model-router
146
+ a3m-router serve
147
+ # Then use OpenAI SDK with base_url: http://localhost:8787/v1
148
+ ```
149
+
150
+ </article>
151
+ </main>
152
+
153
+ <footer>
154
+ <p>&copy; 2025 A3M Router · <a href="https://github.com/Das-rebel/a3m-router">GitHub</a> · <a href="https://www.npmjs.com/package/adaptive-memory-multi-model-router">npm</a></p>
155
+ </footer>
156
+ </body>
157
+ </html>