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]

fix: allow clearing budget_fallbacks in edit view when key had existing fallbacks

Krrish Dholakiaa55cc3aab38f
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);