mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[PR #24546] [CLOSED] fix: llamacpp load/unload indicator now detects loaded models via /slots #98755
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/24546
Author: @kimjune01
Created: 5/10/2026
Status: ❌ Closed
Base:
dev← Head:fix-llamacpp-load-indicator-24544📝 Commits (10+)
fe6783cMerge pull request #19030 from open-webui/devfc05e0aMerge pull request #19405 from open-webui/deve3faec6Merge pull request #19416 from open-webui/dev9899293Merge pull request #19448 from open-webui/dev140605eMerge pull request #19462 from open-webui/dev6f1486fMerge pull request #19466 from open-webui/devd95f533Merge pull request #19729 from open-webui/deva7271530.6.43 (#20093)6adde20Merge pull request #20394 from open-webui/devf9b0534Merge pull request #20522 from open-webui/dev📊 Changes
1 file changed (+75 additions, -2 deletions)
View changed files
📝
backend/open_webui/utils/models.py(+75 -2)📄 Description
The current load indicator treats a model as loaded only when
/api/tagsincludesexpires_at, which is standard Ollama behavior. llama.cpp-compatible servers can keep models loaded in/slots, but their/api/tagsresponse does not includeexpires_at, so open-webui shows those models as unloaded.This change adds per-backend detection for
/slotssupport. During model refresh, open-webui fetches/api/tagsand, unless the backend is already known not to support it, probes/slotsconcurrently. A200response caches that backend as supporting/slots; a404caches it as not supporting/slots; transient failures such as timeouts or 5xx responses are logged but not cached.The load indicator now treats a model as loaded when either:
/api/tagsincludesexpires_at/slotsresponse contains that model IDFor llama.cpp
--models-preset, this matches preset names directly when the same identifier appears in both/api/tagsand/slots. Whenprefix_idis configured, both raw and prefixed model IDs are checked.This preserves Ollama behavior while correctly showing llama.cpp slot-loaded models as loaded, without repeatedly probing
/slotson backends that return404.Fixes #24544.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.