fix(model_settings): preserve unchanged video defaults #10

Merged
john merged 1 commit from fix/preserve-video-default-metadata into main 2026-11-27 08:26:16 +00:00
Owner

Fix

Only rewrite meta.defaultFeatureIds if the requested video default differs from what Open WebUI currently has. A description or compaction-threshold update keeps absent lists absent, empty lists empty, and existing list order unchanged. Explicit video toggles still add/remove only the video entry. Keep the post-write guard unchanged.

Evidence

The Auto update in john/ai #99 added defaultFeatureIds: [] to a model that previously had no such field; the v0.1.0-dev.8 provider then failed its unowned-field readback guard. Reproduced with the exact pinned provider and a mock Open WebUI. Regression tests exercise absent, empty, non-video and already-on lists, including the outgoing update body. Existing real-toggle tests and go test ./... pass locally using OpenTofu 1.13.9.

This is the provider behavior fix. john/ai #101 is diagnostic-only. No version bump or consumer pin change in this PR.

## Fix Only rewrite `meta.defaultFeatureIds` if the requested video default differs from what Open WebUI currently has. A description or compaction-threshold update keeps absent lists absent, empty lists empty, and existing list order unchanged. Explicit video toggles still add/remove only the video entry. Keep the post-write guard unchanged. ## Evidence The Auto update in john/ai #99 added `defaultFeatureIds: []` to a model that previously had no such field; the v0.1.0-dev.8 provider then failed its unowned-field readback guard. Reproduced with the exact pinned provider and a mock Open WebUI. Regression tests exercise absent, empty, non-video and already-on lists, including the outgoing update body. Existing real-toggle tests and `go test ./...` pass locally using OpenTofu 1.13.9. This is the provider behavior fix. john/ai #101 is diagnostic-only. No version bump or consumer pin change in this PR.
fix(model_settings): preserve unchanged video defaults
All checks were successful
CI / release-check-1 (pull_request) Successful in 12s
CI / release-check (pull_request) Successful in 0s
Security / scan (pull_request) Successful in 34s
Security / security (pull_request) Successful in 0s
CI / check (pull_request) Successful in 4m58s
901ec70019
john merged commit dc2dda3b5f into main 2026-11-27 08:26:16 +00:00
john deleted branch fix/preserve-video-default-metadata 2026-11-27 08:26:16 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
john/tofu-provider-openwebui!10
No description provided.