open-webui/backend/open_webui
June Kim 6ec42e7e9d fix: llamacpp load/unload indicator now detects loaded models via /slots
Fixes #24544

Previously, the loaded indicator only worked for Ollama models (which have
'expires_at' from /api/ps). llama.cpp models served through the Ollama
endpoint don't have 'expires_at' and weren't detected as loaded.

Changes:
- Query /slots endpoint for models without expires_at
- Match slot model IDs to determine loaded status
- Cache server capabilities to avoid 404 spam on standard Ollama servers
- Use asyncio.gather for concurrent /slots requests
- Handle null/empty expires_at values correctly
- Fix URL construction with trailing slash handling

The fix queries /slots concurrently and caches which backends support it,
preventing network spam while adding llama.cpp loaded detection.
2026-05-10 11:34:50 -07:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal chore: format 2026-05-09 15:25:27 +09:00
migrations chore: format 2026-05-09 15:25:27 +09:00
models chore: format 2026-05-11 02:29:13 +09:00
retrieval fix: reject parser-confusing chars in validate_url to close SSRF bypass (#24534) 2026-05-11 00:57:48 +09:00
routers refac 2026-05-11 03:30:12 +09:00
socket chore: format 2026-05-11 02:51:59 +09:00
static chore: format 2026-04-19 22:45:54 +09:00
storage refac 2026-04-12 19:08:30 -05:00
test refac 2026-03-17 17:58:01 -05:00
tools chore: format 2026-05-09 15:25:27 +09:00
utils fix: llamacpp load/unload indicator now detects loaded models via /slots 2026-05-10 11:34:50 -07:00
__init__.py refac 2026-05-09 02:38:08 +09:00
alembic.ini fix: Alembic CLI commands from failing 2025-08-15 04:17:47 -04:00
config.py feat: add IFRAME_CSP env var for srcdoc iframe content security policy 2026-05-11 01:56:02 +09:00
constants.py chore: format 2026-04-14 17:27:31 -05:00
env.py refac 2026-05-11 02:25:11 +09:00
functions.py refac 2026-05-09 04:17:58 +09:00
main.py chore: format 2026-05-11 02:51:59 +09:00
tasks.py refac 2026-03-17 17:58:01 -05:00