BerriAI/litellm · error · HTTPException

Failed to process CLI SSO: {e}

Error message

Failed to process CLI SSO: {e}

What it means

Error "Failed to process CLI SSO: {e}" thrown in BerriAI/litellm.

Source

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

            key=cast(str, key),
            flow=flow,
            result=result_non_none,
            parsed_openid_result=parsed_openid_result,
            user_defined_values=user_defined_values,
            prisma_client=prisma_client,
            user_api_key_cache=user_api_key_cache,
            cli_sso_session_cache=cli_sso_session_cache,
            proxy_logging_obj=proxy_logging_obj,
            prefill_user_code=prefill_user_code,
            sso_assertion=sso_assertion,
        )
    except ProxyException:
        raise
    except HTTPException:
        raise
    except Exception as e:
        verbose_proxy_logger.error("Error with CLI SSO callback: %s", e)
        raise HTTPException(status_code=500, detail=f"Failed to process CLI SSO: {e}")


@router.get("/sso/cli/poll/{key_id}", tags=["experimental"], include_in_schema=False)
async def cli_poll_key(
    key_id: str,
    team_id: str | None = None,
    x_litellm_cli_poll_secret: str | None = Header(default=None),
):
    """
    CLI polling endpoint - retrieves session from cache and generates JWT.

    Flow:
    1. First poll (no team_id): Returns teams list without generating JWT
    2. Second poll (with team_id): Generates JWT with selected team and deletes session

    Args:
        key_id: The CLI login session ID
        team_id: Optional team ID to assign to the JWT. If provided, must be one of user's teams.

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Check the embedded error and proxy logs, then restart the CLI SSO login flow.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/ui_sso.py:2404 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/4a8a6db0f90f4474. Report an issue: GitHub.