mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Merge pull request #3435 from BerriAI/litellm_ui_filter_exceptions_by_model_group
Admin UI - filter exceptions by model group
This commit is contained in:
commit
debd8137f3
2 changed files with 7 additions and 3 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -526,7 +526,9 @@ export const modelExceptionsCall = async (
|
|||
*/
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/model/metrics/exceptions` : `/model/metrics/exceptions`;
|
||||
|
||||
if (modelGroup) {
|
||||
url = `${url}?_selected_model_group=${modelGroup}`
|
||||
}
|
||||
const response = await fetch(url, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue