BerriAI/litellm · error · HTTPException
Failed to test connection: {e}
Error message
Failed to test connection: {e} What it means
Error "Failed to test connection: {e}" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/health_endpoints/_health_endpoints.py:1987
prompt="test from litellm",
input=["test from litellm"],
),
HEALTH_CHECK_TIMEOUT_SECONDS,
)
# Clean the result for display
cleaned_result: Final = _clean_endpoint_data({**litellm_params, **result}, details=True)
return {
"status": "error" if "error" in result else "success",
"result": cleaned_result,
}
except HTTPException as e:
raise e
except Exception as e:
verbose_proxy_logger.debug("litellm.proxy.health_endpoints.test_model_connection(): Exception occurred - %s", e)
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail={"error": f"Failed to test connection: {e}"},
)
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Check the underlying exception for the connection failure cause.
- Verify the target service credentials, host, and network reachability.
When it happens
Trigger: Thrown at litellm/proxy/health_endpoints/_health_endpoints.py:1987 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/e8959da46e4c316e.
Report an issue: GitHub.