open-webui/backend/open_webui/utils
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
..
images refac/fix: comfyui filter output node type 2025-12-30 12:24:48 +04:00
mcp refac: AIOHTTP_CLIENT_SESSION_TOOL_SERVER_SSL for mcp connections 2026-01-22 18:30:16 +04:00
telemetry chore: format 2026-02-11 16:24:11 -06:00
access_control.py chore: format 2026-02-11 16:24:11 -06:00
actions.py refac 2026-02-11 16:40:40 -06:00
audit.py chore: format 2026-02-11 16:24:11 -06:00
auth.py chore: format 2026-02-11 16:24:11 -06:00
channels.py feat: channel/thread @ model 2025-09-17 00:49:44 -05:00
chat.py chore: format 2026-02-12 16:13:48 -06:00
code_interpreter.py chore: format 2026-02-11 16:24:11 -06:00
embeddings.py chore: format 2026-02-11 16:24:11 -06:00
files.py refac 2026-01-28 01:18:39 +04:00
filter.py chore/perf: Remove old SRC level log env vars with no impact (#20045) 2025-12-20 08:16:14 -05:00
groups.py refac/enh: db session sharing 2025-12-29 00:21:18 +04:00
headers.py refac 2026-02-06 03:23:37 +04:00
logger.py chore: format 2026-02-11 16:24:11 -06:00
middleware.py chore: format 2026-02-16 00:43:32 -06:00
misc.py refac: "tool_calls" finish reason support 2026-02-16 00:53:01 -06:00
models.py fix: gracefully handle missing functions when loading models (#21476) 2026-02-16 13:02:54 -06:00
oauth.py refac/fix: oauth discovery urls 2026-01-01 14:01:18 +04:00
payload.py chore: format 2026-02-11 16:24:11 -06:00
pdf_generator.py chore: remove unnecessary Path conversions 2025-03-04 19:53:52 +02:00
plugin.py chore: format 2026-02-11 16:24:11 -06:00
rate_limit.py feat: signin rate limit 2025-12-02 03:52:38 -05:00
redis.py REDIS_RECONNECT_DELAY as positive float for handle retry delay on timeout/connection errors (#21021) 2026-01-29 17:13:03 +04:00
response.py refac: "tool_calls" finish reason support 2026-02-16 00:53:01 -06:00
sanitize.py chore: format 2026-02-11 16:24:11 -06:00
security_headers.py chore: format 2024-11-30 23:36:30 -08:00
task.py chore: format 2026-02-11 16:24:11 -06:00
tools.py refac: explicit toggle builtin tools 2026-02-15 17:20:49 -06:00
validate.py chore: format 2026-02-11 16:24:11 -06:00
webhook.py refac 2026-01-08 00:42:29 +04:00