BerriAI/litellm · error · ValueError

The proxy rejected the login session with HTTP {response.sta

Error message

The proxy rejected the login session with HTTP {response.status_code}

What it means

The CLI SSO poll loop received a non-200 from the polling endpoint, meaning the login session was rejected server-side (expired, revoked, or mismatched). Surfaced as ValueError to abort the login flow.

Source

Thrown at litellm/proxy/client/cli/commands/auth.py:384

    for attempt in range(total_timeout // poll_interval):
        try:
            request_kwargs: CliPollRequestKwargs = {"timeout": request_timeout}
            if headers is not None:
                request_kwargs["headers"] = headers
            response = requests.get(url, **request_kwargs)
            if response.status_code == 200:
                data: CliPollData = response.json()
                status = data.get("status")
                if status == "ready":
                    return data
                if status == "pending":
                    if pending_message and pending_log_every > 0 and attempt % pending_log_every == 0:
                        click.echo(pending_message)
                elif other_status_message and other_status_log_every > 0 and attempt % other_status_log_every == 0:
                    click.echo(other_status_message)
            elif _is_permanent_polling_error(response.status_code):
                detail = _response_error_detail(response)
                raise ValueError(
                    f"The proxy rejected the login session with HTTP {response.status_code}"
                    + (f": {detail}" if detail else f" and no error detail (from {url})")
                )
            elif http_error_log_every > 0 and attempt % http_error_log_every == 0:
                click.echo(_polling_error_message(response))
        except requests.RequestException as e:
            if connection_error_log_every > 0 and attempt % connection_error_log_every == 0:
                click.echo(f"Connection error (will retry): {e}")
        time.sleep(poll_interval)
    return None


def _normalize_teams(teams: object, team_details: object) -> list[CliTeam]:
    """If team_details are a

    Args:
        teams (_type_): _description_
        team_details (_type_): _description_

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Retry `lite login`; the session may have expired.
  2. Check the proxy logs for why the login session was rejected.

Example fix

lite login --base-url http://localhost:4000
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at litellm/proxy/client/cli/commands/auth.py:384 when the library encounters an invalid state.

Common situations: The proxy rejected the CLI login session (expired or invalid session).


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