From 91d88737b40ae013c40037c89247d019d3ed664e Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Sat, 4 Apr 2026 10:29:02 -0700 Subject: [PATCH] fix(ui): don't overwrite vector_store_ids with empty array on model edit The edit-model form initialized vector_store_ids to [] and then unconditionally included it in the update payload. Editing any unrelated field (e.g. temperature) on a model without vector stores would inject vector_store_ids: [] into the model's litellm_params via the PATCH-merge backend, which then propagated to inference requests and broke Anthropic calls. Mirror the cache_control_injection_points pattern directly below: only include the field when length > 0, otherwise delete the key from the payload so PATCH leaves the stored value untouched. --- ui/litellm-dashboard/src/components/model_info_view.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/litellm-dashboard/src/components/model_info_view.tsx b/ui/litellm-dashboard/src/components/model_info_view.tsx index 9e846c83ff3..e14fc0c5f6c 100644 --- a/ui/litellm-dashboard/src/components/model_info_view.tsx +++ b/ui/litellm-dashboard/src/components/model_info_view.tsx @@ -265,10 +265,10 @@ export default function ModelInfoView({ if (values.guardrails) { updatedLitellmParams.guardrails = values.guardrails; } - if (values.vector_store_ids !== undefined) { - updatedLitellmParams.vector_store_ids = Array.isArray(values.vector_store_ids) - ? values.vector_store_ids - : []; + if (values.vector_store_ids?.length > 0) { + updatedLitellmParams.vector_store_ids = values.vector_store_ids; + } else { + delete updatedLitellmParams.vector_store_ids; } // Handle cache control settings