fix(utils): use getattr for get_set_callbacks in function_setup

- Update get_set_callbacks() usage in function_setup to use getattr for lazy loading
- Fixes NameError: name 'get_set_callbacks' is not defined error that occurs when get_set_callbacks is lazy-loaded
This commit is contained in:
Alexsander Hamir 2026-01-03 15:05:42 -08:00
parent 612eb5a068
commit 1d82946f95

View file

@ -818,6 +818,7 @@ def function_setup( # noqa: PLR0915
+ litellm.failure_callback
)
)
get_set_callbacks = getattr(sys.modules[__name__], 'get_set_callbacks')
get_set_callbacks()(callback_list=callback_list, function_id=function_id)
## ASYNC CALLBACKS
if len(litellm.input_callback) > 0: