From 816e0d65976d0dd28aec8c43681d5a88d2176258 Mon Sep 17 00:00:00 2001 From: silentoplayz Date: Sun, 5 Apr 2026 02:55:52 -0400 Subject: [PATCH] fix(backend): silence missing function logs in model population --- backend/open_webui/utils/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/open_webui/utils/models.py b/backend/open_webui/utils/models.py index b57c74744c..fc6ba8658e 100644 --- a/backend/open_webui/utils/models.py +++ b/backend/open_webui/utils/models.py @@ -283,7 +283,8 @@ async def get_all_models(request, refresh: bool = False, user: UserModel = None) # Pre-warm the function module cache once per unique function ID. # This ensures each function's DB freshness check runs exactly once, # not once per (model × function) pair. - for function_id in all_function_ids: + valid_function_ids = [fid for fid in all_function_ids if fid in functions_by_id] + for function_id in valid_function_ids: try: get_function_module_from_cache(request, function_id) except Exception as e: @@ -343,7 +344,7 @@ async def get_all_models(request, refresh: bool = False, user: UserModel = None) for action_id in action_ids: action_function = functions_by_id.get(action_id) if action_function is None: - log.info(f'Action not found: {action_id}') + log.debug(f'Action not found: {action_id}') continue function_module = request.app.state.FUNCTIONS.get(action_id) @@ -356,7 +357,7 @@ async def get_all_models(request, refresh: bool = False, user: UserModel = None) for filter_id in filter_ids: filter_function = functions_by_id.get(filter_id) if filter_function is None: - log.info(f'Filter not found: {filter_id}') + log.debug(f'Filter not found: {filter_id}') continue function_module = request.app.state.FUNCTIONS.get(filter_id)