diff --git a/litellm/main.py b/litellm/main.py index c2e7a8283e9..b3d62daa4d8 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -9148,6 +9148,7 @@ async def ahealth_check( custom_llm_provider=custom_llm_provider_from_params, api_base=api_base_from_params, api_key=api_key_from_params, + litellm_params=GenericLiteLLMParams(**model_params), ) model_params["cache"] = {"no-cache": True} # don't used cached responses for making health check calls diff --git a/tests/unit/proxy/health_endpoints/test_health_endpoints.py b/tests/unit/proxy/health_endpoints/test_health_endpoints.py index 264ced8b87c..67b280eb379 100644 --- a/tests/unit/proxy/health_endpoints/test_health_endpoints.py +++ b/tests/unit/proxy/health_endpoints/test_health_endpoints.py @@ -5447,6 +5447,7 @@ async def test_unsaved_chatgpt_account_probe_requires_proxy_admin( from starlette.requests import Request from litellm.proxy import proxy_server + monkeypatch.setenv("CHATGPT_AUTH_FILE", str(tmp_path / "missing-default-auth.json")) auth_file: Final = tmp_path / "auth.json" auth_file.write_text( json.dumps({"access_token": "token-probe", "account_id": "acct-probe", "expires_at": 4102444800})