diff --git a/litellm/proxy/health_endpoints/_health_endpoints.py b/litellm/proxy/health_endpoints/_health_endpoints.py index 88aa55fd4a9..1c0e09a9aac 100644 --- a/litellm/proxy/health_endpoints/_health_endpoints.py +++ b/litellm/proxy/health_endpoints/_health_endpoints.py @@ -2036,6 +2036,13 @@ async def test_model_connection( # Clean the result for display cleaned_result: Final = _clean_endpoint_data({**litellm_params, **result}, details=True) + if "error" in result: + verbose_proxy_logger.error( + "test_model_connection failure for model '%s': %s", + litellm_params.get("model", "unknown"), + result["error"], + ) + return { "status": "error" if "error" in result else "success", "result": cleaned_result,