open-webui/backend/open_webui
Classic298 656de56a3e
fix: gracefully handle missing functions when loading models (#21476)
When models reference functions (via filterIds/actionIds) that no longer
exist in the database, the /api/models endpoint crashes with a 500 error,
preventing the UI from loading chats entirely. This can happen after
upgrades when built-in functions are removed or when user-created
functions are deleted while still referenced by models.

Instead of raising an exception, log at INFO level and skip the missing
function so the rest of the models load successfully.

Fixes #21464

https://claude.ai/code/session_015JRM7m2bNeZPBBmV2Gv4Mj

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-16 13:02:54 -06:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal chore: format 2026-02-11 16:24:11 -06:00
migrations refac: scim 2026-02-13 14:27:11 -06:00
models chore: format 2026-02-16 00:43:32 -06:00
retrieval Update utils.py (#21105) 2026-02-13 13:37:12 -06:00
routers chore: format 2026-02-16 00:43:32 -06:00
socket refac 2026-02-15 18:41:16 -06:00
static refac 2025-08-10 00:02:58 +04:00
storage chore: format 2026-02-11 16:24:11 -06:00
test refac: defer profile 2026-02-13 14:08:07 -06:00
tools enh: apply admin default to builtin web search (#21373) 2026-02-13 13:32:48 -06:00
utils fix: gracefully handle missing functions when loading models (#21476) 2026-02-16 13:02:54 -06:00
__init__.py Update __init__.py 2025-04-15 09:55:35 +02:00
alembic.ini fix: Alembic CLI commands from failing 2025-08-15 04:17:47 -04:00
config.py refac 2026-02-15 23:28:47 -06:00
constants.py feat/enh: optional password validation 2025-11-20 17:44:49 -05:00
env.py fix issues/21399 (#21400) 2026-02-13 17:42:34 -06:00
functions.py chore: format 2026-02-11 16:24:11 -06:00
main.py chore: format 2026-02-16 00:43:32 -06:00
tasks.py refac 2026-02-12 15:29:34 -06:00