fix(api)!: Stop model prior to deletion (#8422)

* Unload model prior to deletion

Signed-off-by: Andres Smith <andressmithdev@pm.me>

* Fix LFM model in gallery

Signed-off-by: Andres Smith <andressmithdev@pm.me>

* Remove mistakenly added files

Signed-off-by: Andres Smith <andressmithdev@pm.me>

---------

Signed-off-by: Andres Smith <andressmithdev@pm.me>
This commit is contained in:
Andres
2026-02-06 09:22:10 +01:00
committed by GitHub
parent bcd927da6e
commit efd552f83e
19 changed files with 32 additions and 11 deletions

View File

@@ -197,6 +197,9 @@ func processModelOperation(
switch {
case op.Delete:
if err := modelLoader.ShutdownModel(op.GalleryElementName); err != nil {
xlog.Warn("Failed to unload model during deletion", "model", op.GalleryElementName, "error", err)
}
return gallery.DeleteModelFromSystem(systemState, op.GalleryElementName)
case op.GalleryElement != nil:
installedModel, err := gallery.InstallModel(