Pareto Optimization
The Trade-off
Section titled “The Trade-off”Every request faces a choice: pay more for better quality, or save money with a cheaper model. The Pareto optimizer finds the sweet spot based on your preferences.
Four Modes
Section titled “Four Modes”objective = 0.05 * quality + 0.95 * costMinimizes energy consumption. Routes almost everything to the smallest, fastest models. Reduces compute footprint. Good for high-volume workloads where quality can take a backseat.
objective = 0.15 * quality + 0.85 * costPrioritizes cost savings. Sends most requests to cheap providers. Good for high-volume, low-stakes usage.
Balanced
Section titled “Balanced”objective = 0.55 * quality + 0.45 * costThe default. Balances quality and cost equally. Works well for most use cases.
Accurate
Section titled “Accurate”objective = 0.85 * quality + 0.15 * costPrioritizes quality. Routes complex prompts to the best available models. Use this for critical tasks.
Changing Modes
Section titled “Changing Modes”Edit ~/.config/fastlane/settings.toml:
[general]mode = "eco" # eco, cheap, balanced, or accurateOr via the API:
curl -X POST http://127.0.0.1:8787/v1/settings \ -H "Content-Type: application/json" \ -d '{"general": {"mode": "eco"}, "byok": {}, "affiliate": {}}'Restart the proxy for changes to take effect.
Visual Example
Section titled “Visual Example”For a complex coding prompt in balanced mode:
| Model | Quality | Cost | Objective |
|---|---|---|---|
| gemma2-9b-it | 0.88 | 0.93 | 0.91 |
| claude-sonnet-4 | 1.00 | 0.02 | 0.55 |
| gpt-4o | 0.95 | 0.17 | 0.58 |
The optimizer picks the best value across the quality-cost spectrum.