{"record":{"id":"e45f69683ebbdf4e","repo":"BerriAI/litellm","slug":"gcs-bucket-logging-is-a-premium-feature-please-up","errorCode":null,"errorMessage":"GCS Bucket logging is a premium feature. Please upgrade to use it. {CommonProxyErrors.not_premium_user.value}","messagePattern":"GCS Bucket logging is a premium feature\\. Please upgrade to use it\\. (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/gcs_bucket/gcs_bucket.py","lineNumber":50,"sourceCode":"        super().__init__(bucket_name=bucket_name)\n\n        self.batch_size = int(os.getenv(\"GCS_BATCH_SIZE\", GCS_DEFAULT_BATCH_SIZE))\n        self.flush_interval = int(os.getenv(\"GCS_FLUSH_INTERVAL\", GCS_DEFAULT_FLUSH_INTERVAL_SECONDS))\n        self.use_batched_logging = (\n            os.getenv(\"GCS_USE_BATCHED_LOGGING\", str(GCS_DEFAULT_USE_BATCHED_LOGGING).lower()).lower() == \"true\"\n        )\n        self.flush_lock = asyncio.Lock()\n        super().__init__(\n            flush_lock=self.flush_lock,\n            batch_size=self.batch_size,\n            flush_interval=self.flush_interval,\n        )\n        self.log_queue: asyncio.Queue[GCSLogQueueItem] = asyncio.Queue(maxsize=LITELLM_ASYNCIO_QUEUE_MAXSIZE)\n        asyncio.create_task(self.periodic_flush())\n        AdditionalLoggingUtils.__init__(self)\n\n        if premium_user is not True:\n            raise ValueError(\n                f\"GCS Bucket logging is a premium feature. Please upgrade to use it. {CommonProxyErrors.not_premium_user.value}\"\n            )\n\n    #### ASYNC ####\n    async def async_log_success_event(self, kwargs, response_obj, start_time, end_time):\n        from litellm.proxy.proxy_server import premium_user\n\n        if premium_user is not True:\n            raise ValueError(\n                f\"GCS Bucket logging is a premium feature. Please upgrade to use it. {CommonProxyErrors.not_premium_user.value}\"\n            )\n        try:\n            verbose_logger.debug(\n                \"GCS Logger: async_log_success_event logging kwargs: %s, response_obj: %s\",\n                kwargs,\n                response_obj,\n            )\n            logging_payload: Final[StandardLoggingPayload | None] = kwargs.get(\"standard_logging_object\", None)","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/integrations/gcs_bucket/gcs_bucket.py#L32-L68","documentation":"GCSBucketLogger.__init__ raises ValueError when premium_user (imported from litellm.proxy.proxy_server) is not True — GCS bucket logging is gated as a litellm enterprise/premium feature. The check runs at callback construction time, so the proxy fails as soon as the 'gcs_bucket' callback is loaded, not at first log.","triggerScenarios":"Adding 'gcs_bucket' to litellm_settings.callbacks (or GCS_BUCKET_NAME being set such that the callback activates) on a proxy where premium_user is False; running the open-source proxy without an enterprise license key.","commonSituations":"Following GCS logging docs that assume an enterprise deployment; self-hosted users enabling enterprise-only callbacks; forgetting that premium gating applies to GCS logging unlike S3/other handlers.","solutions":["If you have an enterprise license, ensure it is configured so premium_user resolves to True (see litellm enterprise docs for premium_user).","Otherwise remove 'gcs_bucket' from callbacks and use a non-gated destination (e.g. the FOCUS GCS/S3 export integrations, or another logging callback).","Do not try to force premium_user=True without a license — that is a licensing violation and breaks support.","Move GCS upload responsibilities to an external job if enterprise is not an option."],"exampleFix":"# before (config.yaml)\nlitellm_settings:\n  callbacks: [gcs_bucket]  # raises ValueError on OSS proxy\n\n# after\nlitellm_settings:\n  callbacks: [gcs_pubsub]  # or another supported non-premium callback","handlingStrategy":"try-catch","validationCode":"from litellm.proxy.proxy_server import premium_user\nif premium_user is not True and 'gcs_bucket' in config.litellm_settings.callbacks:\n    raise SystemExit('gcs_bucket logging requires a litellm enterprise license; remove it or license the proxy')","typeGuard":null,"tryCatchPattern":"try:\n    GCSBucketLogger()\nexcept ValueError as e:\n    if 'premium feature' in str(e):\n        # remove callback from config instead of retrying; licensing cannot be fixed at runtime\n        disable_callback('gcs_bucket')\n    raise","preventionTips":["Gate enterprise-only callbacks behind a license check in your config pipeline.","Keep a list of premium-gated callbacks (gcs_bucket, gcs_pubsub, ...) and lint your config against it on OSS installs."],"tags":["gcs","premium-feature","licensing","logging-callback"],"backgroundTag":"premium-feature-gate","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}