BerriAI/litellm · error · ValueError
Google Secret Manager requires an Enterprise License {Common
Error message
Google Secret Manager requires an Enterprise License {CommonProxyErrors.not_premium_user.value} What it means
Constructor licensing gate for GoogleSecretManager: it imports premium_user from the proxy server and, if it is not True, refuses to construct the manager because Google Secret Manager is gated behind an Enterprise License. Not an authentication or Google-side failure.
Source
Thrown at litellm/secret_managers/google_secret_manager.py:28
from litellm.llms.custom_httpx.http_handler import _get_httpx_client
from litellm.proxy._types import CommonProxyErrors, KeyManagementSystem
class GoogleSecretManager(GCSBucketBase):
def __init__(
self,
refresh_interval: int | None = SECRET_MANAGER_REFRESH_INTERVAL,
always_read_secret_manager: bool | None = False,
) -> None:
"""
Args:
refresh_interval (int, optional): The refresh interval in seconds. Defaults to 86400. (24 hours)
always_read_secret_manager (bool, optional): Whether to always read from the secret manager. Defaults to False. Since we do want to cache values
"""
from litellm.proxy.proxy_server import premium_user
if premium_user is not True:
raise ValueError(
f"Google Secret Manager requires an Enterprise License {CommonProxyErrors.not_premium_user.value}"
)
super().__init__()
self.PROJECT_ID = os.environ.get("GOOGLE_SECRET_MANAGER_PROJECT_ID", None)
if self.PROJECT_ID is None:
raise ValueError(
"Google Secret Manager requires a project ID, please set 'GOOGLE_SECRET_MANAGER_PROJECT_ID' in your .env"
)
self.sync_httpx_client = _get_httpx_client()
litellm.secret_manager_client = self
litellm._key_management_system = KeyManagementSystem.GOOGLE_SECRET_MANAGER
_refresh_interval = os.environ.get("GOOGLE_SECRET_MANAGER_REFRESH_INTERVAL", refresh_interval)
_refresh_interval = int(_refresh_interval) if _refresh_interval else refresh_interval
self.cache = InMemoryCache(default_ttl=_refresh_interval) # store in memory for 1 day
_always_read_secret_manager: Final = os.environ.get(
"GOOGLE_SECRET_MANAGER_ALWAYS_READ_SECRET_MANAGER",
)View on GitHub (pinned to 77b7c6c40c)
Solutions
- Set a valid LITELLM_LICENSE (Enterprise) to enable Google Secret Manager.
- Otherwise choose a non-enterprise secret manager backend.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/secret_managers/google_secret_manager.py:28 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/919d7cd7c6b8cad5.
Report an issue: GitHub.