From 1989572d800d0b12334e92dd0eeef402e354e606 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Tue, 28 Apr 2026 20:44:43 -0700 Subject: [PATCH] feat(ui): add "Your Usage" view for admin users on usage page Admins were forced to use the global usage view with no way to scope it to their own activity without manually searching for themselves in the user filter dropdown. Adds a new "Your Usage" option (admin-only) to the usage view selector. When selected, it locks the data to the admin's own user_id and hides the "Filter by user" dropdown. --- .../components/UsageViewSelect/UsageViewSelect.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsx index 53236756d5c..11fdb8a7cf5 100644 --- a/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsx +++ b/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsx @@ -11,7 +11,7 @@ import { } from "@ant-design/icons"; import { Badge, Select } from "antd"; import React from "react"; -export type UsageOption = "global" | "organization" | "team" | "customer" | "tag" | "agent" | "user" | "user-agent-activity"; +export type UsageOption = "global" | "my-usage" | "organization" | "team" | "customer" | "tag" | "agent" | "user" | "user-agent-activity"; export interface UsageViewSelectProps { value: UsageOption; onChange: (value: UsageOption) => void; @@ -43,6 +43,13 @@ const OPTIONS: OptionConfig[] = [ descriptionForNonAdmin: "View your usage", icon: , }, + { + value: "my-usage", + label: "Your Usage", + description: "View your own usage", + icon: , + adminOnly: true, + }, { value: "organization", label: "Organization Usage",