From 4e4dd88e7e9f5ce43f11042003e3a34d21f37af6 Mon Sep 17 00:00:00 2001 From: Cesar Garcia <128240629+Chesars@users.noreply.github.com> Date: Fri, 20 Mar 2026 22:18:16 -0300 Subject: [PATCH] Update litellm/litellm_core_utils/get_model_cost_map.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- litellm/litellm_core_utils/get_model_cost_map.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/litellm_core_utils/get_model_cost_map.py b/litellm/litellm_core_utils/get_model_cost_map.py index 8aa422e162..a3e4429dfa 100644 --- a/litellm/litellm_core_utils/get_model_cost_map.py +++ b/litellm/litellm_core_utils/get_model_cost_map.py @@ -26,9 +26,9 @@ def _load_local_model_cost_map() -> dict: # Try loading from package resources (production) try: import importlib.resources - with importlib.resources.open_text( - "litellm", "model_prices_and_context_window.json" - ) as f: + with importlib.resources.files("litellm").joinpath( + "model_prices_and_context_window.json" + ).open("r") as f: return json.load(f) except (FileNotFoundError, ModuleNotFoundError): pass