Skip to content

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]

ui fix viewing budget info

Ishaan Jaff8dc1af666b41
diff --git a/ui/litellm-dashboard/src/components/view_key_table.tsx b/ui/litellm-dashboard/src/components/view_key_table.tsx
index 9e765e81d87..7d6242098d3 100644
--- a/ui/litellm-dashboard/src/components/view_key_table.tsx
+++ b/ui/litellm-dashboard/src/components/view_key_table.tsx
@@ -88,7 +88,8 @@ interface ItemData {
metadata: any;
user_id: string | null;
expires: any;
- budget_reset_at?: string | null;
+ budget_duration: string | null;
+ budget_reset_at: string | null;
// Add any other properties that exist in the item data
}
@@ -306,7 +307,7 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
name="budget_duration"
help={`Current Reset Budget: ${
token.budget_duration
- }, budget will be reset at ${new Date(token.budget_reset_at).toLocaleString()}`}
+ }, budget will be reset: ${token.budget_reset_at ? new Date(token.budget_reset_at).toLocaleString() : 'Never'}`}
>
<Select placeholder="n/a">
<Select.Option value="daily">daily</Select.Option>
@@ -921,7 +922,7 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
{selectedToken.budget_duration && (
<>
<br />
- Budget will be reset at {new Date(selectedToken.budget_reset_at).toLocaleString()}
+ Budget will be reset at {selectedToken.budget_reset_at ? new Date(selectedToken.budget_reset_at).toLocaleString() : 'Never'}
</>
)}
</>