fix: use == instead of is for string comparison in master key check

This is backwards incompatible - the proxy will now correctly reject
the default master key "sk-1234" in production, which may break
setups relying on the default key.
This commit is contained in:
Ryan Crabbe 2026-03-25 11:57:43 -07:00
parent e3fb50818c
commit 5e42d4b9d8

View file

@ -3094,7 +3094,7 @@ class ProxyConfig:
)
if master_key is not None and isinstance(master_key, str):
if master_key is "sk-1234":
if master_key == "sk-1234":
raise ValueError(
f"LITELLM_MASTER_KEY is set to the default master-key granting proxy admin access, please change it to something stronger"
)