From 8a3dabb09ff93bed25ef7a7a3bfff67ec3c83d9d 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 23f5f18cab9..9ed10df231e 100644 --- a/ui/litellm-dashboard/src/components/team/TeamInfo.tsx +++ b/ui/litellm-dashboard/src/components/team/TeamInfo.tsx @@ -1026,7 +1026,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(); + }, + }, + ]} + >