LocalAI version:
quay.io/go-skynet/local-ai:master-gpu-nvidia-cuda-13 (sha256:02e823f5f25ddef3f4edb94a8960e506daa4f71595d7c75b041d52b6eaaf425b, LocalAI bcf196d), docker-compose.yaml at the same commit.
Environment, CPU architecture, OS, and Version:
Docker Desktop 29.7.2 (Compose 5.5.1) on Windows 11 (WSL2), x86_64.
Describe the bug
docker-compose.yaml starts LocalAI with command: [phi-2], but the gallery has no phi-2 entry anymore. gallery/index.yaml only has phi-2-chat, phi-2-chat:Q8_0 and phi-2-orange. On a fresh docker compose up, the gallery lookup fails, startup falls through to the autoimporter, which can't handle a bare name, and LocalAI comes up with no model installed. For people following the quickstart, the first thing they see is an error.
There is also a small bug in how that error is reported. core/startup/model_preload.go:57 does
err = errors.Join(discoverErr, fmt.Errorf("failed to discover model config: %w", err))
It wraps the accumulated err (still nil at that point) instead of discoverErr. This produces the log line failed to discover model config: %!w(<nil>). Line 44 (xlog.Error("[startup] failed installing model", "error", err, ...)) has the same pattern: it logs the accumulated err instead of the per-model e.
To Reproduce
docker compose up -d with the repository's docker-compose.yaml.
docker compose logs api
Expected behavior
The default compose file installs a working model, or at least one that exists in the gallery, and the error message names the actual error.
Logs
ERROR [startup] failed to discover model config error=no importer matched for phi-2 model="phi-2"
ERROR error installing models error=no importer matched for phi-2
failed to discover model config: %!w(<nil>)
Additional context
Suggested fixes: point the compose default at an existing gallery entry (for example phi-2-chat, or a more current small model), and wrap discoverErr / log e in model_preload.go.
LocalAI version:
quay.io/go-skynet/local-ai:master-gpu-nvidia-cuda-13(sha256:02e823f5f25ddef3f4edb94a8960e506daa4f71595d7c75b041d52b6eaaf425b, LocalAIbcf196d),docker-compose.yamlat the same commit.Environment, CPU architecture, OS, and Version:
Docker Desktop 29.7.2 (Compose 5.5.1) on Windows 11 (WSL2), x86_64.
Describe the bug
docker-compose.yamlstarts LocalAI withcommand: [phi-2], but the gallery has nophi-2entry anymore.gallery/index.yamlonly hasphi-2-chat,phi-2-chat:Q8_0andphi-2-orange. On a freshdocker compose up, the gallery lookup fails, startup falls through to the autoimporter, which can't handle a bare name, and LocalAI comes up with no model installed. For people following the quickstart, the first thing they see is an error.There is also a small bug in how that error is reported.
core/startup/model_preload.go:57doesIt wraps the accumulated
err(stillnilat that point) instead ofdiscoverErr. This produces the log linefailed to discover model config: %!w(<nil>). Line 44 (xlog.Error("[startup] failed installing model", "error", err, ...)) has the same pattern: it logs the accumulatederrinstead of the per-modele.To Reproduce
docker compose up -dwith the repository'sdocker-compose.yaml.docker compose logs apiExpected behavior
The default compose file installs a working model, or at least one that exists in the gallery, and the error message names the actual error.
Logs
Additional context
Suggested fixes: point the compose default at an existing gallery entry (for example
phi-2-chat, or a more current small model), and wrapdiscoverErr/ logeinmodel_preload.go.