From 1b3ebf00f64a45a76f33c37b033119fa7c1ffaac Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Mon, 2 Mar 2026 13:27:11 -0800 Subject: [PATCH] Fix unnecessary mapping overwrites for prefixed providers The staleness check for custom models compared against the raw customModelName instead of the prefixed version, so it always evaluated to true for Azure/OpenAI-Compatible/OpenAI-Text-Compatible, causing an extra re-render on every deps change. --- .../src/components/add_model/conditional_public_model_name.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/add_model/conditional_public_model_name.tsx b/ui/litellm-dashboard/src/components/add_model/conditional_public_model_name.tsx index 825bab7acfe..b7bde61a7b9 100644 --- a/ui/litellm-dashboard/src/components/add_model/conditional_public_model_name.tsx +++ b/ui/litellm-dashboard/src/components/add_model/conditional_public_model_name.tsx @@ -44,7 +44,7 @@ const ConditionalPublicModelName: React.FC = () => { !selectedModels.every((model) => currentMappings.some((mapping: { public_name: string; litellm_model: string }) => { if (model === "custom") { - return mapping.litellm_model === "custom" || mapping.litellm_model === customModelName; + return mapping.litellm_model === "custom" || mapping.litellm_model === prefixWithProvider(selectedProvider, customModelName); } return mapping.litellm_model === prefixWithProvider(selectedProvider, model); }),