BerriAI/litellm · error · ValueError
GCS Bucket logging is a premium feature. Please upgrade to u
Error message
GCS Bucket logging is a premium feature. Please upgrade to use it. {CommonProxyErrors.not_premium_user.value} What it means
GCSBucketLogger.__init__ raises ValueError when the LiteLLM proxy premium_user flag is not True. GCS Bucket logging is an enterprise/premium feature; the check runs during construction (after the queue and periodic flush task are already created) using the premium_user imported from proxy_server.
Source
Thrown at litellm/integrations/gcs_bucket/gcs_bucket.py:50
super().__init__(bucket_name=bucket_name)
self.batch_size = int(os.getenv("GCS_BATCH_SIZE", GCS_DEFAULT_BATCH_SIZE))
self.flush_interval = int(os.getenv("GCS_FLUSH_INTERVAL", GCS_DEFAULT_FLUSH_INTERVAL_SECONDS))
self.use_batched_logging = (
os.getenv("GCS_USE_BATCHED_LOGGING", str(GCS_DEFAULT_USE_BATCHED_LOGGING).lower()).lower() == "true"
)
self.flush_lock = asyncio.Lock()
super().__init__(
flush_lock=self.flush_lock,
batch_size=self.batch_size,
flush_interval=self.flush_interval,
)
self.log_queue: asyncio.Queue[GCSLogQueueItem] = asyncio.Queue(maxsize=LITELLM_ASYNCIO_QUEUE_MAXSIZE)
asyncio.create_task(self.periodic_flush())
AdditionalLoggingUtils.__init__(self)
if premium_user is not True:
raise ValueError(
f"GCS Bucket logging is a premium feature. Please upgrade to use it. {CommonProxyErrors.not_premium_user.value}"
)
#### ASYNC ####
async def async_log_success_event(self, kwargs, response_obj, start_time, end_time):
from litellm.proxy.proxy_server import premium_user
if premium_user is not True:
raise ValueError(
f"GCS Bucket logging is a premium feature. Please upgrade to use it. {CommonProxyErrors.not_premium_user.value}"
)
try:
verbose_logger.debug(
"GCS Logger: async_log_success_event logging kwargs: %s, response_obj: %s",
kwargs,
response_obj,
)
logging_payload: Final[StandardLoggingPayload | None] = kwargs.get("standard_logging_object", None)View on GitHub (pinned to 6c2dcb801b)
Solutions
- Remove 'gcs_bucket' from callbacks if you do not have an enterprise license.
- Or obtain/load a valid LiteLLM enterprise license (premium_user becomes True) before enabling GCS logging.
- If you believe you have a license, verify it is loaded by the proxy instance throwing the error.
Example fix
# before (config.yaml) litellm_settings: callbacks: [gcs_bucket] # after (community edition) litellm_settings: callbacks: [] # or a non-premium logger
Defensive patterns
Strategy: validation
Validate before calling
# before enabling the callback
from litellm.proxy.proxy_server import premium_user
if premium_user is not True and "gcs_bucket" in litellm_settings.callbacks:
raise ValueError("gcs_bucket requires an enterprise license; remove it or add a valid license") Prevention
- Keep enterprise-only callbacks out of community-edition configs; separate config templates per edition.
- Verify the license loads at proxy startup, not at first request.
- Run a config lint step in CI that flags premium callbacks when no license is present.
When it happens
Trigger: Adding 'gcs_bucket' to litellm_settings.callbacks (or instantiating GCSBucketLogger directly) on a proxy instance whose premium_user is False/None — i.e. no valid enterprise license loaded.
Common situations: Community edition deployment with a config that includes gcs_bucket; license expired or LICENCE_KEY unset after an upgrade; copying an enterprise config.yaml to a test instance without the license.
Related errors
- Trying to Customize Email Alerting {CommonProxyErrors.not_p
- Setting tag-based guardrails is only available in litellm-en
- GCS_BUCKET_NAME is not set in the environment, but GCS Bucke
- Both project_id and topic_id must be provided
- Cloud storage bucket name is required
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/e45f69683ebbdf4e.
Report an issue: GitHub.