diff --git a/litellm/litellm_core_utils/custom_logger_registry.py b/litellm/litellm_core_utils/custom_logger_registry.py index 5ff30d76718..683386fe335 100644 --- a/litellm/litellm_core_utils/custom_logger_registry.py +++ b/litellm/litellm_core_utils/custom_logger_registry.py @@ -12,6 +12,7 @@ from typing import Union from litellm import _custom_logger_compatible_callbacks_literal from litellm.integrations.agentops import AgentOps +from litellm.integrations.akto.akto_logger import AktoLogger from litellm.integrations.anthropic_cache_control_hook import AnthropicCacheControlHook from litellm.integrations.argilla import ArgillaLogger from litellm.integrations.azure_storage.azure_storage import AzureBlobStorageLogger @@ -38,7 +39,6 @@ from litellm.integrations.langsmith import LangsmithLogger from litellm.integrations.litellm_agent import LiteLLMAgentModelResolver from litellm.integrations.literal_ai import LiteralAILogger from litellm.integrations.mlflow import MlflowLogger -from litellm.integrations.akto.akto_logger import AktoLogger from litellm.integrations.openmeter import OpenMeterLogger from litellm.integrations.opentelemetry import OpenTelemetry from litellm.integrations.opik.opik import OpikLogger diff --git a/litellm/proxy/health_endpoints/_health_endpoints.py b/litellm/proxy/health_endpoints/_health_endpoints.py index 5695d609e3c..fa1ba640da4 100644 --- a/litellm/proxy/health_endpoints/_health_endpoints.py +++ b/litellm/proxy/health_endpoints/_health_endpoints.py @@ -341,11 +341,15 @@ async def health_services_endpoint( # noqa: PLR0915 "message": "Mock LLM request made - check langfuse.", } elif service == "akto": - from litellm.litellm_core_utils.litellm_logging import aktoLogger as _akto from litellm.integrations.akto.akto_logger import AktoLogger + from litellm.litellm_core_utils.litellm_logging import ( + get_custom_logger_compatible_class, + ) try: - akto_logger = _akto if _akto is not None else AktoLogger() + akto_logger = get_custom_logger_compatible_class("akto") + if akto_logger is None: + akto_logger = AktoLogger() response = await akto_logger.async_health_check() except Exception as e: verbose_proxy_logger.warning("Akto health check error: %s", e)