From c2eb4d7f4e450271b0526add0e4a7ac12a6ee1d2 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 4 Oct 2025 12:07:21 -0700 Subject: [PATCH] fix(networking.tsx): use more efficient query for getting list of users --- ui/litellm-dashboard/src/components/networking.tsx | 6 +++--- ui/litellm-dashboard/src/components/view_logs/index.tsx | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index 6b8c7671a1..8034860e7d 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -2514,10 +2514,10 @@ export const allTagNamesCall = async (accessToken: String) => { export const allEndUsersCall = async (accessToken: String) => { try { let url = proxyBaseUrl - ? `${proxyBaseUrl}/global/all_end_users` - : `/global/all_end_users`; + ? `${proxyBaseUrl}/customer/list` + : `/customer/list`; - console.log("in global/all_end_users call", url); + console.log("in customer/list", url); const response = await fetch(`${url}`, { method: "GET", headers: { diff --git a/ui/litellm-dashboard/src/components/view_logs/index.tsx b/ui/litellm-dashboard/src/components/view_logs/index.tsx index 2a916db7f0..1eddfd18c3 100644 --- a/ui/litellm-dashboard/src/components/view_logs/index.tsx +++ b/ui/litellm-dashboard/src/components/view_logs/index.tsx @@ -419,7 +419,8 @@ export default function SpendLogsTable({ searchFn: async (searchText: string) => { if (!accessToken) return [] const data = await allEndUsersCall(accessToken) - const users = data?.end_users || [] + // data if set, is a list of objects, with key = user_id + const users = data?.map((u: any) => u.user_id) || [] const filtered = users.filter((u: string) => u.toLowerCase().includes(searchText.toLowerCase())) return filtered.map((u: string) => ({ label: u, value: u })) },