BerriAI/litellm · error · HTTPException

No keys found

Error message

No keys found

What it means

Error "No keys found" thrown in BerriAI/litellm.

Source

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

            Optional[Dict]:
                - Number of deleted tokens
            List[LiteLLM_VerificationToken]:
                - List of keys being deleted, this contains information about the key_alias, token, and user_id being deleted,
                this is passed down to the KeyManagementEventHooks to delete the keys from the secret manager and handle audit logs
    """
    from litellm.proxy.proxy_server import prisma_client

    failed_tokens: list = []
    try:
        if prisma_client:
            hashed_tokens: Final[list[str]] = [_hash_token_if_needed(token=key) for key in tokens]
            tokens = hashed_tokens
            _keys_being_deleted: Final[list[LiteLLM_VerificationToken]] = await _prisma_table(
                VerificationTokenRepository(prisma_client)
            ).find_many(where={"token": {"in": hashed_tokens}})

            if len(_keys_being_deleted) == 0:
                raise HTTPException(
                    status_code=status.HTTP_404_NOT_FOUND,
                    detail={"error": "No keys found"},
                )

            if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value:
                authorized_keys = _keys_being_deleted
            else:
                authorized_keys = []
                for key in _keys_being_deleted:
                    if await can_modify_verification_token(
                        key_info=key,
                        user_api_key_cache=user_api_key_cache,
                        user_api_key_dict=user_api_key_dict,
                        prisma_client=prisma_client,
                    ):
                        authorized_keys.append(key)
                    else:
                        raise HTTPException(

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Broaden the filter criteria; verify keys exist via /key/list without filters.
  2. Confirm you are querying the correct database/environment.

When it happens

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