DSPy: The framework for programming—not prompting—language models
Python
Revert "fix: set LITELLM_LOCAL_MODEL_COST_MAP before litellm import to avoid HTTP fetch (#9388)" (#9637)
Isaac Millerf5a62732025a
diff --git a/dspy/__init__.py b/dspy/__init__.pyindex e7fa1bb6e..5512a850d 100644--- a/dspy/__init__.py+++ b/dspy/__init__.py@@ -1,6 +1,3 @@-import os-os.environ.setdefault("LITELLM_LOCAL_MODEL_COST_MAP", "True")-from dspy.predict import *from dspy.primitives import *from dspy.retrievers import *diff --git a/dspy/clients/__init__.py b/dspy/clients/__init__.pyindex 2d8909114..8f314dc4f 100644--- a/dspy/clients/__init__.py+++ b/dspy/clients/__init__.py@@ -87,6 +87,7 @@ def _get_dspy_cache():DSPY_CACHE = _get_dspy_cache()+def configure_litellm_logging(level: str = "ERROR"):"""Configure LiteLLM logging to the specified level."""# Litellm uses a global logger called `verbose_logger` to control all loggings.