litellm/tests/unit/integrations/SlackAlerting
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
..
__init__.py
test_budget_alert_types.py fix(alerts): route budget refusals through shared policies (#56113) 2026-12-03 19:29:32 -08:00
test_hanging_request_check.py fix(alerting): retire completed requests and prevent hanging alert starvation (#54493) 2026-11-25 13:05:51 -08:00
test_model_deprecation_alert.py feat(alerts): add management controls and opt-in daily summaries (#51418) 2026-11-12 10:06:07 -08:00
test_ms_teams.py
test_slack_alerting.py fix(alerts): route budget refusals through shared policies (#56113) 2026-12-03 19:29:32 -08:00
test_slack_alerting_delivery.py test: replace 61 live logging and otel tests with offline unit and integration coverage (#45362) 2026-10-08 15:55:57 -07:00
test_slack_alerting_digest.py
test_slack_alerting_utils.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
test_user_spend_alerts.py