litellm/litellm-rust
Nate Armstrong 4d7802f169
fix(gateway): stop serving routes outside the hooks and return reservations of failed requests (#47355)
* fix(gateway): refuse spent keys on every route and return reservations of requests that fail before routing

Auth refuses a key or team whose stored spend has reached its budget again, so
/v1/responses, audio and OCR, which skip the hook pipeline, stop exhausted keys
as the proxy does. The budgets hook still enforces the live counters on
messages and chat.

A request whose body is rejected after the hooks ran, such as an invalid
`cache` option, now records its failure so the budget reservation and rate
limit leases are returned. A request dropped mid-route, as when the client
goes away, is recorded as interrupted with status 499 for the same reason.

* fix(gateway): stop serving responses, audio and ocr instead of refusing spent keys in auth

/v1/responses, /v1/audio/transcriptions and /v1/ocr never ran the hook
pipeline, so budgets, rate limits and spend logging did not apply to them.
They now answer 501 like the other routes the gateway does not serve, and the
stored-spend check in auth is dropped again: the budgets hook covers every
route that remains.

* chore(gateway): update Cargo.lock for the dropped route crates

* fix(gateway): keep the reservation of a request cut off after it reached the provider
2026-10-19 14:38:45 -07:00
..
.agents/skills refactor(rust): derive strum VariantArray and string conversions (#45434) 2026-10-08 21:24:49 +00:00
crates fix(gateway): stop serving routes outside the hooks and return reservations of failed requests (#47355) 2026-10-19 14:38:45 -07:00
docs feat(loadtest): chat completions parity check between the python proxy and the gateway (#47362) 2026-10-19 12:55:26 -07:00
loadtest feat(loadtest): chat completions parity check between the python proxy and the gateway (#47362) 2026-10-19 12:55:26 -07:00
.dockerignore feat(gateway): load-test kit, Docker build knobs and TCP_NODELAY for the customer proxy (#46806) 2026-10-16 12:42:59 -07:00
.gitignore feat: add LiteLLM Rust workspace with Mistral OCR bridge (#31033) 2026-06-23 13:16:47 -07:00
AGENTS.md feat(rust): add native OpenRouter Responses (#46000) 2026-10-15 11:02:03 -07:00
Cargo.lock fix(gateway): stop serving routes outside the hooks and return reservations of failed requests (#47355) 2026-10-19 14:38:45 -07:00
Cargo.toml feat(gateway): hooks and observers around inference requests, with usage and cost (#47032) 2026-10-19 09:58:43 -07:00
clippy.toml feat(rust): add the MCP gateway (#43470) 2026-09-27 19:37:41 -07:00