BerriAI/litellm · error · HTTPException

Invalid status value. Currently only 'deleted' is supported.

Error message

Invalid status value. Currently only 'deleted' is supported.

What it means

Error "Invalid status value. Currently only 'deleted' is supported." thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:5500

            "current_page": int,
            "total_pages": int,
        }

    When expand includes "user", each key object will include a "user" field with the associated user object.
    Note: When expand=user is specified, full key objects are returned regardless of the return_full_object parameter.
    """
    try:
        from litellm.proxy.proxy_server import prisma_client

        verbose_proxy_logger.debug("Entering list_keys function")

        if prisma_client is None:
            verbose_proxy_logger.error("Database not connected")
            raise Exception("Database not connected")

        # Validate status parameter
        if status is not None and status != "deleted":
            raise HTTPException(
                status_code=400,
                detail={"error": "Invalid status value. Currently only 'deleted' is supported."},
            )

        if isinstance(expires, str) and expires not in VALID_EXPIRES_FILTER_VALUES:
            raise HTTPException(
                status_code=400,
                detail={"error": "Invalid expires value. Supported: 'active', 'expired'."},
            )

        complete_user_info: Final = await validate_key_list_check(
            user_api_key_dict=user_api_key_dict,
            user_id=user_id,
            team_id=team_id,
            organization_id=organization_id,
            key_alias=key_alias,
            key_hash=key_hash,
            prisma_client=prisma_client,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Use status='deleted' or omit the status filter.
  2. Check the endpoint documentation for supported status values.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:5500 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/cb7e9aa53069324d. Report an issue: GitHub.