Overview
The Cortex Router plugin provides intelligent, multi-tier routing that automatically selects the optimal model based on request content. This eliminates the need to manually choose providers and models for each request.Quick Start
Enable Cortex Router
Basic Usage
How It Works
Cortex Router analyzes requests through multiple tiers:1
Reflex Tier (<1ms)
Pattern matching for obvious cases:
- Code blocks → coding model
- PII detection → secure/local model
- Image attachments → vision model
2
Semantic Tier (<20ms)
Embedding-based intent matching (Phase 2):
- Compute query embedding
- Match against pre-computed intent vectors
- Route if confidence > threshold
3
Cognitive Tier (200-500ms)
LLM-based classification:
- Analyze query with router model
- Generate confidence scores
- Select optimal capability slot
Routing Examples
Coding Tasks
Reasoning Tasks
Fast Queries
Secure/Private Data
Phase 2 Features
Semantic Tier
Enable faster intent matching with embeddings:- 10-20x faster than LLM classification
- Deterministic results
- No API costs
Skill Matching
Match queries to domain-specific skills:Dynamic Model Discovery
Automatically discover available models from all providers:- Queries all providers for available models at startup
- Assigns optimal models to capability slots based on:
- Model capabilities (coding, reasoning, vision)
- Context window size
- Cost
- Local vs cloud
- Updates the matrix automatically
Quality-Based Cascading
Automatically escalate to better models if quality is insufficient:Capability Matrix
The matrix defines which models handle which types of requests:Slot Descriptions
Monitoring and Debugging
View Routing Decisions
Check logs to see how queries are routed:Override Routing
Force a specific slot:Disable Cortex for Specific Requests
Performance Comparison
Best Practices
Complete Configuration Example
Next Steps
Cortex Router Guide
Complete Cortex Router documentation
Embedding SDK
Learn about the embedding engine
Multi-Provider
Manual multi-provider patterns
Configuration
Configure all routing options