From a93cedb03ae47944254b8beffaa9ce31088cc6cd Mon Sep 17 00:00:00 2001 From: Hannah Smith <64043506+hannahmadison@users.noreply.github.com> Date: Tue, 21 Apr 2026 23:24:13 -0400 Subject: [PATCH] fix: add monkeypatch isolation to wildcard test --- tests/test_litellm/proxy/test_health_check_max_tokens.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_litellm/proxy/test_health_check_max_tokens.py b/tests/test_litellm/proxy/test_health_check_max_tokens.py index 6fc87e3665d..85e3aa22596 100644 --- a/tests/test_litellm/proxy/test_health_check_max_tokens.py +++ b/tests/test_litellm/proxy/test_health_check_max_tokens.py @@ -39,10 +39,12 @@ async def test_update_litellm_params_max_tokens_custom(): @pytest.mark.asyncio -async def test_update_litellm_params_max_tokens_wildcard(): +async def test_update_litellm_params_max_tokens_wildcard(monkeypatch): """ Test that max_tokens is not set for wildcard models. """ + monkeypatch.setattr(hc_module, "BACKGROUND_HEALTH_CHECK_MAX_TOKENS", None) + monkeypatch.setattr(hc_module, "BACKGROUND_HEALTH_CHECK_MAX_TOKENS_REASONING", None) model_info = {} litellm_params = {"model": "openai/*"}