02/Model Gateway
Auto Strategy
Rule-based model switching + request/user limits.
The auto strategy automatically picks a model by request features: rules like input-size (token) thresholds and vision needs. It can also enforce per-request (413) and per-user daily (429) limits.
- input_tokens_gte
- Switch to a larger-context model when input exceeds a token count.
- is_vision
- Switch to a vision-capable model when the request has images.
- auto_max_input_tokens
- Returns 413 if exceeded (request too large).
- auto_daily_request_cap
- Returns 429 when a user's daily quota is exceeded.
For richer, graph-based routing see the Rule and Score routers in the flow strategy — auto's rules are expressed more flexibly there.