{"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/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/gcs_bucket/gcs_bucket.py#L32-L68","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before (config.yaml)\nlitellm_settings:\n  callbacks: [gcs_bucket]\n\n# after (community edition)\nlitellm_settings:\n  callbacks: []  # or a non-premium logger","handlingStrategy":"validation","validationCode":"# before enabling the callback\nfrom litellm.proxy.proxy_server import premium_user\nif premium_user is not True and \"gcs_bucket\" in litellm_settings.callbacks:\n    raise ValueError(\"gcs_bucket requires an enterprise license; remove it or add a valid license\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["licensing","premium","gcs","config","litellm-proxy"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}