mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
[Fix] UI - Keys: Organization shows Not Set due to org_id/organization_id mismatch
The /key/list API returns `org_id` (the Pydantic field name), but the UI was reading `organization_id`, causing the Organization field to always show "Not Set" and the Organization ID filter to never match. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
38ea5aba80
commit
51d876ce79
4 changed files with 4 additions and 3 deletions
|
|
@ -210,7 +210,7 @@ export function VirtualKeysTable({ teams, organizations, onSortChange, currentSo
|
|||
},
|
||||
{
|
||||
id: "organization_id",
|
||||
accessorKey: "organization_id",
|
||||
accessorKey: "org_id",
|
||||
header: "Organization ID",
|
||||
size: 140,
|
||||
enableSorting: false,
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ export function useFilterLogic({
|
|||
|
||||
// Apply Organization ID filter
|
||||
if (filters["Organization ID"]) {
|
||||
result = result.filter((key) => key.organization_id === filters["Organization ID"]);
|
||||
result = result.filter((key) => (key.organization_id ?? key.org_id) === filters["Organization ID"]);
|
||||
}
|
||||
|
||||
setFilteredKeys(result);
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ export interface KeyResponse {
|
|||
blocked: boolean;
|
||||
litellm_budget_table: Record<string, unknown>;
|
||||
organization_id: string | null;
|
||||
org_id?: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
last_active: string | null;
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ export default function KeyInfoView({
|
|||
|
||||
<div>
|
||||
<Text className="font-medium">Organization</Text>
|
||||
<Text>{currentKeyData.organization_id || "Not Set"}</Text>
|
||||
<Text>{(currentKeyData.organization_id ?? currentKeyData.org_id) || "Not Set"}</Text>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue