From 5fd3b12d34993bbe4aa8974e7d207b90c1ad1358 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 7 May 2024 17:46:18 -0700 Subject: [PATCH] add router alerting type --- litellm/types/router.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/litellm/types/router.py b/litellm/types/router.py index 4a62a267e..d79fb2e2e 100644 --- a/litellm/types/router.py +++ b/litellm/types/router.py @@ -346,3 +346,19 @@ class RetryPolicy(BaseModel): RateLimitErrorRetries: Optional[int] = None ContentPolicyViolationErrorRetries: Optional[int] = None InternalServerErrorRetries: Optional[int] = None + + +class RouterAlerting(BaseModel): + """ + Use this configure alerting for the router. Receive alerts on the following events + - LLM API Exceptions + - LLM Responses Too Slow + - LLM Requests Hanging + + Args: + webhook_url: Optional[str] = None - webhook url for alerting + alerting_threshold: Optional[float] = None - threhshold for slow / hanging llm responses (in seconds) + """ + + webhook_url: Optional[str] = None + alerting_threshold: Optional[float] = None