BerriAI/litellm · warning · NotImplementedError

GCS Bucket does not support health check

Error message

GCS Bucket does not support health check

What it means

GCSBucketLogger.async_health_check unconditionally raises NotImplementedError — GCS bucket logging intentionally does not implement the integration health-check interface. Any generic health-check loop that iterates all registered callbacks and calls async_health_check will hit this for the GCS logger.

Solutions

  1. Skip integrations whose async_health_check raises NotImplementedError (or check the method's behavior for this class explicitly).
  2. Exclude gcs_bucket from the health-check iteration list.
  3. Treat this as 'health check not supported', not as an outage — the logger itself may be healthy.
  4. If you need real GCS health, verify bucket access directly (e.g. a HEAD request on the bucket) instead.

Example fix

# before
for cb in callbacks:
    status = await cb.async_health_check()  # GCS raises

# after
for cb in callbacks:
    try:
        status = await cb.async_health_check()
    except NotImplementedError:
        continue  # health check not supported for this integration
Defensive patterns

Strategy: try-catch

Validate before calling

results = {}
for name, cb in callbacks.items():
    hc = getattr(cb, 'async_health_check', None)
    if hc is None:
        continue
    try:
        results[name] = await hc()
    except NotImplementedError:
        results[name] = 'not_supported'

Type guard

def supports_health_check(cb) -> bool:
    return getattr(cb, 'async_health_check', None) is not None and cb.__class__.__name__ != 'GCSBucketLogger'

Try / catch

try:
    status = await cb.async_health_check()
except NotImplementedError:
    status = 'health check not supported'  # not an outage

Prevention

When it happens

Trigger: A health-check aggregator calling async_health_check() on every registered integration; ops dashboards probing callback health; code that assumes all logging integrations implement the health-check protocol.

Common situations: Adding a 'are my callbacks alive' endpoint that walks all callbacks; upgrading litellm where new integrations get auto-registered into the health-check sweep.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/3d109bdcba03d839. Report an issue: GitHub.

Appendix: source

Thrown at litellm/integrations/gcs_bucket/gcs_bucket.py:375

    async def flush_queue(self):
        """
        Override flush_queue to work with asyncio.Queue.
        """
        await self.async_send_batch()
        self.last_flush_time = time.time()

    async def periodic_flush(self):
        """
        Override periodic_flush to work with asyncio.Queue.
        """
        while True:
            await asyncio.sleep(self.flush_interval)
            verbose_logger.debug("GCS Bucket periodic flush after %s seconds", self.flush_interval)
            await self.flush_queue()

    async def async_health_check(self) -> IntegrationHealthCheckStatus:
        raise NotImplementedError("GCS Bucket does not support health check")

View on GitHub (pinned to 77b7c6c40c)