[BUG] Settings update via PUT /api/models/{id} overwrites entire settings dict instead of merging #17
Labels
No labels
blocked:lint-failed
blocked:needs-decision
blocked:no-changes
blocked:no-procedure
blocked:preflight
blocked:verify-failed
bug
feature-request
in-progress
lint-cleanup
ops-task
quickfix
security/high
security/medium
test-coverage
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/vllm_mm#17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When updating model settings via
PUT /api/models/{id}, theModelRepository.update()method directly setsrecord.settings = valuewith the raw incoming dict, which completely replaces the existing settings rather than merging with the current values. This means if the frontend sends only a partial settings update, all un-sent fields are lost.Affected File
backend/app/repositories/model_repository.pylines 104-115Root Cause
When
exclude_unset=Trueis used, only provided keys are included. But the settings field is replaced wholesale rather than deep-merged with existing settings.Impact
Any partial update to a model (e.g., changing just the name) that includes the settings field will wipe all existing settings. If the frontend sends partial settings (which it does via
vllmSettingsToApi()which drops many fields), the dropped fields are permanently removed from the database.Expected Behavior
Settings should be deep-merged with existing values, not replaced:
🤖 Claimed by
gsd-issue-fixer-vllm_mm-17— starting work🤖 [
gsd-issue-fixer-vllm_mm-17] still working — claimed — starting pipeline🤖 [
gsd-issue-fixer-vllm_mm-17] still working — research🤖 [
gsd-issue-fixer-vllm_mm-17] still working — plan🤖 [
gsd-issue-fixer-vllm_mm-17] still working — implement attempt 1Fixed in commit. Closing.
🤖 Released by
gsd-issue-fixer-vllm_mm-17