litellm-mirror/litellm/integrations/SlackAlerting
Ishaan Jaff 081826a5d6
(Feat) soft budget alerts on keys (#7623)
* class WebhookEvent(CallInfo):
Add

* handle soft budget alerts

* handle soft budget

* fix budget alerts

* fix CallInfo

* fix _get_user_info_str

* test_soft_budget_alerts

* test_soft_budget_alert
2025-01-07 21:36:34 -08:00
..
batching_handler.py [Feature]: - allow print alert log to console (#7534) 2025-01-03 17:48:13 -08:00
Readme.md (feat proxy slack alerting) - allow opting in to getting key / internal user alerts (#5990) 2024-10-01 10:49:22 -07:00
slack_alerting.py (Feat) soft budget alerts on keys (#7623) 2025-01-07 21:36:34 -08:00
utils.py (Feat) - Add PagerDuty Alerting Integration (#7478) 2025-01-01 07:12:51 -08:00

Slack Alerting on LiteLLM Gateway

This folder contains the Slack Alerting integration for LiteLLM Gateway.

Folder Structure

  • slack_alerting.py: This is the main file that handles sending different types of alerts
  • batching_handler.py: Handles Batching + sending Httpx Post requests to slack. Slack alerts are sent every 10s or when events are greater than X events. Done to ensure litellm has good performance under high traffic
  • types.py: This file contains the AlertType enum which is used to define the different types of alerts that can be sent to Slack.
  • utils.py: This file contains common utils used specifically for slack alerting

Further Reading