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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
added variable for invitation link
shivamf4f834489c43
diff --git a/litellm/__init__.py b/litellm/__init__.pyindex f949046e4d3..7277f4e7d5e 100644--- a/litellm/__init__.py+++ b/litellm/__init__.py@@ -16,7 +16,8 @@ import os# Load .env before any other litellm imports so env vars (e.g. LITELLM_UI_SESSION_DURATION) are availableimport dotenv as _dotenv-_dotenv.load_dotenv()+if os.getenv("LITELLM_MODE", "DEV") == "DEV":+ _dotenv.load_dotenv()from typing import (Callable,diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.pyindex 607306f3806..2ed40213fb7 100644--- a/litellm/proxy/proxy_server.py+++ b/litellm/proxy/proxy_server.py@@ -50,6 +50,7 @@ from litellm.constants import (LITELLM_EMBEDDING_PROVIDERS_SUPPORTING_INPUT_ARRAY_OF_TOKENS,LITELLM_SETTINGS_SAFE_DB_OVERRIDES,LITELLM_UI_ALLOW_HEADERS,+ LITELLM_UI_SESSION_DURATION,)from litellm.litellm_core_utils.litellm_logging import (_init_custom_logger_compatible_class,@@ -10767,7 +10768,7 @@ async def onboarding(invite_link: str, request: Request):request_type="key",**{"user_role": user_obj.user_role,- "duration": "24hr",+ "duration": LITELLM_UI_SESSION_DURATION,"key_max_budget": litellm.max_ui_session_budget,"models": [],"aliases": {},