diff --git a/dspy/clients/lm.py b/dspy/clients/lm.py index ccc730f2b..e00dd7f5e 100644 --- a/dspy/clients/lm.py +++ b/dspy/clients/lm.py @@ -7,7 +7,10 @@ import warnings with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=UserWarning) - import litellm + if "LITELLM_LOCAL_MODEL_COST_MAP" not in os.environ: + os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True" + import litellm + litellm.telemetry = False from litellm.caching import Cache disk_cache_dir = os.environ.get('DSPY_CACHEDIR') or os.path.join(Path.home(), '.dspy_cache')