Changelog

Cost Routing: Route Model Action

A new rule action swaps the requested model for a cheaper one — always, or only once a budget passes a spend threshold.

Rules can now change which model a request is sent to. The new Route Model action rewrites the model field before the proxy forwards the request — either for every matching request, or only once a matching budget has spent a configurable share of its limit (say, downgrade to gpt-4o-mini at 80%). Combine it with a condition on model, label, or header to scope it. The original model is recorded as requested_model on the trace and returned in the x-grepture-routed-model response header, so you can see exactly where routing saved money.