From bbc8484790266864bf99fd4235cb11b56d43bdba Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Wed, 4 Nov 2026 12:23:05 -0800 Subject: [PATCH] test(utils): stop the register_model replay test leaking gpt-4o pricing on 1.108 Brings over the test_utils.py isolation fix from #47135. The replay test registered openai/gpt-4o with supports_function_calling false into the shared cost map, so a later function calling test on the same worker failed depending on xdist ordering --- tests/unit/test_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 7edfb22c121..381883eb284 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -4749,7 +4749,8 @@ def test_reapply_runtime_registrations_replays_register_model_overrides( # installed would make this depend on when that happens. monkeypatch.setattr(litellm_utils._LiveDeploymentReplay, "callback", None) - saved_model_cost = litellm.model_cost + saved_model_cost: Final = litellm.model_cost + monkeypatch.setattr(litellm, "model_cost", dict(saved_model_cost)) try: litellm.register_model( model_cost={