The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Removing mock data and adding tabs
yuneng-jiang227ad58c160f
diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/EndpointUsage.test.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/EndpointUsage.test.tsxnew file mode 100644index 00000000000..69987d1481f--- /dev/null+++ b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/EndpointUsage.test.tsx@@ -0,0 +1,25 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, it, vi } from "vitest";+import EndpointUsage from "./EndpointUsage";++vi.mock("./components/EndpointUsageBarChart", () => ({+ default: () => <div>Endpoint Usage Bar Chart</div>,+}));++vi.mock("./components/EndpointUsageLineChart", () => ({+ default: () => <div>Endpoint Usage Line Chart</div>,+}));++vi.mock("./components/EndpointUsageTable", () => ({+ default: () => <div>Endpoint Usage Table</div>,+}));++describe("EndpointUsage", () => {+ it("should render", () => {+ render(<EndpointUsage />);++ expect(screen.getByText("Endpoint Usage Table")).toBeInTheDocument();+ expect(screen.getByText("Endpoint Usage Bar Chart")).toBeInTheDocument();+ expect(screen.getByText("Endpoint Usage Line Chart")).toBeInTheDocument();+ });+});diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/EndpointUsage.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/EndpointUsage.tsxindex b9e20f64b0b..68959405a8f 100644--- a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/EndpointUsage.tsx+++ b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/EndpointUsage.tsx@@ -1,9 +1,8 @@-import React from "react";+import React, { useMemo } from "react";import EndpointUsageBarChart from "./components/EndpointUsageBarChart";import EndpointUsageLineChart from "./components/EndpointUsageLineChart";import EndpointUsageTable from "./components/EndpointUsageTable";-import { mockEndpointData } from "./mockEndpointData";-import { DailyData } from "../../types";+import { DailyData, MetricWithMetadata } from "../../types";interface EndpointUsageProps {userSpendData?: {@@ -13,11 +12,54 @@ interface EndpointUsageProps {}const EndpointUsage: React.FC<EndpointUsageProps> = ({ userSpendData }) => {+ // Aggregate endpoints data from all days+ const endpointData = useMemo(() => {+ const aggregatedEndpoints: Record<string, MetricWithMetadata> = {};++ if (!userSpendData?.results) {+ return aggregatedEndpoints;+ }++ userSpendData.results.forEach((day) => {+ Object.entries(day.breakdown.endpoints || {}).forEach(([endpoint, metrics]) => {+ if (!aggregatedEndpoints[endpoint]) {+ aggregatedEndpoints[endpoint] = {+ metrics: {+ spend: 0,+ prompt_tokens: 0,+ completion_tokens: 0,+ total_tokens: 0,+ api_requests: 0,+ successful_requests: 0,+ failed_requests: 0,+ cache_read_input_tokens: 0,+ cache_creation_input_tokens: 0,+ },+ metadata: metrics.metadata || {},+ api_key_breakdown: {},+ };+ }+ aggregatedEndpoints[endpoint].metrics.spend += metrics.metrics.spend;+ aggregatedEndpoints[endpoint].metrics.prompt_tokens += metrics.metrics.prompt_tokens;+ aggregatedEndpoints[endpoint].metrics.completion_tokens += metrics.metrics.completion_tokens;+ aggregatedEndpoints[endpoint].metrics.total_tokens += metrics.metrics.total_tokens;+ aggregatedEndpoints[endpoint].metrics.api_requests += metrics.metrics.api_requests;+ aggregatedEndpoints[endpoint].metrics.successful_requests += metrics.metrics.successful_requests || 0;+ aggregatedEndpoints[endpoint].metrics.failed_requests += metrics.metrics.failed_requests || 0;+ aggregatedEndpoints[endpoint].metrics.cache_read_input_tokens += metrics.metrics.cache_read_input_tokens || 0;+ aggregatedEndpoints[endpoint].metrics.cache_creation_input_tokens +=+ metrics.metrics.cache_creation_input_tokens || 0;+ });+ });++ return aggregatedEndpoints;+ }, [userSpendData]);+return (<div className="space-y-4">- <EndpointUsageTable endpointData={mockEndpointData} />- <EndpointUsageBarChart endpointData={mockEndpointData} />- <EndpointUsageLineChart dailyData={userSpendData} endpointData={mockEndpointData} />+ <EndpointUsageTable endpointData={endpointData} />+ <EndpointUsageBarChart endpointData={endpointData} />+ <EndpointUsageLineChart dailyData={userSpendData} endpointData={endpointData} /></div>);};diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageBarChart.test.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageBarChart.test.tsxnew file mode 100644index 00000000000..96b66cbb3d2--- /dev/null+++ b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageBarChart.test.tsx@@ -0,0 +1,41 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, it, vi } from "vitest";+import EndpointUsageBarChart from "./EndpointUsageBarChart";++vi.mock("@tremor/react", async () => {+ const React = await import("react");++ function Card({ children }: any) {+ return React.createElement("div", { "data-testid": "tremor-card" }, children);+ }+ (Card as any).displayName = "Card";++ function Title({ children }: any) {+ return React.createElement("h2", { "data-testid": "tremor-title" }, children);+ }+ (Title as any).displayName = "Title";++ function BarChart(_props: any) {+ return React.createElement("div", { "data-testid": "tremor-bar-chart" }, "Bar Chart");+ }+ (BarChart as any).displayName = "BarChart";++ return { Card, Title, BarChart };+});++vi.mock("@/components/common_components/chartUtils", () => ({+ CustomLegend: ({ categories }: any) => (+ <div data-testid="custom-legend">{categories.join(", ")}</div>+ ),+ CustomTooltip: () => <div data-testid="custom-tooltip">Tooltip</div>,+}));++describe("EndpointUsageBarChart", () => {+ it("should render", () => {+ render(<EndpointUsageBarChart />);++ expect(screen.getByTestId("tremor-card")).toBeInTheDocument();+ expect(screen.getByText("Success vs Failed Requests by Endpoint")).toBeInTheDocument();+ expect(screen.getByTestId("tremor-bar-chart")).toBeInTheDocument();+ });+});diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageBarChart.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageBarChart.tsxindex 1ab3c49a7e6..dd712fdb232 100644--- a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageBarChart.tsx+++ b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageBarChart.tsx@@ -2,15 +2,13 @@ import React from "react";import { BarChart, Card, Title } from "@tremor/react";import { CustomLegend, CustomTooltip } from "@/components/common_components/chartUtils";import { MetricWithMetadata } from "../../../types";-import { mockEndpointData } from "../mockEndpointData";interface EndpointUsageBarChartProps {endpointData?: Record<string, MetricWithMetadata>;}const EndpointUsageBarChart: React.FC<EndpointUsageBarChartProps> = ({ endpointData }) => {- // Use mock data if no endpointData is provided- const dataToUse = endpointData || mockEndpointData;+ const dataToUse = endpointData || {};// Transform endpoint data into chart formatconst chartData = React.useMemo(() => {diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageLineChart.test.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageLineChart.test.tsxnew file mode 100644index 00000000000..ec12779a697--- /dev/null+++ b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageLineChart.test.tsx@@ -0,0 +1,60 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, it, vi } from "vitest";+import EndpointUsageLineChart from "./EndpointUsageLineChart";++vi.mock("@tremor/react", async () => {+ const React = await import("react");++ function Card({ children }: any) {+ return React.createElement("div", { "data-testid": "tremor-card" }, children);+ }+ (Card as any).displayName = "Card";++ function Title({ children }: any) {+ return React.createElement("h2", { "data-testid": "tremor-title" }, children);+ }+ (Title as any).displayName = "Title";++ function LineChart(_props: any) {+ return React.createElement("div", { "data-testid": "tremor-line-chart" }, "Line Chart");+ }+ (LineChart as any).displayName = "LineChart";++ return { Card, Title, LineChart };+});++vi.mock("antd", async () => {+ const React = await import("react");++ function Segmented({ options, value, onChange }: any) {+ return React.createElement(+ "div",+ { "data-testid": "antd-segmented", "data-value": value },+ options?.map((opt: any) =>+ React.createElement(+ "button",+ {+ key: opt.value,+ onClick: () => onChange?.(opt.value),+ "data-selected": value === opt.value,+ },+ opt.label,+ ),+ ),+ );+ }+ (Segmented as any).displayName = "Segmented";++ return { Segmented };+});++describe("EndpointUsageLineChart", () => {+ it("should render", () => {+ render(<EndpointUsageLineChart />);++ expect(screen.getByTestId("tremor-card")).toBeInTheDocument();+ expect(screen.getByText("Endpoint Usage Trends")).toBeInTheDocument();+ expect(screen.getByTestId("antd-segmented")).toBeInTheDocument();+ expect(screen.getByTestId("tremor-line-chart")).toBeInTheDocument();+ });+});diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageLineChart.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageLineChart.tsxindex 2bb897c89f6..9c9236edaa2 100644--- a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageLineChart.tsx+++ b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageLineChart.tsx@@ -1,91 +1,15 @@import React, { useMemo, useState } from "react";import { Card, LineChart, Title } from "@tremor/react";import { Segmented } from "antd";-import { BreakdownMetrics, DailyData, MetricWithMetadata } from "../../../types";-import { mockEndpointData } from "../mockEndpointData";+import { DailyData } from "../../../types";interface EndpointUsageLineChartProps {dailyData?: { results: DailyData[] };- endpointData?: Record<string, MetricWithMetadata>;+ endpointData?: Record<string, any>;}type TimePeriod = "7" | "30" | "90";-// Create mock daily data from aggregated endpoint data-function createMockDailyData(endpointData: Record<string, MetricWithMetadata>, days: number): DailyData[] {- const today = new Date();- const dailyResults: DailyData[] = [];-- for (let i = days - 1; i >= 0; i--) {- const date = new Date(today);- date.setDate(date.getDate() - i);- const dateStr = date.toISOString().split("T")[0];-- // Distribute aggregated totals across days with some variation- const breakdown: { [key: string]: MetricWithMetadata } = {};- Object.entries(endpointData).forEach(([endpointName, endpoint]) => {- // Calculate average daily values- const avgDaily = {- spend: endpoint.metrics.spend / days,- prompt_tokens: endpoint.metrics.prompt_tokens / days,- completion_tokens: endpoint.metrics.completion_tokens / days,- total_tokens: endpoint.metrics.total_tokens / days,- api_requests: endpoint.metrics.api_requests / days,- successful_requests: endpoint.metrics.successful_requests / days,- failed_requests: endpoint.metrics.failed_requests / days,- cache_read_input_tokens: endpoint.metrics.cache_read_input_tokens / days,- cache_creation_input_tokens: endpoint.metrics.cache_creation_input_tokens / days,- };-- // Add simple variation (±20%) to make it look more realistic- const variation = 0.8 + Math.random() * 0.4; // Random factor between 0.8 and 1.2-- breakdown[endpointName] = {- metrics: {- spend: avgDaily.spend * variation,- prompt_tokens: Math.round(avgDaily.prompt_tokens * variation),- completion_tokens: Math.round(avgDaily.completion_tokens * variation),- total_tokens: Math.round(avgDaily.total_tokens * variation),- api_requests: Math.round(avgDaily.api_requests * variation),- successful_requests: Math.round(avgDaily.successful_requests * variation),- failed_requests: Math.round(avgDaily.failed_requests * variation),- cache_read_input_tokens: Math.round(avgDaily.cache_read_input_tokens * variation),- cache_creation_input_tokens: Math.round(avgDaily.cache_creation_input_tokens * variation),- },- metadata: endpoint.metadata,- api_key_breakdown: endpoint.api_key_breakdown,- };- });-- const breakdownMetrics: BreakdownMetrics = {- models: {},- model_groups: {},- mcp_servers: {},- providers: {},- api_keys: {},- entities: {},- endpoints: breakdown,- };-- dailyResults.push({- date: dateStr,- metrics: {- spend: 0,- prompt_tokens: 0,- completion_tokens: 0,- total_tokens: 0,- api_requests: 0,- successful_requests: 0,- failed_requests: 0,- cache_read_input_tokens: 0,- cache_creation_input_tokens: 0,- },- breakdown: breakdownMetrics,- });- }-- return dailyResults;-}// Transform daily data into chart formatfunction transformDailyDataToChart(dailyData: DailyData[], days: number): Array<Record<string, string | number>> {@@ -128,33 +52,13 @@ export function EndpointUsageLineChart({ dailyData, endpointData }: EndpointUsagconst [timePeriod, setTimePeriod] = useState<TimePeriod>("7");const days = parseInt(timePeriod);- // Use daily data if provided and has endpoints, otherwise create mock daily data from aggregated endpoint dataconst chartData = useMemo(() => {- // Check if dailyData has endpoints breakdown- const hasEndpointsInDailyData =- dailyData?.results &&- dailyData.results.some((day) => day.breakdown.endpoints && Object.keys(day.breakdown.endpoints).length > 0);-- if (hasEndpointsInDailyData) {- // Check if we have a reasonable number of endpoints (at least 2 for proof of concept)- const endpointCount = new Set<string>();- dailyData.results.forEach((day) => {- if (day.breakdown.endpoints) {- Object.keys(day.breakdown.endpoints).forEach((name) => endpointCount.add(name));- }- });-- // If we have multiple endpoints in real data, use it; otherwise use mock data for proof of concept- if (endpointCount.size >= 2) {- return transformDailyDataToChart(dailyData.results, days);- }+ if (!dailyData?.results || dailyData.results.length === 0) {+ return [];}- // Use mock data for proof of concept- const dataToUse = endpointData || mockEndpointData;- const mockDaily = createMockDailyData(dataToUse, days);- return transformDailyDataToChart(mockDaily, days);- }, [dailyData, endpointData, days]);+ return transformDailyDataToChart(dailyData.results, days);+ }, [dailyData, days]);// Get endpoint names from chart dataconst categories = useMemo(() => {diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageTable.test.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageTable.test.tsxnew file mode 100644index 00000000000..793e4c6e3cf--- /dev/null+++ b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/components/EndpointUsageTable.test.tsx@@ -0,0 +1,70 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, it, vi } from "vitest";+import EndpointUsageTable from "./EndpointUsageTable";++vi.mock("antd", async () => {+ const React = await import("react");++ function Table({ columns, dataSource }: any) {+ return React.createElement(+ "div",+ { "data-testid": "antd-table" },+ columns?.map((col: any) =>+ React.createElement("div", { key: col.key, "data-testid": `column-${col.key}` }, col.title),+ ),+ dataSource?.map((row: any) =>+ React.createElement(+ "div",+ { key: row.key, "data-testid": `row-${row.key}` },+ React.createElement("div", null, row.endpoint),+ ),+ ),+ );+ }+ (Table as any).displayName = "Table";++ function Progress({ percent }: any) {+ return React.createElement("div", { "data-testid": "antd-progress", "data-percent": percent });+ }+ (Progress as any).displayName = "Progress";++ return { Table, Progress };+});++vi.mock("@/utils/dataUtils", () => ({+ formatNumberWithCommas: (value: number, decimals?: number) => {+ return value.toFixed(decimals || 0);+ },+}));++describe("EndpointUsageTable", () => {+ it("should render", () => {+ const mockEndpointData = {+ "endpoint-1": {+ metrics: {+ spend: 100.5,+ prompt_tokens: 5000,+ completion_tokens: 3000,+ total_tokens: 8000,+ api_requests: 100,+ successful_requests: 95,+ failed_requests: 5,+ cache_read_input_tokens: 0,+ cache_creation_input_tokens: 0,+ },+ metadata: {},+ api_key_breakdown: {},+ },+ };++ render(<EndpointUsageTable endpointData={mockEndpointData} />);++ expect(screen.getByTestId("antd-table")).toBeInTheDocument();+ expect(screen.getByTestId("column-endpoint")).toBeInTheDocument();+ expect(screen.getByTestId("column-requests")).toBeInTheDocument();+ expect(screen.getByTestId("column-api_requests")).toBeInTheDocument();+ expect(screen.getByTestId("column-successRate")).toBeInTheDocument();+ expect(screen.getByTestId("column-total_tokens")).toBeInTheDocument();+ expect(screen.getByTestId("column-spend")).toBeInTheDocument();+ });+});diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/mockEndpointData.ts b/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/mockEndpointData.tsdeleted file mode 100644index cb5424dde69..00000000000--- a/ui/litellm-dashboard/src/components/UsagePage/components/EndpointUsage/mockEndpointData.ts+++ /dev/null@@ -1,94 +0,0 @@-import { MetricWithMetadata } from "../../types";--export const mockEndpointData: Record<string, MetricWithMetadata> = {- "/chat/completions": {- metrics: {- spend: 1250.45,- prompt_tokens: 150000,- completion_tokens: 45000,- cache_read_input_tokens: 0,- cache_creation_input_tokens: 0,- total_tokens: 195000,- successful_requests: 1250,- failed_requests: 45,- api_requests: 1295,- },- metadata: {},- api_key_breakdown: {},- },- "/audio/speech": {- metrics: {- spend: 320.78,- prompt_tokens: 0,- completion_tokens: 0,- cache_read_input_tokens: 0,- cache_creation_input_tokens: 0,- total_tokens: 0,- successful_requests: 890,- failed_requests: 12,- api_requests: 902,- },- metadata: {},- api_key_breakdown: {},- },- "/audio/transcriptions": {- metrics: {- spend: 85.23,- prompt_tokens: 0,- completion_tokens: 0,- cache_read_input_tokens: 0,- cache_creation_input_tokens: 0,- total_tokens: 0,- successful_requests: 234,- failed_requests: 8,- api_requests: 242,- },- metadata: {},- api_key_breakdown: {},- },- "/embeddings": {- metrics: {- spend: 450.12,- prompt_tokens: 200000,- completion_tokens: 0,- cache_read_input_tokens: 0,- cache_creation_input_tokens: 0,- total_tokens: 200000,- successful_requests: 2100,- failed_requests: 23,- api_requests: 2123,- },- metadata: {},- api_key_breakdown: {},- },- "/images/generations": {- metrics: {- spend: 180.56,- prompt_tokens: 0,- completion_tokens: 0,- cache_read_input_tokens: 0,- cache_creation_input_tokens: 0,- total_tokens: 0,- successful_requests: 156,- failed_requests: 5,- api_requests: 161,- },- metadata: {},- api_key_breakdown: {},- },- "/moderations": {- metrics: {- spend: 95.34,- prompt_tokens: 50000,- completion_tokens: 0,- cache_read_input_tokens: 0,- cache_creation_input_tokens: 0,- total_tokens: 50000,- successful_requests: 567,- failed_requests: 3,- api_requests: 570,- },- metadata: {},- api_key_breakdown: {},- },-};diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/EntityUsage.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/EntityUsage.tsxindex 75cf8c9292c..52e75005ccc 100644--- a/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/EntityUsage.tsx+++ b/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/EntityUsage.tsx@@ -38,6 +38,8 @@ import { valueFormatterSpend } from "../../utils/value_formatters";import TopKeyView from "./TopKeyView";import TopModelView from "./TopModelView";import useTeams from "@/app/(dashboard)/hooks/useTeams";+import EndpointUsage from "../EndpointUsage/EndpointUsage";+import NewBadge from "../../../common_components/NewBadge";interface EntityMetrics {metrics: {@@ -399,11 +401,14 @@ const EntityUsage: React.FC<EntityUsageProps> = ({filterOptions={getAllTags() || undefined}/><TabGroup>- <TabList variant="solid" className="mt-1">- <Tab>Cost</Tab>- <Tab>{entityType === "agent" ? "Request / Token Consumption" : "Model Activity"}</Tab>- <Tab>Key Activity</Tab>- </TabList>+ <NewBadge>+ <TabList variant="solid" className="mt-1">+ <Tab>Cost</Tab>+ <Tab>{entityType === "agent" ? "Request / Token Consumption" : "Model Activity"}</Tab>+ <Tab>Key Activity</Tab>+ <Tab>Endpoint Activity</Tab>+ </TabList>+ </NewBadge><TabPanels><TabPanel><Grid numItems={2} className="gap-2 w-full">@@ -682,6 +687,9 @@ const EntityUsage: React.FC<EntityUsageProps> = ({<TabPanel><ActivityMetrics modelMetrics={keyMetrics} hidePromptCachingMetrics={entityType === "agent"} /></TabPanel>+ <TabPanel>+ <EndpointUsage userSpendData={spendData} />+ </TabPanel></TabPanels></TabGroup></div>diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsxindex 01ad2c7b466..d891fcf604c 100644--- a/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsx+++ b/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsx@@ -54,6 +54,7 @@ import TopKeyView from "./EntityUsage/TopKeyView";import { UsageOption, UsageViewSelect } from "./UsageViewSelect/UsageViewSelect";import { useCurrentUser } from "@/app/(dashboard)/hooks/users/useCurrentUser";import EndpointUsage from "./EndpointUsage/EndpointUsage";+import NewBadge from "../../common_components/NewBadge";interface UsagePageProps {teams: Team[];@@ -435,13 +436,15 @@ const UsagePage: React.FC<UsagePageProps> = ({ teams, organizations }) => {{usageView === "global" && (<TabGroup><div className="flex justify-between items-center">- <TabList variant="solid" className="mt-1">- <Tab>Cost</Tab>- <Tab>Model Activity</Tab>- <Tab>Key Activity</Tab>- <Tab>MCP Server Activity</Tab>- <Tab>Endpoint Activity</Tab>- </TabList>+ <NewBadge>+ <TabList variant="solid" className="mt-1">+ <Tab>Cost</Tab>+ <Tab>Model Activity</Tab>+ <Tab>Key Activity</Tab>+ <Tab>MCP Server Activity</Tab>+ <Tab>Endpoint Activity</Tab>+ </TabList>+ </NewBadge><ButtononClick={() => setIsGlobalExportModalOpen(true)}icon={() => (diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsxindex 6b8347b6fbd..3d456de5a65 100644--- a/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsx+++ b/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsx@@ -78,7 +78,6 @@ const OPTIONS: OptionConfig[] = [description: "View usage by AI agents",icon: <RobotOutlined style={{ fontSize: "16px" }} />,adminOnly: true,- badgeText: "New",},{value: "user-agent-activity",diff --git a/ui/litellm-dashboard/src/components/leftnav.tsx b/ui/litellm-dashboard/src/components/leftnav.tsxindex fc248ee049a..69374528e99 100644--- a/ui/litellm-dashboard/src/components/leftnav.tsx+++ b/ui/litellm-dashboard/src/components/leftnav.tsx@@ -152,7 +152,11 @@ const Sidebar: React.FC<SidebarProps> = ({ setPage, defaultSelectedKey, collapsepage: "new_usage",icon: <BarChartOutlined />,roles: [...all_admin_roles, ...internalUserRoles],- label: <span className="flex items-center gap-4">Usage</span>,+ label: (+ <span className="flex items-center gap-4">+ Usage <NewBadge />+ </span>+ ),},{key: "logs",@@ -260,11 +264,7 @@ const Sidebar: React.FC<SidebarProps> = ({ setPage, defaultSelectedKey, collapse{key: "settings",page: "settings",- label: (- <span className="flex items-center gap-4">- Settings <NewBadge />- </span>- ),+ label: <span className="flex items-center gap-4">Settings</span>,icon: <SettingOutlined />,roles: all_admin_roles,children: [diff --git a/ui/litellm-dashboard/src/components/settings.tsx b/ui/litellm-dashboard/src/components/settings.tsxindex 735ee6ee75c..ed45d95222d 100644--- a/ui/litellm-dashboard/src/components/settings.tsx+++ b/ui/litellm-dashboard/src/components/settings.tsx@@ -28,6 +28,8 @@ const { Title, Paragraph } = Typography;import FormItem from "antd/es/form/FormItem";import AlertingSettings from "./alerting/alerting_settings";+import CloudZeroCostTracking from "./CloudZeroCostTracking/CloudZeroCostTracking";+import DeleteResourceModal from "./common_components/DeleteResourceModal";import {deleteCallback,getCallbackConfigsCall,@@ -38,9 +40,6 @@ import {import { LoggingCallbacksTable } from "./Settings/LoggingAndAlerts/LoggingCallbacks/LoggingCallbacksTable";import { AlertingObject } from "./Settings/LoggingAndAlerts/LoggingCallbacks/types";import { parseErrorMessage } from "./shared/errorUtils";-import DeleteResourceModal from "./common_components/DeleteResourceModal";-import CloudZeroCostTracking from "./CloudZeroCostTracking/CloudZeroCostTracking";-import NewBadge from "./common_components/NewBadge";interface SettingsPageProps {accessToken: string | null;userRole: string | null;@@ -570,9 +569,7 @@ const Settings: React.FC<SettingsPageProps> = ({ accessToken, userRole, userID,<TabGroup><TabList variant="line" defaultValue="1"><Tab value="1">Logging Callbacks</Tab>- <Tab value="2">- CloudZero Cost Tracking <NewBadge />- </Tab>+ <Tab value="2">CloudZero Cost Tracking</Tab><Tab value="2">Alerting Types</Tab><Tab value="3">Alerting Settings</Tab><Tab value="4">Email Alerts</Tab>