LocalAI/core/services/galleryop
LocalAI [bot] c33d36b870
fix(ollama): guard nil filter in galleryop.ListModels (#9817) (#9836)
The Ollama /api/tags handler passes a nil filter to galleryop.ListModels.
When ModelsPath contains any non-skipped loose file the function then
calls filter(name, nil) and panics, which Echo surfaces to clients as
"Server disconnected without sending a response" - the exact failure
Home Assistant's Ollama integration reports against LocalAI.

Mirror the nil guard already present in
ModelConfigLoader.GetModelConfigsByFilter so every caller is safe, and
add a regression test that exercises the loose-file path with a nil
filter.

Assisted-by: claude:claude-opus-4-7 [Claude Code]

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
2026-05-15 10:07:50 +02:00
..
backends.go feat: backend versioning, upgrade detection and auto-upgrade (#9315) 2026-04-11 22:31:15 +02:00
backends_test.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
galleryop_suite_test.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
list_models.go fix(ollama): guard nil filter in galleryop.ListModels (#9817) (#9836) 2026-05-15 10:07:50 +02:00
list_models_test.go fix(ollama): guard nil filter in galleryop.ListModels (#9817) (#9836) 2026-05-15 10:07:50 +02:00
managers.go feat(distributed): per-node backend installation from the gallery 2026-04-26 22:05:18 +00:00
managers_local.go feat(distributed): per-node backend installation from the gallery 2026-04-26 22:05:18 +00:00
models.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
operation.go feat: backend versioning, upgrade detection and auto-upgrade (#9315) 2026-04-11 22:31:15 +02:00
service.go feat: add biometrics UI (#9524) 2026-04-24 08:50:34 +02:00