firerouter request favors its primary model or lower-cost models. Set it per HTTP request with x-routing-preference, or configure it for a supported harness with FireConnect.
Preference levels
Send an integer from 1 (strongest preference for the primary model) to 5 (strongest preference for lower-cost models):HTTP header
The HTTP header accepts only the integers1 to 5. Names such as balanced are FireConnect CLI values, not HTTP header values.
Set the header on an API request:
x-routing-preference: 3 header.
FireConnect
When you connect a harness tofirerouter or a supported firerouter/... ID, pass --routing-preference with the connect command:
FireConnect accepts values
1 to 5 or the corresponding level names. Claude Code returns an error if you combine --routing-preference with a compound ID such as firerouter/opus. Cursor CLI is not supported.
When to adjust
- High-volume workloads with many simple requests: try
4or5so summaries, formatting, and straightforward Q&A are more likely to use a lower-cost model. - Tasks where quality is critical (security review, complex reasoning, nuanced writing): try
1or2so the router favors its primary model. - Evaluating routing: start at
3(balanced), then move one step at a time and compare cost and output quality.
Related
- FireRouter:
firerouter,firerouter/opus, andfirerouter/astra - APIs and SDKs: HTTP headers and Provider Keys
- FireConnect: enable a router in a coding harness