fix(utils): use getattr for get_litellm_logging_class in function_setup

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

View file

@ -1078,6 +1078,7 @@ def function_setup( # noqa: PLR0915
call_type=call_type,
):
stream = True
get_litellm_logging_class = getattr(sys.modules[__name__], 'get_litellm_logging_class')
logging_obj = get_litellm_logging_class()( # Victim for object pool
model=model, # type: ignore
messages=messages,