File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,11 +283,15 @@ def get_filter_items_from_module(function, module):
283283 # Pre-warm the function module cache once per unique function ID.
284284 # This ensures each function's DB freshness check runs exactly once,
285285 # not once per (model × function) pair.
286- for function_id in all_function_ids :
286+ # Only attempt to load functions that actually exist in the local DB;
287+ # imported/custom model configs may reference tools or filters the user
288+ # hasn't installed, and trying to load those would cause persistent
289+ # "Failed to load function module" log spam on every model refresh.
290+ for function_id in functions_by_id :
287291 try :
288292 await get_function_module_from_cache (request , function_id )
289293 except Exception as e :
290- log .info (f'Failed to load function module for { function_id } : { e } ' )
294+ log .debug (f'Failed to load function module for { function_id } : { e } ' )
291295
292296 # Apply global model defaults to all models
293297 # Per-model overrides take precedence over global defaults
You can’t perform that action at this time.
0 commit comments