2.4.4 · Lesson 19 of 25
Intelligent Model Routing
Different requests may require different models.
Overview
Different requests may require different models.
Request
↓
Routing Logic
/ | \
↓ ↓ ↓
Small FM General SpecializedStatic Routing
Rules are fixed.
If request = summary
→ Model A
If request = coding
→ Model BSimple and predictable.
Dynamic Routing
Routing depends on request characteristics.
Request ↓ Analyze request ↓ Determine complexity/type ↓ Select model ↓ Invoke FM
Step Functions can orchestrate dynamic workflows.
Metrics-Based Routing
Routing can consider:
- latency
- cost
- quality
- availability
- error rate
Example:
Model A Latency high ↓ Route new requests → Model B
API Gateway Transformations
API Gateway can participate in routing logic and request transformations.
Conceptually:
Client Request
↓
API Gateway
↓
Transform / Route
↓
Appropriate Backend / FM2.5 — Application Integration Patterns and Development Tools
This section takes the AI capabilities and puts them into actual applications and developer workflows.
Key points
- latency
- cost
- quality
- availability
- error rate
- Static Routing
- Dynamic Routing
- Metrics-Based Routing
Exam focus
Know when and how to apply Intelligent Model Routing in production GenAI implementations.