BerriAI/litellm · error · HTTPException

Team metadata validation is currently unavailable, so the te

Error message

Team metadata validation is currently unavailable, so the team was not saved. Contact your proxy admin.

What it means

HTTPException raised when the enterprise custom team-metadata validator cannot be run — it timed out (asyncio.wait_for) or raised — so the team write is blocked (fail closed). The team was not saved; the admin must fix validator availability/timeout before retrying.

Source

Thrown at litellm/proxy/management_helpers/team_metadata_validation.py:132

            detail={  # mutable-ok: HTTPException.detail has no immutable form
                "error": f"custom_team_metadata_validate is an Enterprise feature. {CommonProxyErrors.not_premium_user.value}"
            },
        )
    if not (
        inspect.iscoroutinefunction(validator) or inspect.iscoroutinefunction(getattr(validator, "__call__", None))
    ):
        raise HTTPException(
            status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
            detail={  # mutable-ok: HTTPException.detail has no immutable form
                "error": "custom_team_metadata_validate must be an async function"
            },
        )

    try:
        raw_result: Final = await asyncio.wait_for(validator(payload), timeout=timeout_seconds)
        result: Final = TeamMetadataValidationResult.model_validate(raw_result)
    except Exception:  # noqa: BLE001  # fail closed: any validator failure must block the team write
        raise HTTPException(
            status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
            detail={"error": unavailable_message},  # mutable-ok: HTTPException.detail has no immutable form
        )

    if not result.valid:
        raise HTTPException(
            status_code=status.HTTP_400_BAD_REQUEST,
            detail={  # mutable-ok: HTTPException.detail has no immutable form
                "error": result.error_message or DEFAULT_TEAM_METADATA_VALIDATION_REJECTED_MESSAGE
            },
        )


def _read_timeout_seconds(general_settings: Mapping[str, object]) -> float:
    raw_timeout: Final = general_settings.get("team_metadata_validation_timeout")
    if isinstance(raw_timeout, (int, float)) and not isinstance(raw_timeout, bool) and raw_timeout > 0:
        return float(raw_timeout)
    return DEFAULT_TEAM_METADATA_VALIDATION_TIMEOUT_SECONDS

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Contact the proxy admin; check proxy logs for the team metadata validation failure and retry after it is fixed.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at litellm/proxy/management_helpers/team_metadata_validation.py:132 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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