From f0bbd415c8ca5d9ec78e3de73612058ad60b9603 Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Sat, 4 Apr 2026 13:50:19 -0700 Subject: [PATCH] fix(ui): require TPM or RPM when adding a per-model team rate limit Previously, a row with a model selected but both limits blank was silently dropped on save (neither model_tpm_limit nor model_rpm_limit got the key), so the row disappeared on reload with no feedback. Now the TPM field's validator blocks submission with "Set at least one of TPM or RPM" when a row has a model but neither limit filled. --- .../src/components/team/TeamInfo.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/team/TeamInfo.tsx b/ui/litellm-dashboard/src/components/team/TeamInfo.tsx index 346686d0193..bc54cac9cc7 100644 --- a/ui/litellm-dashboard/src/components/team/TeamInfo.tsx +++ b/ui/litellm-dashboard/src/components/team/TeamInfo.tsx @@ -1027,7 +1027,21 @@ const TeamInfoView: React.FC = ({ }))} /> - + { + const row = (form.getFieldValue("modelLimits") ?? [])[name] ?? {}; + if (row.model && value == null && row.rpm == null) { + return Promise.reject(new Error("Set at least one of TPM or RPM")); + } + return Promise.resolve(); + }, + }, + ]} + >