diff --git a/litellm/litellm_core_utils/health_check_helpers.py b/litellm/litellm_core_utils/health_check_helpers.py index 60e4b7495ed..69b12fea21b 100644 --- a/litellm/litellm_core_utils/health_check_helpers.py +++ b/litellm/litellm_core_utils/health_check_helpers.py @@ -283,7 +283,7 @@ class HealthCheckHelpers: ), "responses": lambda: litellm.aresponses( **_filter_model_params(model_params=model_params), - input=prompt or "test", + input=[{"role": "user", "content": prompt or "test"}], ), "anthropic_messages": lambda: litellm.anthropic_messages( **{ diff --git a/litellm/main.py b/litellm/main.py index 37b290f51ba..8ec1eb9403a 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -8812,6 +8812,10 @@ async def ahealth_check( ) model_params["cache"] = {"no-cache": True} # don't used cached responses for making health check calls + # chatgpt provider uses the Responses API exclusively; default to "responses" so the + # health check doesn't send a Chat Completions payload that the backend rejects. + if mode is None and custom_llm_provider == "chatgpt": + mode = "responses" mode = mode or default_health_check_mode( requested_model=requested_model, model=model, custom_llm_provider=custom_llm_provider )