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.tsx index dd712fdb232..20a5e4b783f 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 @@ -1,4 +1,5 @@ import React from "react"; +import { useTranslation } from "react-i18next"; import { BarChart, Card, Title } from "@tremor/react"; import { CustomLegend, CustomTooltip } from "@/components/common_components/chartUtils"; import { MetricWithMetadata } from "../../../types"; @@ -8,6 +9,7 @@ interface EndpointUsageBarChartProps { } const EndpointUsageBarChart: React.FC = ({ endpointData }) => { + const { t } = useTranslation(); const dataToUse = endpointData || {}; // Transform endpoint data into chart format @@ -28,7 +30,7 @@ const EndpointUsageBarChart: React.FC = ({ endpointD return (
- Success vs Failed Requests by Endpoint + {t("usagePage.endpointUsageBarChart.title")} { if (!dailyData?.results || dailyData.results.length === 0) { return []; @@ -64,7 +66,7 @@ export function EndpointUsageLineChart({ dailyData, endpointData }: EndpointUsag return (
- Endpoint Usage Trends + {t("usagePage.endpointUsageLineChart.title")}
Promise> = { }; const EntityUsage: React.FC = ({ accessToken, entityType, entityId, entityList, dateValue }) => { + const { t } = useTranslation(); const { teams } = useTeams(); const [selectedTags, setSelectedTags] = useState([]); const [topKeysLimit, setTopKeysLimit] = useState(5); @@ -386,11 +388,11 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti }; const getFilterLabel = (entityType: string) => { - return `Filter by ${entityType}`; + return t("usagePage.entityUsage.filterLabel", { entityType }); }; const getFilterPlaceholder = (entityType: string) => { - return `Select ${entityType} to filter...`; + return t("usagePage.entityUsage.filterPlaceholder", { entityType }); }; const capitalizedEntityLabel = entityType.charAt(0).toUpperCase() + entityType.slice(1); @@ -406,16 +408,20 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti
- Currently fetching spend data: fetched {progress.currentPage} / {progress.totalPages} pages. Charts will - update periodically as data loads. Moving off of this page will stop and reset this. To continue using - the UI in the meantime,{" "} - - open a new tab - - . + + + + ), + }} + />
} @@ -428,7 +434,10 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti className="mb-2" message={ - Showing partial data ({progress.currentPage}/{progress.totalPages} pages loaded) + {t("usagePage.entityUsage.partialData", { + currentPage: progress.currentPage, + totalPages: progress.totalPages, + })} } /> @@ -442,16 +451,20 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti
- Currently fetching agent data: fetched {agentProgress.currentPage} / {agentProgress.totalPages} pages. - Charts will update periodically as data loads. Moving off of this page will stop and reset this. To - continue using the UI in the meantime,{" "} - - open a new tab - - . + + + + ), + }} + />
} @@ -464,14 +477,17 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti className="mb-2" message={ - Showing partial agent data ({agentProgress.currentPage}/{agentProgress.totalPages} pages loaded) + {t("usagePage.entityUsage.partialAgentData", { + currentPage: agentProgress.currentPage, + totalPages: agentProgress.totalPages, + })} } /> )} {entityType === "team" && (
- Filter by team + {t("usagePage.entityUsage.filterByTeam")}
)} @@ -490,11 +506,15 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti /> - Cost - {entityType === "agent" ? "Request / Token Consumption" : "Model Activity"} - {entityType === "team" ? Agent Activity : <>} - Key Activity - Endpoint Activity + {t("usagePage.entityUsage.tabCost")} + + {entityType === "agent" + ? t("usagePage.entityUsage.tabRequestTokenConsumption") + : t("usagePage.entityUsage.tabModelActivity")} + + {entityType === "team" ? {t("usagePage.entityUsage.tabAgentActivity")} : <>} + {t("usagePage.entityUsage.tabKeyActivity")} + {t("usagePage.entityUsage.tabEndpointActivity")} @@ -502,34 +522,34 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti {/* Total Spend Card */} - {capitalizedEntityLabel} Spend Overview + {t("usagePage.entityUsage.spendOverview", { entity: capitalizedEntityLabel })} - Total Spend + {t("usagePage.entityUsage.totalSpend")} ${formatNumberWithCommas(spendData.metadata.total_spend, 2)} - Total Requests + {t("usagePage.entityUsage.totalRequests")} {spendData.metadata.total_api_requests.toLocaleString()} - Successful Requests + {t("usagePage.entityUsage.successfulRequests")} {spendData.metadata.total_successful_requests.toLocaleString()} - Failed Requests + {t("usagePage.entityUsage.failedRequests")} {spendData.metadata.total_failed_requests.toLocaleString()} - Total Tokens + {t("usagePage.entityUsage.totalTokens")} {spendData.metadata.total_tokens.toLocaleString()} @@ -541,7 +561,7 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti {/* Daily Spend Chart */} - Daily Spend + {t("usagePage.entityUsage.dailySpend")} new Date(a.date).getTime() - new Date(b.date).getTime(), @@ -559,16 +579,37 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti return (

{data.date}

-

Total Spend: ${formatNumberWithCommas(data.metrics.spend, 2)}

-

Total Requests: {data.metrics.api_requests}

-

Successful: {data.metrics.successful_requests}

-

Failed: {data.metrics.failed_requests}

-

Total Tokens: {data.metrics.total_tokens}

+

+ {t("usagePage.entityUsage.tooltipTotalSpend", { + amount: formatNumberWithCommas(data.metrics.spend, 2), + })} +

- Total {capitalizedEntityLabel}s: {entityCount} + {t("usagePage.entityUsage.tooltipTotalRequests", { + count: data.metrics.api_requests, + })} +

+

+ {t("usagePage.entityUsage.tooltipSuccessful", { + count: data.metrics.successful_requests, + })} +

+

+ {t("usagePage.entityUsage.tooltipFailed", { count: data.metrics.failed_requests })} +

+

+ {t("usagePage.entityUsage.tooltipTotalTokens", { count: data.metrics.total_tokens })} +

+

+ {t("usagePage.entityUsage.tooltipTotalEntities", { + entity: capitalizedEntityLabel, + count: entityCount, + })}

-

Spend by {capitalizedEntityLabel}:

+

+ {t("usagePage.entityUsage.tooltipSpendByEntity", { entity: capitalizedEntityLabel })} +

{Object.entries(data.breakdown.entities || {}) .sort(([, a], [, b]) => { const spendA = (a as EntityMetrics).metrics.spend; @@ -586,7 +627,9 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti ); })} {entityCount > 5 && ( -

...and {entityCount - 5} more

+

+ {t("usagePage.entityUsage.tooltipAndMore", { count: entityCount - 5 })} +

)}
@@ -601,16 +644,21 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti
- Spend Per {capitalizedEntityLabel} - Showing Top 5 by Spend + {t("usagePage.entityUsage.spendPerEntity", { entity: capitalizedEntityLabel })} + {t("usagePage.entityUsage.showingTop5BySpend")}
- Get Started by Tracking cost per {capitalizedEntityLabel} - - here - + + ), + }} + />
@@ -631,13 +679,31 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti return (

{data.metadata.alias}

-

Spend: ${formatNumberWithCommas(data.metrics.spend, 4)}

-

Requests: {data.metrics.api_requests.toLocaleString()}

-

- Successful: {data.metrics.successful_requests.toLocaleString()} +

+ {t("usagePage.entityUsage.tooltipSpend", { + amount: formatNumberWithCommas(data.metrics.spend, 4), + })} +

+

+ {t("usagePage.entityUsage.tooltipRequests", { + count: data.metrics.api_requests.toLocaleString(), + })} +

+

+ {t("usagePage.entityUsage.tooltipSuccessful", { + count: data.metrics.successful_requests.toLocaleString(), + })} +

+

+ {t("usagePage.entityUsage.tooltipFailed", { + count: data.metrics.failed_requests.toLocaleString(), + })} +

+

+ {t("usagePage.entityUsage.tooltipTokens", { + count: data.metrics.total_tokens.toLocaleString(), + })}

-

Failed: {data.metrics.failed_requests.toLocaleString()}

-

Tokens: {data.metrics.total_tokens.toLocaleString()}

); }} @@ -649,10 +715,14 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti {capitalizedEntityLabel} - Spend - Successful - Failed - Tokens + {t("usagePage.entityUsage.colSpend")} + + {t("usagePage.entityUsage.colSuccessful")} + + + {t("usagePage.entityUsage.colFailed")} + + {t("usagePage.entityUsage.colTokens")} @@ -683,7 +753,7 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti {/* Top API Keys */} - Top Virtual Keys + {t("usagePage.entityUsage.topVirtualKeys")} = ({ accessToken, entityType, enti {/* Top Models */} - {entityType === "agent" ? "Top Agents" : "Top Models"} + + {entityType === "agent" + ? t("usagePage.entityUsage.topAgents") + : t("usagePage.entityUsage.topModels")} + = ({ accessToken, entityType, enti {entityType === "team" && ( - Top Agents Driving Spend + {t("usagePage.entityUsage.topAgentsDrivingSpend")} = ({ accessToken, entityType, enti
- Provider Usage + {t("usagePage.entityUsage.providerUsage")} = ({ accessToken, entityType, enti - Provider - Spend - Successful - Failed - Tokens + {t("usagePage.entityUsage.colProvider")} + {t("usagePage.entityUsage.colSpend")} + + {t("usagePage.entityUsage.colSuccessful")} + + + {t("usagePage.entityUsage.colFailed")} + + {t("usagePage.entityUsage.colTokens")} @@ -755,7 +833,9 @@ const EntityUsage: React.FC = ({ accessToken, entityType, enti {provider.provider && ( {`${provider.provider} { const target = e.target as HTMLImageElement; diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/SpendByProvider.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/SpendByProvider.tsx index 58d673bb7ad..0d012c54b54 100644 --- a/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/SpendByProvider.tsx +++ b/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/SpendByProvider.tsx @@ -1,4 +1,5 @@ import { formatNumberWithCommas } from "@/utils/dataUtils"; +import { useTranslation } from "react-i18next"; import { InfoCircleOutlined } from "@ant-design/icons"; import { Card, @@ -35,6 +36,7 @@ interface SpendByProviderProps { } const SpendByProvider: React.FC = ({ loading, isDateChanging, providerSpend }) => { + const { t } = useTranslation(); const [includeZeroSpend, setIncludeZeroSpend] = useState(false); const [includeUnknown, setIncludeUnknown] = useState(false); @@ -58,16 +60,16 @@ const SpendByProvider: React.FC = ({ loading, isDateChangi return (
- Spend by Provider + {t("usagePage.spendByProvider.title")}
- +
- - + +
@@ -93,11 +95,13 @@ const SpendByProvider: React.FC = ({ loading, isDateChangi
- Provider - Spend - Successful - Failed - Tokens + {t("usagePage.spendByProvider.colProvider")} + {t("usagePage.spendByProvider.colSpend")} + + {t("usagePage.spendByProvider.colSuccessful")} + + {t("usagePage.spendByProvider.colFailed")} + {t("usagePage.spendByProvider.colTokens")} diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/TopKeyView.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/TopKeyView.tsx index 8903f74f232..dd1c333f13e 100644 --- a/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/TopKeyView.tsx +++ b/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/TopKeyView.tsx @@ -1,4 +1,5 @@ import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized"; +import { useTranslation } from "react-i18next"; import { ChevronDownIcon, ChevronUpIcon } from "@heroicons/react/outline"; import { BarChart, Button } from "@tremor/react"; import { Segmented, Tooltip } from "antd"; @@ -19,6 +20,7 @@ interface TopKeyViewProps { } const TopKeyView: React.FC = ({ topKeys, teams, showTags = false, topKeysLimit, setTopKeysLimit }) => { + const { t } = useTranslation(); const { accessToken, userRole, userId: userID, premiumUser } = useAuthorized(); const [isModalOpen, setIsModalOpen] = useState(false); const [selectedKey, setSelectedKey] = useState(null); @@ -81,7 +83,7 @@ const TopKeyView: React.FC = ({ topKeys, teams, showTags = fals // Define columns for the table view const baseColumns = [ { - header: "Key ID", + header: t("usagePage.topKeyView.colKeyId"), accessorKey: "api_key", cell: (info: any) => (
@@ -99,14 +101,14 @@ const TopKeyView: React.FC = ({ topKeys, teams, showTags = fals ), }, { - header: "Key Alias", + header: t("usagePage.topKeyView.colKeyAlias"), accessorKey: "key_alias", cell: (info: any) => info.getValue() || "-", }, ]; const tagsColumn = { - header: "Tags", + header: t("usagePage.topKeyView.colTags"), accessorKey: "tags", cell: (info: any) => { const tags = info.getValue() as TagUsage[] | undefined; @@ -130,10 +132,10 @@ const TopKeyView: React.FC = ({ topKeys, teams, showTags = fals title={
- Tag Name: {tag.tag} + {t("usagePage.topKeyView.tagName")} {tag.tag}
- Spend:{" "} + {t("usagePage.topKeyView.tagSpend")}{" "} {tag.usage > 0 && tag.usage < 0.01 ? "<$0.01" : `$${formatNumberWithCommas(tag.usage, 2)}`}
@@ -146,7 +148,7 @@ const TopKeyView: React.FC = ({ topKeys, teams, showTags = fals
@@ -228,15 +230,15 @@ const TopKeyView: React.FC = ({ topKeys, teams, showTags = fals
- Key Alias: + {t("usagePage.topKeyView.tooltipKeyAlias")} {item?.key_alias}
- Key ID: + {t("usagePage.topKeyView.tooltipKeyId")} {item?.api_key}
- Spend: + {t("usagePage.topKeyView.tooltipSpend")} ${formatNumberWithCommas(item?.spend, 2)}
diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/TopModelView.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/TopModelView.tsx index c69ba42f182..adf995cc176 100644 --- a/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/TopModelView.tsx +++ b/ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/TopModelView.tsx @@ -1,6 +1,7 @@ import { BarChart } from "@tremor/react"; import { Segmented } from "antd"; import { useState } from "react"; +import { useTranslation } from "react-i18next"; import { formatNumberWithCommas } from "../../../../utils/dataUtils"; import { DataTable } from "../../../view_logs/table"; @@ -19,16 +20,17 @@ interface TopModelViewProps { } export default function TopModelView({ topModels, topModelsLimit, setTopModelsLimit }: TopModelViewProps) { + const { t } = useTranslation(); const [modelViewMode, setModelViewMode] = useState<"chart" | "table">("table"); const columns = [ { - header: "Model", + header: t("usagePage.topModelView.colModel"), accessorKey: "key", cell: (info: any) => info.getValue() || "-", }, { - header: "Spend (USD)", + header: t("usagePage.topModelView.colSpendUsd"), accessorKey: "spend", cell: (info: any) => { const value = info.getValue(); @@ -36,17 +38,17 @@ export default function TopModelView({ topModels, topModelsLimit, setTopModelsLi }, }, { - header: "Successful", + header: t("usagePage.topModelView.colSuccessful"), accessorKey: "successful_requests", cell: (info: any) => {info.getValue()?.toLocaleString() || 0}, }, { - header: "Failed", + header: t("usagePage.topModelView.colFailed"), accessorKey: "failed_requests", cell: (info: any) => {info.getValue()?.toLocaleString() || 0}, }, { - header: "Tokens", + header: t("usagePage.topModelView.colTokens"), accessorKey: "tokens", cell: (info: any) => info.getValue()?.toLocaleString() || 0, }, @@ -71,13 +73,13 @@ export default function TopModelView({ topModels, topModelsLimit, setTopModelsLi onClick={() => setModelViewMode("table")} className={`px-3 py-1 text-sm rounded-md ${modelViewMode === "table" ? "bg-blue-100 text-blue-700" : "bg-gray-100 text-gray-700"}`} > - Table View + {t("usagePage.topModelView.tableView")}
diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/KeyModelUsageView.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/KeyModelUsageView.tsx index ee1a49051da..38368295f2c 100644 --- a/ui/litellm-dashboard/src/components/UsagePage/components/KeyModelUsageView.tsx +++ b/ui/litellm-dashboard/src/components/UsagePage/components/KeyModelUsageView.tsx @@ -2,7 +2,9 @@ import { formatNumberWithCommas } from "@/utils/dataUtils"; import { BarChart, Card, Title } from "@tremor/react"; import { Table } from "antd"; import type { ColumnsType } from "antd/es/table"; -import React, { useState } from "react"; +import React, { useMemo, useState } from "react"; +import { useTranslation } from "react-i18next"; +import type { TFunction } from "i18next"; import { TopModelData } from "../types"; interface KeyModelUsageViewProps { @@ -13,33 +15,33 @@ const VISIBLE_ROWS = 5; // antd Table with size="small" has a row height of ~39px const ANTD_SMALL_TABLE_ROW_HEIGHT = 39; -const columns: ColumnsType = [ +const getColumns = (t: TFunction): ColumnsType => [ { - title: "Model", + title: t("usagePage.keyModelUsageView.colModel"), dataIndex: "model", key: "model", render: (value) => value || "-", }, { - title: "Spend (USD)", + title: t("usagePage.keyModelUsageView.colSpendUsd"), dataIndex: "spend", key: "spend", render: (value) => `$${formatNumberWithCommas(value, 2)}`, }, { - title: "Successful", + title: t("usagePage.keyModelUsageView.colSuccessful"), dataIndex: "successful_requests", key: "successful_requests", render: (value) => {value?.toLocaleString() || 0}, }, { - title: "Failed", + title: t("usagePage.keyModelUsageView.colFailed"), dataIndex: "failed_requests", key: "failed_requests", render: (value) => {value?.toLocaleString() || 0}, }, { - title: "Tokens", + title: t("usagePage.keyModelUsageView.colTokens"), dataIndex: "tokens", key: "tokens", render: (value) => value?.toLocaleString() || 0, @@ -47,6 +49,8 @@ const columns: ColumnsType = [ ]; const KeyModelUsageView: React.FC = ({ topModels }) => { + const { t } = useTranslation(); + const columns = useMemo(() => getColumns(t), [t]); const [viewMode, setViewMode] = useState<"chart" | "table">("table"); if (topModels.length === 0) { @@ -56,19 +60,19 @@ const KeyModelUsageView: React.FC = ({ topModels }) => { return (
- Model Usage + {t("usagePage.keyModelUsageView.title")}
diff --git a/ui/litellm-dashboard/src/locales/en.json b/ui/litellm-dashboard/src/locales/en.json index 2e5282dd6f6..9d2c6ca316b 100644 --- a/ui/litellm-dashboard/src/locales/en.json +++ b/ui/litellm-dashboard/src/locales/en.json @@ -4868,5 +4868,106 @@ "invalidPercentageRange": "Percentage must be between 0% and 1000%", "invalidFixedAmount": "Fixed amount must be non-negative" } + }, + "usagePage": { + "endpointUsageBarChart": { + "title": "Success vs Failed Requests by Endpoint" + }, + "endpointUsageLineChart": { + "title": "Endpoint Usage Trends" + }, + "entityUsage": { + "filterLabel": "Filter by {{entityType}}", + "filterPlaceholder": "Select {{entityType}} to filter...", + "fetchingSpendData": "Currently fetching spend data: fetched {{currentPage}} / {{totalPages}} pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime, open a new tab.", + "partialData": "Showing partial data ({{currentPage}}/{{totalPages}} pages loaded)", + "fetchingAgentData": "Currently fetching agent data: fetched {{currentPage}} / {{totalPages}} pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime, open a new tab.", + "partialAgentData": "Showing partial agent data ({{currentPage}}/{{totalPages}} pages loaded)", + "filterByTeam": "Filter by team", + "stopButton": "Stop", + "tabCost": "Cost", + "tabRequestTokenConsumption": "Request / Token Consumption", + "tabModelActivity": "Model Activity", + "tabAgentActivity": "Agent Activity", + "tabKeyActivity": "Key Activity", + "tabEndpointActivity": "Endpoint Activity", + "spendOverview": "{{entity}} Spend Overview", + "totalSpend": "Total Spend", + "totalRequests": "Total Requests", + "successfulRequests": "Successful Requests", + "failedRequests": "Failed Requests", + "totalTokens": "Total Tokens", + "dailySpend": "Daily Spend", + "tooltipTotalSpend": "Total Spend: ${{amount}}", + "tooltipTotalRequests": "Total Requests: {{count}}", + "tooltipSuccessful": "Successful: {{count}}", + "tooltipFailed": "Failed: {{count}}", + "tooltipTotalTokens": "Total Tokens: {{count}}", + "tooltipTotalEntities": "Total {{entity}}s: {{count}}", + "tooltipSpendByEntity": "Spend by {{entity}}:", + "tooltipAndMore": "...and {{count}} more", + "spendPerEntity": "Spend Per {{entity}}", + "showingTop5BySpend": "Showing Top 5 by Spend", + "getStartedTracking": "Get Started by Tracking cost per {{entity}} here", + "tooltipSpend": "Spend: ${{amount}}", + "tooltipRequests": "Requests: {{count}}", + "tooltipTokens": "Tokens: {{count}}", + "colSpend": "Spend", + "colSuccessful": "Successful", + "colFailed": "Failed", + "colTokens": "Tokens", + "colProvider": "Provider", + "topVirtualKeys": "Top Virtual Keys", + "topAgents": "Top Agents", + "topModels": "Top Models", + "topAgentsDrivingSpend": "Top Agents Driving Spend", + "providerUsage": "Provider Usage", + "providerLogoAlt": "{{provider}} logo" + }, + "spendByProvider": { + "title": "Spend by Provider", + "showZeroSpend": "Show Zero Spend", + "showUnknown": "Show Unknown", + "unknownTooltip": "Requests that failed to route to a provider", + "colProvider": "Provider", + "colSpend": "Spend", + "colSuccessful": "Successful", + "colFailed": "Failed", + "colTokens": "Tokens" + }, + "topKeyView": { + "colKeyId": "Key ID", + "colKeyAlias": "Key Alias", + "colTags": "Tags", + "colSpendUsd": "Spend (USD)", + "tagName": "Tag Name:", + "tagSpend": "Spend:", + "showFewerTags": "Show fewer tags", + "showAllTags": "Show all tags", + "tooltipKeyAlias": "Key Alias:", + "tooltipKeyId": "Key ID:", + "tooltipSpend": "Spend:", + "tableView": "Table View", + "chartView": "Chart View" + }, + "topModelView": { + "colModel": "Model", + "colSpendUsd": "Spend (USD)", + "colSuccessful": "Successful", + "colFailed": "Failed", + "colTokens": "Tokens", + "tableView": "Table View", + "chartView": "Chart View" + }, + "keyModelUsageView": { + "title": "Model Usage", + "colModel": "Model", + "colSpendUsd": "Spend (USD)", + "colSuccessful": "Successful", + "colFailed": "Failed", + "colTokens": "Tokens", + "tableView": "Table", + "chartView": "Chart" + } } } diff --git a/ui/litellm-dashboard/src/locales/zh-CN.json b/ui/litellm-dashboard/src/locales/zh-CN.json index 25043fb1ab0..995f1febca3 100644 --- a/ui/litellm-dashboard/src/locales/zh-CN.json +++ b/ui/litellm-dashboard/src/locales/zh-CN.json @@ -4868,5 +4868,106 @@ "invalidPercentageRange": "百分比必须在 0% 到 1000% 之间", "invalidFixedAmount": "固定金额不能为负数" } + }, + "usagePage": { + "endpointUsageBarChart": { + "title": "按端点统计成功与失败请求" + }, + "endpointUsageLineChart": { + "title": "端点用量趋势" + }, + "entityUsage": { + "filterLabel": "按 {{entityType}} 筛选", + "filterPlaceholder": "选择 {{entityType}} 进行筛选...", + "fetchingSpendData": "正在获取花费数据:已获取 {{currentPage}} / {{totalPages}} 页。图表会随数据加载定期更新。离开本页将停止并重置加载。如需继续使用界面,请 新标签页打开。", + "partialData": "显示部分数据(已加载 {{currentPage}}/{{totalPages}} 页)", + "fetchingAgentData": "正在获取 Agent 数据:已获取 {{currentPage}} / {{totalPages}} 页。图表会随数据加载定期更新。离开本页将停止并重置加载。如需继续使用界面,请 新标签页打开。", + "partialAgentData": "显示部分 Agent 数据(已加载 {{currentPage}}/{{totalPages}} 页)", + "filterByTeam": "按团队筛选", + "stopButton": "停止", + "tabCost": "花费", + "tabRequestTokenConsumption": "请求 / Token 消耗", + "tabModelActivity": "模型活动", + "tabAgentActivity": "Agent 活动", + "tabKeyActivity": "密钥活动", + "tabEndpointActivity": "端点活动", + "spendOverview": "{{entity}} 花费概览", + "totalSpend": "总花费", + "totalRequests": "总请求数", + "successfulRequests": "成功请求数", + "failedRequests": "失败请求数", + "totalTokens": "总 Token 数", + "dailySpend": "每日花费", + "tooltipTotalSpend": "总花费:${{amount}}", + "tooltipTotalRequests": "总请求数:{{count}}", + "tooltipSuccessful": "成功:{{count}}", + "tooltipFailed": "失败:{{count}}", + "tooltipTotalTokens": "总 Token 数:{{count}}", + "tooltipTotalEntities": "{{entity}} 总数:{{count}}", + "tooltipSpendByEntity": "按 {{entity}} 统计花费:", + "tooltipAndMore": "...以及另外 {{count}} 个", + "spendPerEntity": "每个 {{entity}} 的花费", + "showingTop5BySpend": "显示花费前 5", + "getStartedTracking": "开始按 {{entity}} 跟踪成本,点击这里", + "tooltipSpend": "花费:${{amount}}", + "tooltipRequests": "请求数:{{count}}", + "tooltipTokens": "Token 数:{{count}}", + "colSpend": "花费", + "colSuccessful": "成功", + "colFailed": "失败", + "colTokens": "Token", + "colProvider": "提供商", + "topVirtualKeys": "热门虚拟密钥", + "topAgents": "热门 Agent", + "topModels": "热门模型", + "topAgentsDrivingSpend": "花费最高的 Agent", + "providerUsage": "提供商用量", + "providerLogoAlt": "{{provider}} 图标" + }, + "spendByProvider": { + "title": "按提供商统计花费", + "showZeroSpend": "显示零花费", + "showUnknown": "显示未知", + "unknownTooltip": "路由到提供商失败的请求", + "colProvider": "提供商", + "colSpend": "花费", + "colSuccessful": "成功", + "colFailed": "失败", + "colTokens": "Token" + }, + "topKeyView": { + "colKeyId": "密钥 ID", + "colKeyAlias": "密钥别名", + "colTags": "标签", + "colSpendUsd": "花费(USD)", + "tagName": "标签名:", + "tagSpend": "花费:", + "showFewerTags": "显示更少标签", + "showAllTags": "显示全部标签", + "tooltipKeyAlias": "密钥别名:", + "tooltipKeyId": "密钥 ID:", + "tooltipSpend": "花费:", + "tableView": "表格视图", + "chartView": "图表视图" + }, + "topModelView": { + "colModel": "模型", + "colSpendUsd": "花费(USD)", + "colSuccessful": "成功", + "colFailed": "失败", + "colTokens": "Token", + "tableView": "表格视图", + "chartView": "图表视图" + }, + "keyModelUsageView": { + "title": "模型用量", + "colModel": "模型", + "colSpendUsd": "花费(USD)", + "colSuccessful": "成功", + "colFailed": "失败", + "colTokens": "Token", + "tableView": "表格", + "chartView": "图表" + } } }