From the source
Lovable's infrastructure team describes how it routes traffic across multiple LLM providers at over one billion tokens per minute, using multiple fallback chains with project-level affinity to preserve prompt caching and automatically adjusting provider weights via a PID controller to handle outages and rate limits.





