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(proxy_server.py): Fix https://github.com/BerriAI/litellm/issues/9576

Krrish Dholakiab155f4f4a6c1
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py
index 87f34a8984b..832ba00b3e8 100644
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@ -511,7 +511,7 @@ async def proxy_startup_event(app: FastAPI):
### LOAD MASTER KEY ###
# check if master key set in environment - load from there
- master_key = get_secret("LITELLM_MASTER_KEY", None) # type: ignore
+ # master_key = get_secret("LITELLM_MASTER_KEY", None) # type: ignore
# check if DATABASE_URL in environment - load from there
if prisma_client is None:
_db_url: Optional[str] = get_secret("DATABASE_URL", None) # type: ignore
@@ -1974,6 +1974,7 @@ class ProxyConfig:
if master_key and master_key.startswith("os.environ/"):
master_key = get_secret(master_key) # type: ignore
+
if not isinstance(master_key, str):
raise Exception(
"Master key must be a string. Current type - {}".format(