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
This commit is contained in:
Yuneng Jiang 2026-11-04 12:23:05 -08:00
parent 0b5b41ca1b
commit bbc8484790
No known key found for this signature in database

View file

@ -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={