fix: use cached import helper for Logging in ahealth_check to preserve lazy loading

- Use get_litellm_logging_class() from cached_imports instead of direct import
- Preserves lazy loading benefit (only loads when function is called)
- Follows existing codebase pattern for cached imports
- Fixes NameError: name 'Logging' is not defined in test_ahealth_check_ocr
This commit is contained in:
AlexsanderHamir 2025-11-25 14:22:48 -08:00
parent 48810e6bcb
commit b3348c665a

View file

@ -6109,6 +6109,10 @@ async def ahealth_check(
}
"""
from litellm.litellm_core_utils.health_check_helpers import HealthCheckHelpers
from litellm.litellm_core_utils.cached_imports import get_litellm_logging_class
# Use cached import helper to lazy-load Logging class (only loads when function is called)
Logging = get_litellm_logging_class()
# Map modes to their corresponding health check calls
#########################################################