From 01dde982363ba6a8fc55b2ec7752606e5188a9f1 Mon Sep 17 00:00:00 2001 From: zhengxinliang Date: Thu, 15 Oct 2026 12:43:30 +0800 Subject: [PATCH] fix(logs): satisfy current lint gates --- litellm/proxy/spend_tracking/spend_management_endpoints.py | 2 +- .../src/components/logs/request/useLogFilterLogic.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/spend_tracking/spend_management_endpoints.py b/litellm/proxy/spend_tracking/spend_management_endpoints.py index db01731c8f9..53f9e4427cf 100644 --- a/litellm/proxy/spend_tracking/spend_management_endpoints.py +++ b/litellm/proxy/spend_tracking/spend_management_endpoints.py @@ -2918,7 +2918,7 @@ async def ui_view_spend_logs( if exclude_key_alias: sql_conditions.append(f"metadata->>'user_api_key_alias' IS DISTINCT FROM ${p}") sql_params.append(exclude_key_alias) - p += 1 + p += 1 # rebind-ok: advances the existing shared SQL placeholder counter if error_code is not None: sql_conditions.append(f"metadata->'error_information'->>'error_code' = ${p}") sql_params.append(error_code) diff --git a/ui/litellm-dashboard/src/components/logs/request/useLogFilterLogic.ts b/ui/litellm-dashboard/src/components/logs/request/useLogFilterLogic.ts index fa2d9c432c2..190345958af 100644 --- a/ui/litellm-dashboard/src/components/logs/request/useLogFilterLogic.ts +++ b/ui/litellm-dashboard/src/components/logs/request/useLogFilterLogic.ts @@ -176,7 +176,7 @@ export function useLogFilterLogic({ const userIdFilter = getFilterValue(columnFilters, LOG_FILTER_IDS.USER_ID); - return await uiSpendLogsCall({ + const spendLogsRequest: Parameters[0] = { accessToken, start_date: window.start_date, end_date: window.end_date, @@ -206,7 +206,8 @@ export function useLogFilterLogic({ group_by_session: true, session_cursor: sessionCursor, }, - }); + }; + return await uiSpendLogsCall(spendLogsRequest); }, enabled: !!accessToken && !!token && !!userRole && !!userID && activeTab === "request logs", refetchInterval: getLiveTailRefetchInterval(isLiveTail, pagination.pageIndex),