Skip to content

fix(ui): rename model config files on save to prevent duplicates#9388

Merged
mudler merged 1 commit intomasterfrom
fix/model-rename-duplicates
Apr 17, 2026
Merged

fix(ui): rename model config files on save to prevent duplicates#9388
mudler merged 1 commit intomasterfrom
fix/model-rename-duplicates

Conversation

@mudler
Copy link
Copy Markdown
Owner

@mudler mudler commented Apr 16, 2026

Editing a model's YAML and changing the name: field previously wrote the new body to the original <oldName>.yaml. On reload the config loader indexed that file under the new name while the old key lingered in memory, producing two entries in the system UI that shared a single underlying file — deleting either removed both.

Detect the rename in EditModelEndpoint and rename the on-disk <name>.yaml and ._gallery_<name>.yaml to match, drop the stale in-memory key before the reload, and redirect the editor URL in the React UI so it tracks the new name. Reject conflicts (409) and names containing path separators (400).

Fixes #9294

Editing a model's YAML and changing the `name:` field previously wrote
the new body to the original `<oldName>.yaml`. On reload the config
loader indexed that file under the new name while the old key
lingered in memory, producing two entries in the system UI that
shared a single underlying file — deleting either removed both.

Detect the rename in EditModelEndpoint and rename the on-disk
`<name>.yaml` and `._gallery_<name>.yaml` to match, drop the stale
in-memory key before the reload, and redirect the editor URL in the
React UI so it tracks the new name. Reject conflicts (409) and names
containing path separators (400).

Fixes #9294
@mudler mudler merged commit 7c5d616 into master Apr 17, 2026
41 checks passed
@mudler mudler deleted the fix/model-rename-duplicates branch April 17, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Renaming a model causes duplicates in the UI

1 participant