Routing
Send each request to the model that should answer it — by priority, by cost, by latency, or by a header your app sets. Change the rule without shipping your app.
# lattice.yaml
routes:
- match: { header: x-tier, equals: free }
models: [mistral-small, llama-3.1-8b]
- match: { default: true }
models: [gpt-4o, claude-sonnet, gemini-pro]
strategy: lowest-latency