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 allow setting LiteLLM license as .env

Ishaan Jaffa120135dd1cc
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py
index 5c4fa6ef330..0a9abc09adc 100644
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@ -1498,6 +1498,11 @@ class ProxyConfig:
litellm.get_secret(secret_name=key, default_value=value)
)
+ # check if litellm_license in general_settings
+ if "LITELLM_LICENSE" in environment_variables:
+ _license_check.license_str = os.getenv("LITELLM_LICENSE", None)
+ premium_user = _license_check.is_premium()
+
## LITELLM MODULE SETTINGS (e.g. litellm.drop_params=True,..)
litellm_settings = config.get("litellm_settings", None)
if litellm_settings is None: