litellm/tests/unit/proxy/auth/host
tin-berri d89ea4f7ce
fix(alerts): route budget refusals through shared policies (#56113)
* fix(alerts): route budget refusals through shared policies

* style(rust): format budget refusal error

* test(proxy): use real budget alert payloads

* test(alerts): consolidate refusal routing regressions

* fix(alerts): email the owner once when a configured 100% alert fires

A refused key or team member with a 100% entry in max_budget_alert_emails
got the generic budget-crossed email and the dedicated 100% email. The
dedicated producer already includes the owner, so the generic email now
stands down when that producer exists and owns the 100% threshold. Chat
and webhook delivery are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(alerts): keep malformed alert config out of key admission and email each project user

A key whose max_budget_alert_emails metadata is not a threshold map made
the percentage notifier raise AttributeError inside the key budget check.
The key producer now validates its config with the same helper the team
and team-member producers use.

The project soft-budget email marker was keyed by project only, so the
first calling user's email suppressed every other user's. It is now keyed
by project and recipient.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-03 19:29:32 -08:00
..
steps refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
__init__.py feat(auth): decide key and JWT authentication in a Rust core (#51374) 2026-11-17 14:07:47 +09:00
test_answer.py refactor(rust): rename the compiled module _native to _rust (#55198) 2026-12-01 07:08:38 -08:00
test_facts.py feat(auth): decide key and JWT authentication in a Rust core (#51374) 2026-11-17 14:07:47 +09:00
test_identity.py fix(proxy): stop the cached master key from carrying one end user's budget to the next (#56015) 2026-12-03 18:08:00 +00:00
test_python.py fix(alerts): route budget refusals through shared policies (#56113) 2026-12-03 19:29:32 -08:00