mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-23 00:41:40 +00:00
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.
This commit is contained in:
parent
a5322c6efc
commit
91d88737b4
1 changed files with 4 additions and 4 deletions
|
|
@ -265,10 +265,10 @@ export default function ModelInfoView({
|
||||||
if (values.guardrails) {
|
if (values.guardrails) {
|
||||||
updatedLitellmParams.guardrails = values.guardrails;
|
updatedLitellmParams.guardrails = values.guardrails;
|
||||||
}
|
}
|
||||||
if (values.vector_store_ids !== undefined) {
|
if (values.vector_store_ids?.length > 0) {
|
||||||
updatedLitellmParams.vector_store_ids = Array.isArray(values.vector_store_ids)
|
updatedLitellmParams.vector_store_ids = values.vector_store_ids;
|
||||||
? values.vector_store_ids
|
} else {
|
||||||
: [];
|
delete updatedLitellmParams.vector_store_ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle cache control settings
|
// Handle cache control settings
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue