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]

ui linting fix

Ishaan Jaffc5606c06ae50
diff --git a/ui/litellm-dashboard/src/components/all_keys_table.tsx b/ui/litellm-dashboard/src/components/all_keys_table.tsx
index 5911abd6355..75820d093b3 100644
--- a/ui/litellm-dashboard/src/components/all_keys_table.tsx
+++ b/ui/litellm-dashboard/src/components/all_keys_table.tsx
@@ -328,10 +328,12 @@ export function AllKeysTable({
org.organization_id?.toLowerCase().includes(searchText.toLowerCase()) ?? false
);
- return filteredOrgs.map(org => ({
- label: `${org.organization_id || 'Unknown'} (${org.organization_id})`,
- value: org.organization_id
- }));
+ return filteredOrgs
+ .filter(org => org.organization_id !== null && org.organization_id !== undefined)
+ .map(org => ({
+ label: `${org.organization_id || 'Unknown'} (${org.organization_id})`,
+ value: org.organization_id as string
+ }));
}
},
];
diff --git a/ui/litellm-dashboard/src/components/key_team_helpers/filter_helpers.ts b/ui/litellm-dashboard/src/components/key_team_helpers/filter_helpers.ts
index 70a78ffb03f..727bcdeb703 100644
--- a/ui/litellm-dashboard/src/components/key_team_helpers/filter_helpers.ts
+++ b/ui/litellm-dashboard/src/components/key_team_helpers/filter_helpers.ts
@@ -27,7 +27,7 @@ export const fetchAllKeyAliases = async (accessToken: string | null): Promise<st
// Extract aliases from this page
const pageAliases = response.keys
- .map(key => key.key_alias)
+ .map((key: any) => key.key_alias)
.filter(Boolean) as string[];
allAliases = [...allAliases, ...pageAliases];
@@ -41,7 +41,7 @@ export const fetchAllKeyAliases = async (accessToken: string | null): Promise<st
}
// Remove duplicates
- return [...new Set(allAliases)];
+ return Array.from(new Set(allAliases));
} catch (error) {
console.error("Error fetching all key aliases:", error);
return [];
@@ -66,8 +66,7 @@ export const fetchAllTeams = async (accessToken: string | null, organizationId?:
const response = await teamListCall(
accessToken,
organizationId || null,
- currentPage,
- 100 // larger page size to reduce number of requests
+ null,
);
// Add teams from this page
@@ -103,9 +102,7 @@ export const fetchAllOrganizations = async (accessToken: string | null): Promise
while (hasMorePages) {
const response = await organizationListCall(
- accessToken,
- currentPage,
- 100 // larger page size to reduce number of requests
+ accessToken
);
// Add organizations from this page
diff --git a/ui/litellm-dashboard/src/components/key_team_helpers/filter_logic.tsx b/ui/litellm-dashboard/src/components/key_team_helpers/filter_logic.tsx
index 6333f20b240..243d3d05450 100644
--- a/ui/litellm-dashboard/src/components/key_team_helpers/filter_logic.tsx
+++ b/ui/litellm-dashboard/src/components/key_team_helpers/filter_logic.tsx
@@ -1,6 +1,7 @@
import { useEffect, useState } from "react";
import { KeyResponse } from "../key_team_helpers/key_list";
-import { Team, Organization } from "../networking";
+import { Organization } from "../networking";
+import { Team } from "../key_team_helpers/key_list";
export interface FilterState {
'Team ID': string;