From e7034ea53d65cf233c05e12e676a9d0348c68bb8 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 3 May 2024 16:54:24 -0700 Subject: [PATCH] feat - filter exceptions by model group --- litellm/proxy/proxy_server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 55202fd16..27a05ca21 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -7706,7 +7706,7 @@ async def model_metrics_exceptions( exception_type, COUNT(*) AS num_exceptions FROM "LiteLLM_ErrorLogs" - WHERE "startTime" >= $1::timestamp AND "endTime" <= $2::timestamp + WHERE "startTime" >= $1::timestamp AND "endTime" <= $2::timestamp AND model_group = $3 GROUP BY combined_model_api_base, exception_type ) SELECT @@ -7718,7 +7718,9 @@ async def model_metrics_exceptions( ORDER BY total_exceptions DESC LIMIT 200; """ - db_response = await prisma_client.db.query_raw(sql_query, startTime, endTime) + db_response = await prisma_client.db.query_raw( + sql_query, startTime, endTime, _selected_model_group + ) response: List[dict] = [] exception_types = set()