mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
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:
parent
48810e6bcb
commit
b3348c665a
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
#########################################################
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue