Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webhook support for budget alerts #3748

Merged
merged 7 commits into from
May 21, 2024
Merged

Conversation

krrishdholakia
Copy link
Contributor

@krrishdholakia krrishdholakia commented May 21, 2024

Title

webhook support for budget alerts

Relevant issues

Closes #3743

Emits

{
  "spend": 1,
  "max_budget": 0,
  "token": "88dc28d0f030c55ed4ab77ed8faf098196cb1c05df778539800c9f1243fe6b4b",
  "user_id": "default_user_id",
  "team_id": null,
  "user_email": null,
  "key_alias": null,
  "projected_exceeded_data": null,
  "projected_spend": null,
  "event": "budget_crossed",
  "event_group": "user",
  "event_message": "User Budget: Budget Crossed"
}

Type

🆕 New Feature
🧹 Refactoring

Changes

  • refactors 'slack_alerting.py' to also emit webhook events

[REQUIRED] Testing - Attach a screenshot of any new tests passing locall

If UI changes, send a screenshot/GIF of working UI fixes

  • new test_webhook_alerting test in test_alerting.py
Screenshot 2024-05-20 at 5 06 49 PM

Copy link

vercel bot commented May 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2024 1:42am

@krrishdholakia krrishdholakia merged commit 1006284 into main May 21, 2024
1 of 4 checks passed
@krrishdholakia krrishdholakia deleted the litellm_webhook_support branch May 21, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Webhooks for budget alerting events
1 participant