Multi-Model Router
Route AI requests to the best model per task
About
Intelligent model routing based on task type. Configure rules to automatically select the best model for each request — send code questions to the 70B model, creative tasks to a high-temperature 8B, and everything else to a balanced default.
Compare responses across models side-by-side, set fallback chains, and optimize cost vs. quality per task type.
API Endpoints
/chat/compare/rules/models/healthHow It Works
Task Classification
Incoming request classified by task_type (code, creative, analysis, general).
Rule Matching
Routing rules loaded from persistent storage — task type mapped to target model.
Model Dispatch
Request forwarded to the selected AI model.
Fallback Handling
If primary model fails, request automatically retried with the fallback model.
Use Cases
Cost Optimization
Route simple queries to smaller models and complex ones to larger models automatically.
A/B Testing
Compare model outputs side-by-side to evaluate quality for your use case.
Fallback Chains
Set primary and fallback models so requests never fail due to model unavailability.
Task Specialization
Route code, creative writing, and analysis to purpose-optimized models.
Opens Aerostack dashboard to deploy this template
What's Included
Pipeline
Billing Model
metered
Pay per token used. Free tier included.