Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

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

AlexsanderHamirb3348c665ac6
diff --git a/litellm/main.py b/litellm/main.py
index 88bf0b72a0b..4482cf5d123 100644
--- a/litellm/main.py
+++ b/litellm/main.py
@@ -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
#########################################################