) => {
vi.mocked(useAuthorized).mockReturnValue(baseUseAuthorizedMock);
diff --git a/ui/litellm-dashboard/src/components/templates/key_info_view.tsx b/ui/litellm-dashboard/src/components/templates/key_info_view.tsx
index 81603774d89..6598283bebd 100644
--- a/ui/litellm-dashboard/src/components/templates/key_info_view.tsx
+++ b/ui/litellm-dashboard/src/components/templates/key_info_view.tsx
@@ -76,6 +76,7 @@ interface KeyInfoViewProps {
onDelete?: () => void;
teams: any[] | null;
backButtonText?: string;
+ tabQueryKey?: string;
}
// Premium fields (from LiteLLM_ManagementEndpoint_MetadataFields_Premium in
@@ -107,13 +108,14 @@ export default function KeyInfoView({
onKeyDataUpdate,
onDelete,
backButtonText = i18n.t("keyDetail.keyInfoView.backToKeys"),
+ tabQueryKey = "detail_tab",
}: KeyInfoViewProps) {
const { t } = useTranslation();
const { accessToken, userId: userID, userRole, premiumUser } = useAuthorized();
const [activeTab, setActiveTab] = useUrlTab(
["overview", "activity", "savings", "auto-router-usage", "settings"],
"overview",
- "detail_tab",
+ tabQueryKey,
);
const accessGroupNames = useModelAccessGroupNames();
const activityDateRange = useActivityDateRange();
@@ -770,7 +772,13 @@ export default function KeyInfoView({
- {activeTab === "activity" && }
+ {activeTab === "activity" && (
+
+ )}
{/* Overview Panel */}
diff --git a/ui/litellm-dashboard/src/lib/http/schema.d.ts b/ui/litellm-dashboard/src/lib/http/schema.d.ts
index d8c9dde9b17..5589ecfc08f 100644
--- a/ui/litellm-dashboard/src/lib/http/schema.d.ts
+++ b/ui/litellm-dashboard/src/lib/http/schema.d.ts
@@ -28639,6 +28639,14 @@ export interface components {
/** Input Reference */
input_reference?: string | null;
};
+ /** BoundedDailyActivityResponse */
+ BoundedDailyActivityResponse: {
+ metadata: components["schemas"]["DailySpendMetadata"];
+ /** @description When requested, includes the highest-spend models across the full date range and an explicit aggregate of all remaining models. Daily totals always cover the complete activity scope. Other per-day dimension breakdowns are omitted. */
+ model_breakdown?: components["schemas"]["DailyActivityModelBreakdown"] | null;
+ /** Results */
+ results: components["schemas"]["DailySpendData"][];
+ };
/** BoxAnswer */
BoxAnswer: {
box: components["schemas"]["DecisionsBox"];
@@ -32394,6 +32402,28 @@ export interface components {
/** Api Keys */
api_keys: components["schemas"]["KeyActivityRow"][];
};
+ /** DailyActivityModelBreakdown */
+ DailyActivityModelBreakdown: {
+ /** Limit */
+ limit: number;
+ /** Models */
+ models: components["schemas"]["DailyActivityModelContribution"][];
+ other?: components["schemas"]["DailyActivityOtherModels"] | null;
+ /** Total Models */
+ total_models: number;
+ };
+ /** DailyActivityModelContribution */
+ DailyActivityModelContribution: {
+ metrics: components["schemas"]["SpendMetrics"];
+ /** Model */
+ model: string;
+ };
+ /** DailyActivityOtherModels */
+ DailyActivityOtherModels: {
+ metrics: components["schemas"]["SpendMetrics"];
+ /** Model Count */
+ model_count: number;
+ };
/** DailyActivityUserPageResponse */
DailyActivityUserPageResponse: {
/** Limit */
@@ -34871,6 +34901,16 @@ export interface components {
* @default true
*/
active: boolean;
+ /**
+ * Can Update Status
+ * @description Current reader's status permission, evaluated by the issue-detail endpoint
+ */
+ can_update_status?: boolean | null;
+ /**
+ * Can View Activity
+ * @description Current reader's permission to inspect Activity, keys, users and impact
+ */
+ can_view_activity?: boolean | null;
cohort: components["schemas"]["IssueCohort"];
/** Cohort Key */
cohort_key: string;
@@ -54320,6 +54360,9 @@ export interface operations {
parameters: {
query?: {
api_key_limit?: number;
+ bounded?: boolean;
+ include_model_breakdown?: boolean;
+ model_limit?: number;
agent_ids?: string | null;
start_date?: string | null;
end_date?: string | null;
@@ -54340,7 +54383,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"];
+ "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"] | components["schemas"]["BoundedDailyActivityResponse"];
};
};
/** @description Validation Error */
@@ -59971,6 +60014,9 @@ export interface operations {
parameters: {
query?: {
api_key_limit?: number;
+ bounded?: boolean;
+ include_model_breakdown?: boolean;
+ model_limit?: number;
end_user_ids?: string | null;
start_date?: string | null;
end_date?: string | null;
@@ -59991,7 +60037,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"];
+ "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"] | components["schemas"]["BoundedDailyActivityResponse"];
};
};
/** @description Validation Error */
@@ -61022,6 +61068,9 @@ export interface operations {
parameters: {
query?: {
api_key_limit?: number;
+ bounded?: boolean;
+ include_model_breakdown?: boolean;
+ model_limit?: number;
end_user_ids?: string | null;
start_date?: string | null;
end_date?: string | null;
@@ -61042,7 +61091,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"];
+ "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"] | components["schemas"]["BoundedDailyActivityResponse"];
};
};
/** @description Validation Error */
@@ -65654,6 +65703,7 @@ export interface operations {
query?: {
start_date?: string | null;
end_date?: string | null;
+ model_limit?: number;
};
header?: never;
path: {
@@ -65669,7 +65719,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"];
+ "application/json": components["schemas"]["BoundedDailyActivityResponse"];
};
};
/** @description Validation Error */
@@ -70714,6 +70764,9 @@ export interface operations {
parameters: {
query?: {
api_key_limit?: number;
+ bounded?: boolean;
+ include_model_breakdown?: boolean;
+ model_limit?: number;
organization_ids?: string | null;
start_date?: string | null;
end_date?: string | null;
@@ -70734,7 +70787,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"];
+ "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"] | components["schemas"]["BoundedDailyActivityResponse"];
};
};
/** @description Validation Error */
@@ -76586,6 +76639,9 @@ export interface operations {
parameters: {
query?: {
api_key_limit?: number;
+ bounded?: boolean;
+ include_model_breakdown?: boolean;
+ model_limit?: number;
start_date?: string | null;
end_date?: string | null;
model?: string | null;
@@ -76605,7 +76661,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"];
+ "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"] | components["schemas"]["BoundedDailyActivityResponse"];
};
};
/** @description Validation Error */
@@ -77276,6 +77332,9 @@ export interface operations {
parameters: {
query?: {
api_key_limit?: number;
+ bounded?: boolean;
+ include_model_breakdown?: boolean;
+ model_limit?: number;
team_ids?: string | null;
start_date?: string | null;
end_date?: string | null;
@@ -77296,7 +77355,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"];
+ "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"] | components["schemas"]["BoundedDailyActivityResponse"];
};
};
/** @description Validation Error */
@@ -80069,6 +80128,9 @@ export interface operations {
parameters: {
query?: {
api_key_limit?: number;
+ bounded?: boolean;
+ include_model_breakdown?: boolean;
+ model_limit?: number;
/** @description Start date in YYYY-MM-DD format */
start_date?: string | null;
/** @description End date in YYYY-MM-DD format */
@@ -80096,7 +80158,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"];
+ "application/json": components["schemas"]["SpendAnalyticsPaginatedResponse"] | components["schemas"]["BoundedDailyActivityResponse"];
};
};
/** @description Validation Error */