diff --git a/ui/litellm-dashboard/src/components/usage.tsx b/ui/litellm-dashboard/src/components/usage.tsx index 543833767..682c664c4 100644 --- a/ui/litellm-dashboard/src/components/usage.tsx +++ b/ui/litellm-dashboard/src/components/usage.tsx @@ -212,7 +212,7 @@ const UsagePage: React.FC = ({ setKeySpendData(overall_spend); const top_keys = await adminTopKeysCall(accessToken); const filtered_keys = top_keys.map((k: any) => ({ - key: (k["key_name"] || k["key_alias"] || k["api_key"]).substring( + key: (k["key_alias"] || k["key_name"] || k["api_key"]).substring( 0, 10 ), @@ -237,6 +237,11 @@ const UsagePage: React.FC = ({ total_spend_per_team = total_spend_per_team.map((tspt: any) => { tspt["name"] = tspt["team_id"] || ""; tspt["value"] = tspt["total_spend"] || 0; + // round the value to 2 decimal places + + tspt["value"] = tspt["value"].toFixed(2); + + return tspt; })