This commit is contained in:
Ishaan Jaffer 2026-02-10 14:53:50 -08:00
parent a0a6b7196a
commit 276d728112

View file

@ -164,10 +164,9 @@ def get_model_cost_map(url: str) -> dict:
only costs a cheap integer comparison the full backup JSON is only
parsed when it needs to be *returned* as a fallback.
"""
if (
os.getenv("LITELLM_LOCAL_MODEL_COST_MAP", False)
or os.getenv("LITELLM_LOCAL_MODEL_COST_MAP", False) == "True"
):
# Note: can't use get_secret_bool here — this runs during litellm.__init__
# before litellm._key_management_settings is set.
if os.getenv("LITELLM_LOCAL_MODEL_COST_MAP", "").lower() == "true":
return GetModelCostMap.load_local_model_cost_map()
try: