From f40f14ae39b4452cb55f117ab3b06949bb3135a7 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 3 Sep 2026 13:09:46 -0700 Subject: [PATCH] fix(tests): fold the local price map into the provider model sets CI unit shards load the price map from main at import, so a model that only exists on the branch never reaches open_ai_chat_completion_models and cost_per_token cannot infer its provider. Refresh the sets after swapping in the local map so the tier pricing cases resolve gpt-6-astra before merge --- .../test_openai_service_tier_long_context_pricing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_litellm/test_openai_service_tier_long_context_pricing.py b/tests/test_litellm/test_openai_service_tier_long_context_pricing.py index 70e9c2720b8..bdb2dc26813 100644 --- a/tests/test_litellm/test_openai_service_tier_long_context_pricing.py +++ b/tests/test_litellm/test_openai_service_tier_long_context_pricing.py @@ -69,6 +69,7 @@ NO_PUBLISHED_PRIORITY_LONG_CONTEXT = ("gpt-5.4", "gpt-5.5") def _local_model_cost_map(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setenv("LITELLM_LOCAL_MODEL_COST_MAP", "True") monkeypatch.setattr(litellm, "model_cost", litellm.get_model_cost_map(url="")) + litellm.add_known_models() @lru_cache(maxsize=2)