BerriAI/litellm · error · HTTPException
CLI login is not ready
Error message
CLI login is not ready
What it means
Error "CLI login is not ready" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/ui_sso.py:804
login_id=login_id,
poll_secret=poll_secret,
user_code=user_code,
verification_uri_complete=verification_uri_complete,
)
@router.post("/sso/cli/complete/{login_id}", tags=["experimental"], include_in_schema=False)
async def cli_sso_complete(request: Request, login_id: str):
from fastapi.responses import HTMLResponse
from litellm.proxy.common_utils.html_forms.cli_sso_success import (
render_cli_sso_success_page,
)
from litellm.proxy.proxy_server import cli_sso_session_cache
flow: Final = _get_cli_sso_flow_or_raise(login_id=login_id, cache=cli_sso_session_cache)
if not flow.get("sso_complete") or not flow.get("session_data"):
raise HTTPException(status_code=400, detail="CLI login is not ready")
body: Final = (await request.body()).decode("utf-8")
form_values: Final = parse_qs(body)
supplied_user_code: Final = (form_values.get("user_code") or [""])[0]
supplied_browser_complete_token: Final = (form_values.get("browser_complete_token") or [""])[0]
supplied_user_code_hash: Final = _hash_cli_sso_secret(_normalize_cli_sso_user_code(supplied_user_code))
supplied_browser_complete_token_hash: Final = _hash_cli_sso_secret(supplied_browser_complete_token)
expected_user_code_hash: Final = flow.get("user_code_hash")
if not isinstance(expected_user_code_hash, str) or not secrets.compare_digest(
supplied_user_code_hash, expected_user_code_hash
):
raise HTTPException(status_code=400, detail="Invalid verification code")
expected_browser_complete_token_hash: Final = flow.get("browser_complete_token_hash")
if not isinstance(expected_browser_complete_token_hash, str) or not secrets.compare_digest(
supplied_browser_complete_token_hash, expected_browser_complete_token_hash
):View on GitHub (pinned to 77b7c6c40c)
Solutions
- The CLI login is still pending; complete the browser sign-in, then poll again.
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/ui_sso.py:804 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/93ddf31e31903c94.
Report an issue: GitHub.