From 66bf90c7599369eb4abb6dfe0ce39b4f2c70ab07 Mon Sep 17 00:00:00 2001 From: Mrinal Chanshetty Date: Tue, 20 Oct 2026 14:40:16 -0700 Subject: [PATCH] refactor(ui): trim comments that restated the Spend Per Tag code --- .../_components/components/EntityUsage/teamTagSpend.ts | 7 +------ .../src/components/UsagePage/dailyActivityApi.ts | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/EntityUsage/teamTagSpend.ts b/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/EntityUsage/teamTagSpend.ts index cecbd1da74e..8a6ed8171cc 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/EntityUsage/teamTagSpend.ts +++ b/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/EntityUsage/teamTagSpend.ts @@ -18,11 +18,7 @@ const emptyRow = (tag: string): TeamTagSpendRow => ({ total_tokens: 0, }); -/** - * The Team view's per-tag breakdown, from a group_by=tag report whose - * breakdown.entities are keyed by tag: one row per tag summed across days, - * zero-spend tags dropped, highest spend first (ties by tag name). - */ +/** One row per tag summed across days, zero-spend tags dropped, highest spend first (ties by tag name). */ export const teamTagSpendRows = (days: readonly DailyData[]): TeamTagSpendRow[] => { const byTag = new Map(); for (const day of days) { @@ -44,6 +40,5 @@ export const teamTagSpendRows = (days: readonly DailyData[]): TeamTagSpendRow[] .sort((a, b) => b.spend - a.spend || a.tag.localeCompare(b.tag)); }; -/** The card answers "what did this team spend per tag", so it needs exactly one team. */ export const singleTeamId = (selectedTeamIds: readonly string[]): string | null => selectedTeamIds.length === 1 ? selectedTeamIds[0] : null; diff --git a/ui/litellm-dashboard/src/components/UsagePage/dailyActivityApi.ts b/ui/litellm-dashboard/src/components/UsagePage/dailyActivityApi.ts index 0cd9d0b6633..ab1d0ebbc6d 100644 --- a/ui/litellm-dashboard/src/components/UsagePage/dailyActivityApi.ts +++ b/ui/litellm-dashboard/src/components/UsagePage/dailyActivityApi.ts @@ -26,7 +26,6 @@ export interface DailyActivityRequest { model?: string | null; includeCurrentUtcDay?: boolean; apiKeyLimit?: number; - /** Team reports only: "tag" buckets one team's spend by tag (needs exactly one id in entityIds). */ groupBy?: TeamGroupBy; }