Update litellm/proxy/health_endpoints/_health_endpoints.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Rohan 2026-03-23 14:25:05 +05:30 committed by GitHub
parent b12ba12749
commit 33342e4502
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -344,7 +344,23 @@ async def health_services_endpoint( # noqa: PLR0915
from litellm.litellm_core_utils.litellm_logging import aktoLogger as _akto
from litellm.integrations.akto.akto_logger import AktoLogger
akto_logger = _akto if _akto is not None else AktoLogger()
elif service == "akto":
from litellm.litellm_core_utils.litellm_logging import aktoLogger as _akto
from litellm.integrations.akto.akto_logger import AktoLogger
try:
akto_logger = _akto if _akto is not None else AktoLogger()
response = await akto_logger.async_health_check()
except Exception as e:
return {"status": "unhealthy", "error_message": str(e)}
return {
"status": response["status"],
"message": (
response["error_message"]
if response["status"] == "unhealthy"
else "Akto is healthy"
),
}
response = await akto_logger.async_health_check()
return {
"status": response["status"],