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 raises NotImplementedError unconditionally: GCS Bucket logging has no health-check implementation. The method exists to satisfy the integration interface but always throws, so any generic loop that health-checks all configured callbacks will treat GCS as failing.

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 6c2dcb801b)

Solutions

  1. Skip GCS Bucket when iterating callback health checks (filter by type or catch NotImplementedError).
  2. If you need a real health check for GCS, do a lightweight bucket stat/existence call with the same credentials yourself.
  3. Do not treat this NotImplementedError as an outage — it is a capability gap, not a failure.

Example fix

# before
for cb in callbacks:
    await cb.async_health_check()

# after
for cb in callbacks:
    try:
        await cb.async_health_check()
    except NotImplementedError:
        continue  # integration does not support health checks
Defensive patterns

Strategy: try-catch

Validate before calling

async def health_check_safe(cb) -> str | None:
    try:
        return await cb.async_health_check()
    except NotImplementedError:
        return None  # capability not supported, not a failure

Type guard

def supports_health_check(cb) -> bool:
    return type(cb).async_health_check is not GCSBucketLogger.async_health_check

Try / catch

try:
    status = await logger.async_health_check()
except NotImplementedError:
    status = "unsupported"  # exclude from health aggregation

Prevention

When it happens

Trigger: Awaiting async_health_check() on a GCSBucketLogger instance — e.g. a /health or /logs health endpoint that iterates callbacks and calls their health check.

Common situations: Ops dashboards probing all integrations; code upgraded to a version where health checks became part of the callback interface.

Related errors


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