Multi-LLM router + timeout protection + health monitoring
Target: > 99%
Requests routed to rules
Target: < 1000ms
(last 100 requests)
✅ Multi-LLM Router: Tries Gemini first, falls back to rule engine if fails/times out
✅ Timeout Protection: 8-second hard timeout per request (no hanging)
✅ Health Monitoring: Real-time Gemini status tracking (checked every 30s)
✅ Auto Recovery: System attempts to recover from degraded state
✅ Rule-Based Fallback: Pattern matching for common intents (menu, price, order, etc.)
✅ Request Logging: Every request logged with provider, time, and quality score
✅ Status Escalation: 3+ consecutive failures → "unhealthy" state
Request takes > 8 seconds: Automatically aborted, fallback rules engine used
Fallback response quality: ~70% (pattern-matched) vs ~95% (Gemini)
Customer experience: Always gets a response, never hangs
Fallback examples: