Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(networking.tsx): use more efficient query for getting list of users

Krrish Dholakiac2eb4d7f4e45
diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx
index 6b8c7671a10..8034860e7d3 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 2a916db7f0f..1eddfd18c38 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 }))
},