From a55cc3aab38fcc29001b174e29337972d7c3b26e Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Fri, 3 Jul 2026 21:17:37 +0000 Subject: [PATCH] fix: allow clearing budget_fallbacks in edit view when key had existing fallbacks Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../src/components/templates/key_edit_view.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/litellm-dashboard/src/components/templates/key_edit_view.tsx b/ui/litellm-dashboard/src/components/templates/key_edit_view.tsx index 871a0f9ae84..46f42574169 100644 --- a/ui/litellm-dashboard/src/components/templates/key_edit_view.tsx +++ b/ui/litellm-dashboard/src/components/templates/key_edit_view.tsx @@ -308,8 +308,12 @@ export function KeyEditView({ values.budget_limits = []; } + const hadExistingFallbacks = + keyData.budget_fallbacks != null && Object.keys(keyData.budget_fallbacks).length > 0; if (Object.keys(budgetFallbacks).length > 0) { values.budget_fallbacks = budgetFallbacks; + } else if (hadExistingFallbacks) { + values.budget_fallbacks = {}; } await onSubmit(values);