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.
- 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.d.ts +6 -0
- package/dist/cli/tui.js +96 -67
- package/dist/cli/tui.js.map +1 -0
- 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.d.ts.map +1 -0
- 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/docs/llms.txt
CHANGED
|
@@ -1,77 +1,76 @@
|
|
|
1
|
-
# A3M Router
|
|
2
|
-
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
70
|
+
pip install adapters/
|
|
71
|
+
docker-compose up -d
|
|
61
72
|
```
|
|
62
73
|
|
|
63
|
-
##
|
|
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
|
-
|
|
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>© 2025 A3M Router · <a href="https://github.com/Das-rebel/a3m-router">GitHub</a></p></footer>
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
package/docs/ollama.html
ADDED
|
@@ -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>© 2025 A3M Router · <a href="https://github.com/Das-rebel/a3m-router">GitHub</a></p></footer>
|
|
49
|
+
</body>
|
|
50
|
+
</html>
|
package/docs/openai.html
ADDED
|
@@ -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&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>© 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=
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
</
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
</
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
</
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
</
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
<
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
</
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
<
|
|
37
|
-
<
|
|
38
|
-
</
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
</
|
|
45
|
-
<
|
|
46
|
-
<
|
|
47
|
-
<
|
|
48
|
-
<
|
|
49
|
-
<
|
|
50
|
-
</
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
<
|
|
56
|
-
</
|
|
57
|
-
|
|
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>© 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>
|