From 7eafac8e7f50f491e51e686aee61b73b776549d9 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Wed, 4 Mar 2026 20:18:54 -0800 Subject: [PATCH] Fix remaining org_id fallbacks in filter_helpers and TeamVirtualKeysTable filter_helpers.ts was not populating the Organization ID filter dropdown (always empty). TeamVirtualKeysTable was showing the team's org for all keys instead of each key's own org. Co-Authored-By: Claude Sonnet 4.6 --- .../src/components/key_team_helpers/filter_helpers.ts | 2 +- .../src/components/team/TeamVirtualKeysTable.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 b587e090d33..fb701b4656b 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 @@ -22,7 +22,7 @@ const processKeysIntoOptions = ( if (alias && typeof alias === "string") { keyAliases.add(alias.trim()); } - const orgId = key?.organization_id; + const orgId = key?.organization_id ?? key?.org_id; if (orgId && typeof orgId === "string") { organizationIds.add(orgId.trim()); } diff --git a/ui/litellm-dashboard/src/components/team/TeamVirtualKeysTable.tsx b/ui/litellm-dashboard/src/components/team/TeamVirtualKeysTable.tsx index 5d76b99ef91..c8a54145b51 100644 --- a/ui/litellm-dashboard/src/components/team/TeamVirtualKeysTable.tsx +++ b/ui/litellm-dashboard/src/components/team/TeamVirtualKeysTable.tsx @@ -91,7 +91,7 @@ export function TeamVirtualKeysTable({ teamId, teamAlias, organization }: TeamVi if (!orgId) return kList; return kList.map((k: KeyResponse) => ({ ...k, - organization_id: k.organization_id || orgId, + organization_id: (k.organization_id ?? k.org_id) || orgId, })); }, [keys?.keys, organization?.organization_id]);