mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(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
This commit is contained in:
parent
4e69711411
commit
081826a5d6
7 changed files with 201 additions and 33 deletions
|
@ -600,6 +600,7 @@ class ProxyLogging:
|
|||
type: Literal[
|
||||
"token_budget",
|
||||
"user_budget",
|
||||
"soft_budget",
|
||||
"team_budget",
|
||||
"proxy_budget",
|
||||
"projected_limit_exceeded",
|
||||
|
@ -1534,7 +1535,8 @@ class PrismaClient:
|
|||
b.max_budget AS litellm_budget_table_max_budget,
|
||||
b.tpm_limit AS litellm_budget_table_tpm_limit,
|
||||
b.rpm_limit AS litellm_budget_table_rpm_limit,
|
||||
b.model_max_budget as litellm_budget_table_model_max_budget
|
||||
b.model_max_budget as litellm_budget_table_model_max_budget,
|
||||
b.soft_budget as litellm_budget_table_soft_budget
|
||||
FROM "LiteLLM_VerificationToken" AS v
|
||||
LEFT JOIN "LiteLLM_TeamTable" AS t ON v.team_id = t.team_id
|
||||
LEFT JOIN "LiteLLM_TeamMembership" AS tm ON v.team_id = tm.team_id AND tm.user_id = v.user_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue