firerouter and routes to either a closed-source model (pass-through) or a Fireworks open model (redirect). The x-routing-preference request header lets you bias that decision toward quality or savings.
Preference levels
Send an integer from 1 (most quality-protective) to 5 (most savings-focused):HTTP header
Set the header on each request:3).
FireConnect
When you enable FireRouter through FireConnect, pass--routing-preference on on instead of setting a header yourself:
1–5 or the level names (max-intelligence, balanced, max-savings, etc.). The flag applies when at least one configured slot uses firerouter. Codex, Cursor, and Deep Agents do not support --routing-preference.
You can also store a global Anthropic BYOK key once:
When to adjust
- High-volume workloads with many simple requests: try
4or5to redirect summaries, formatting, and straightforward Q&A. - Tasks where quality is critical (security review, complex reasoning, nuanced writing): try
1or2to keep closed-source models on harder prompts. - Evaluating routing: start at
3(balanced), then move one step at a time and compare cost and output quality.
Related
- Overview: how redirect vs. pass-through works
- FireConnect overview: enable FireRouter in coding harnesses
- Quickstart: API call examples
- LiteLLM: add FireRouter to LiteLLM Proxy