LocalAI/core
Ettore Di Giacinto 372eb08dcf
fix(gallery): allow uninstalling orphaned meta backends + force reinstall (#9434)
Two interrelated bugs that combined to make a meta backend impossible
to uninstall once its concrete had been removed from disk (partial
install, earlier crash, manual cleanup).

1. DeleteBackendFromSystem returned "meta backend %q not found" and
   bailed out early when the concrete directory didn't exist,
   preventing the orphaned meta dir from ever being removed. Treat a
   missing concrete as idempotent success — log a warning and continue
   to remove the orphan meta.

2. InstallBackendFromGallery's "already installed, skip" short-circuit
   only checked that the name was known (`backends.Exists(name)`); an
   orphaned meta whose RunFile points at a missing concrete still
   satisfies that check, so every reinstall returned nil without doing
   anything. Afterwards the worker's findBackend returned empty and we
   kept looping with "backend %q not found after install attempt".
   Require the entry to be actually runnable (run.sh stat-able, not a
   directory) before skipping.

New helper isBackendRunnable centralises the runnability test so both
the install guard and future callers stay in sync. Tests cover the
orphaned-meta delete path and the non-runnable short-circuit case.
2026-04-20 00:10:19 +02:00
..
application feat(distributed): sync state with frontends, better backend management reporting (#9426) 2026-04-19 17:55:53 +02:00
backend fix(vision): propagate mtmd media marker from backend via ModelMetadata (#9412) 2026-04-18 20:30:13 +02:00
cli feat(distributed): sync state with frontends, better backend management reporting (#9426) 2026-04-19 17:55:53 +02:00
clients feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
config fix(vision): propagate mtmd media marker from backend via ModelMetadata (#9412) 2026-04-18 20:30:13 +02:00
dependencies_manager feat(ui): move to React for frontend (#8772) 2026-03-05 21:47:12 +01:00
explorer feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
gallery fix(gallery): allow uninstalling orphaned meta backends + force reinstall (#9434) 2026-04-20 00:10:19 +02:00
http feat(distributed): sync state with frontends, better backend management reporting (#9426) 2026-04-19 17:55:53 +02:00
p2p feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
schema feat: wire transcription for llama.cpp, add streaming support (#9353) 2026-04-14 16:13:40 +02:00
services fix(distributed): stop queue loops on agent nodes + dead-letter cap (#9433) 2026-04-19 23:38:43 +02:00
startup feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
templates fix(vision): propagate mtmd media marker from backend via ModelMetadata (#9412) 2026-04-18 20:30:13 +02:00
trace feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00