From 3c4e1c21ae941a95c32466e5b641addbd6cabbaa Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Wed, 20 May 2026 07:20:51 +0000 Subject: [PATCH] fix(tests): guard conftest backfill against empty local cost map --- tests/local_testing/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/local_testing/conftest.py b/tests/local_testing/conftest.py index 5389dd96aed..06637b844b1 100644 --- a/tests/local_testing/conftest.py +++ b/tests/local_testing/conftest.py @@ -31,9 +31,10 @@ import litellm # the cassette state the branch is being tested with. from litellm.litellm_core_utils.get_model_cost_map import GetModelCostMap -for _k, _v in GetModelCostMap.load_local_model_cost_map().items(): +_local_cost_map = GetModelCostMap.load_local_model_cost_map() +for _k, _v in _local_cost_map.items(): litellm.model_cost.setdefault(_k, _v) -del _k, _v +del _local_cost_map from tests._vcr_conftest_common import ( # noqa: E402,F401 VerboseReporterState,