mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
(fix) slack alerting - don't spam the failed cost tracking alert for the same model (#6543)
* fix use failing_model as cache key for failed_tracking_alert * fix use standard logging payload for getting response cost * fix kwargs.get("response_cost") * fix getting response cost
This commit is contained in:
parent
94a2963b35
commit
ab0e405453
4 changed files with 24 additions and 12 deletions
|
@ -667,13 +667,18 @@ class ProxyLogging:
|
|||
raise e
|
||||
return data
|
||||
|
||||
async def failed_tracking_alert(self, error_message: str):
|
||||
async def failed_tracking_alert(
|
||||
self,
|
||||
error_message: str,
|
||||
failing_model: str,
|
||||
):
|
||||
if self.alerting is None:
|
||||
return
|
||||
|
||||
if self.slack_alerting_instance:
|
||||
await self.slack_alerting_instance.failed_tracking_alert(
|
||||
error_message=error_message
|
||||
error_message=error_message,
|
||||
failing_model=failing_model,
|
||||
)
|
||||
|
||||
async def budget_alerts(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue