BerriAI/litellm · error · HTTPException

Too many CLI login attempts. Try again later.

Error message

Too many CLI login attempts. Try again later.

What it means

Error "Too many CLI login attempts. Try again later." thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/ui_sso.py:384

    client_ip_hash: Final = _hash_cli_sso_secret(client_ip)
    return f"{_CLI_SSO_START_RATE_LIMIT_CACHE_KEY_PREFIX}:{client_ip_hash}"


def _check_cli_sso_start_rate_limit(
    request: Request,
    cache: DualCache,
    use_x_forwarded_for: bool | None = False,
) -> None:
    rate_limit_cache_key: Final = _get_cli_sso_start_rate_limit_cache_key(
        request=request, use_x_forwarded_for=use_x_forwarded_for
    )
    current_attempts: Final = cache.increment_cache(
        key=rate_limit_cache_key,
        value=1,
        ttl=_CLI_SSO_START_RATE_LIMIT_WINDOW_SECONDS,
    )
    if current_attempts > _CLI_SSO_START_RATE_LIMIT_MAX_ATTEMPTS:
        raise HTTPException(
            status_code=429,
            detail="Too many CLI login attempts. Try again later.",
        )


def _get_cli_sso_flow_or_raise(login_id: str | None, cache: DualCache) -> dict:
    if isinstance(login_id, str) and login_id.startswith("sk-"):
        raise HTTPException(
            status_code=400,
            detail=(
                "Your litellm CLI is out of date and uses a login flow this proxy no longer supports. "
                "Upgrade it with `pip install -U 'litellm[proxy]'` and run `litellm-proxy login` again."
            ),
        )
    if not _is_valid_cli_sso_login_id(login_id):
        raise HTTPException(status_code=400, detail="Invalid CLI login session id")

    cache_key: Final = _get_cli_sso_flow_cache_key(cast(str, login_id))

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Wait for the rate-limit window to pass, then run `litellm-proxy login` again.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/ui_sso.py:384 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/5d58c5a9c1215749. Report an issue: GitHub.