From a23edd73b14aab0271349e1c4b811cb08d79f6df Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Wed, 22 Apr 2026 17:33:41 -0700 Subject: [PATCH] Restore Current Cycle Spend column on team members tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds back the per-cycle spend column that was replaced by Total Spend in 331e3f22. Current Cycle Spend reads membership.spend (zeroed on budget_reset_at) — this is the value enforced against the member's budget, so admins need it to see whether a member is approaching their cap for the active window. Total Spend remains for lifetime analytics. --- .../src/components/team/TeamMemberTab.tsx | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/team/TeamMemberTab.tsx b/ui/litellm-dashboard/src/components/team/TeamMemberTab.tsx index e997875968..1f2046fb90 100644 --- a/ui/litellm-dashboard/src/components/team/TeamMemberTab.tsx +++ b/ui/litellm-dashboard/src/components/team/TeamMemberTab.tsx @@ -46,6 +46,12 @@ export default function TeamMemberTab({ return "0"; }; + const getUserCurrentCycleSpend = (userId: string | null): number => { + if (!userId) return 0; + const membership = teamData.team_memberships.find((tm) => tm.user_id === userId); + return membership?.spend ?? 0; + }; + const getUserTotalSpend = (userId: string | null): number => { if (!userId) return 0; const membership = teamData.team_memberships.find((tm) => tm.user_id === userId); @@ -127,11 +133,25 @@ export default function TeamMemberTab({ ); }, }, + { + title: ( + + Current Cycle Spend (USD) + + + + + ), + key: "spend", + render: (_: unknown, record: Member) => ( + ${formatNumberWithCommas(getUserCurrentCycleSpend(record.user_id), 4)} + ), + }, { title: ( Total Spend (USD) - +