Files
LocalAI/pkg/model
Anush008 dee4d8a399 refactor(stores): resolve the store backend and its loader slot explicitly
Store loading picked the backend and the loader's process slot in one
function, which let an explicit `backend` argument collide with the
store's own config and made traces report a fixed "local-store".

This changes /stores/* behaviour for every store:

- An explicit `backend` that differs from the one named in the store's
  model config now gets its own loader slot, `<store>@<backend>`, so it
  no longer reuses (or evicts) the process of the configured backend.
  Naming the configured backend, or one of its aliases, keeps the
  store's own slot.
- When the config names a different backend than the explicit one, the
  config's `options` are not passed on, since they are meant for the
  configured backend. A config without `backend:` still passes its
  options to the explicit backend.
- Backend names are compared and reported in canonical form (aliases
  resolved, lower case) through the new model.CanonicalBackend, and
  traces record the backend that was actually used instead of always
  "local-store".

Backend loading itself uses CanonicalBackend for alias handling; type
aliases keep their existing effect.

Signed-off-by: Anush008 <mail@anush.sh>
Assisted-by: Claude Code:claude-sonnet-5-5
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-10-13 08:13:55 +00:00
..
2026-03-30 00:47:27 +02:00