mudler / mudler/LocalAI

docker-compose.yaml default model phi-2 no longer exists in the gallery

Open
#11,974 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/container bug confirmed
Dominant language
Go
Stars
49.2k
Forks
4.5k
Avg merge
1d 3m
Merged PRs (30d)
239

Description

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

  1. docker compose up -d with the repository's docker-compose.yaml.
  2. 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect docker-compose.yaml and gallery/index.yaml to choose an available default model, then review core/startup/model_preload.go around lines 44 and 57. Reproduce the failure with docker compose up -d and docker compose logs api. Done means the default model exists in the gallery and startup logs report the actual discovery and installation errors without the nil-formatting message.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, go
Domain
ai, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.