Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(constants): add env var override support for COMPETITOR_LLM_TEMPERATURE and MAX_COMPETITOR_NAMES

Julio Quinteros Pro422769002510
diff --git a/litellm/constants.py b/litellm/constants.py
index 9391d9730e4..7a2107c8c82 100644
--- a/litellm/constants.py
+++ b/litellm/constants.py
@@ -1476,6 +1476,6 @@ MICROSOFT_USER_LAST_NAME_ATTRIBUTE = str(
)
# Policy template enrichment
-MAX_COMPETITOR_NAMES = 100
-COMPETITOR_LLM_TEMPERATURE = 0.3
+MAX_COMPETITOR_NAMES = int(os.getenv("MAX_COMPETITOR_NAMES", 100))
+COMPETITOR_LLM_TEMPERATURE = float(os.getenv("COMPETITOR_LLM_TEMPERATURE", 0.3))
DEFAULT_COMPETITOR_DISCOVERY_MODEL = "gpt-4o-mini"