From 17b8749e1a8de03134c6f289f408499a0749b7f7 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Fri, 24 Apr 2026 17:19:05 -0700 Subject: [PATCH] fix: remove budget_duration from ModelBudgetEditor (not yet enforced) --- .../src/components/OldTeams.tsx | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/ui/litellm-dashboard/src/components/OldTeams.tsx b/ui/litellm-dashboard/src/components/OldTeams.tsx index 57612705086..0140e2ce28e 100644 --- a/ui/litellm-dashboard/src/components/OldTeams.tsx +++ b/ui/litellm-dashboard/src/components/OldTeams.tsx @@ -174,22 +174,13 @@ const getOrganizationAlias = ( return organization?.organization_alias || organizationId; }; -const BUDGET_DURATION_OPTIONS = [ - { label: "No reset", value: "" }, - { label: "Daily", value: "24h" }, - { label: "Weekly", value: "7d" }, - { label: "Monthly", value: "30d" }, - { label: "Yearly", value: "365d" }, -]; - interface ModelBudgetRow { id: string; model: string; max_budget: number | null; - budget_duration: string; } -type ModelBudgetValue = Record; +type ModelBudgetValue = Record; interface ModelBudgetEditorProps { value?: ModelBudgetValue; @@ -204,7 +195,6 @@ const ModelBudgetEditor: React.FC = ({ value, onChange, id: Math.random().toString(36).slice(2), model, max_budget: cfg.max_budget ?? null, - budget_duration: cfg.budget_duration ?? "", })); }); @@ -217,10 +207,7 @@ const ModelBudgetEditor: React.FC = ({ value, onChange, } const obj: ModelBudgetValue = {}; for (const r of filled) { - obj[r.model] = { - max_budget: r.max_budget ?? 0, - ...(r.budget_duration ? { budget_duration: r.budget_duration } : {}), - }; + obj[r.model] = { max_budget: r.max_budget ?? 0 }; } onChange(obj); }; @@ -228,7 +215,7 @@ const ModelBudgetEditor: React.FC = ({ value, onChange, const addRow = () => { const newRows = [ ...rows, - { id: Math.random().toString(36).slice(2), model: "", max_budget: null, budget_duration: "" }, + { id: Math.random().toString(36).slice(2), model: "", max_budget: null }, ]; setRows(newRows); }; @@ -269,12 +256,6 @@ const ModelBudgetEditor: React.FC = ({ value, onChange, value={row.max_budget} onChange={(val) => updateRow(row.id, "max_budget", val)} /> -