{"record":{"id":"4a8a6db0f90f4474","repo":"BerriAI/litellm","slug":"failed-to-process-cli-sso-e","errorCode":null,"errorMessage":"Failed to process CLI SSO: {e}","messagePattern":"Failed to process CLI SSO: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/management_endpoints/ui_sso.py","lineNumber":2404,"sourceCode":"            key=cast(str, key),\n            flow=flow,\n            result=result_non_none,\n            parsed_openid_result=parsed_openid_result,\n            user_defined_values=user_defined_values,\n            prisma_client=prisma_client,\n            user_api_key_cache=user_api_key_cache,\n            cli_sso_session_cache=cli_sso_session_cache,\n            proxy_logging_obj=proxy_logging_obj,\n            prefill_user_code=prefill_user_code,\n            sso_assertion=sso_assertion,\n        )\n    except ProxyException:\n        raise\n    except HTTPException:\n        raise\n    except Exception as e:\n        verbose_proxy_logger.error(\"Error with CLI SSO callback: %s\", e)\n        raise HTTPException(status_code=500, detail=f\"Failed to process CLI SSO: {e}\")\n\n\n@router.get(\"/sso/cli/poll/{key_id}\", tags=[\"experimental\"], include_in_schema=False)\nasync def cli_poll_key(\n    key_id: str,\n    team_id: str | None = None,\n    x_litellm_cli_poll_secret: str | None = Header(default=None),\n):\n    \"\"\"\n    CLI polling endpoint - retrieves session from cache and generates JWT.\n\n    Flow:\n    1. First poll (no team_id): Returns teams list without generating JWT\n    2. Second poll (with team_id): Generates JWT with selected team and deletes session\n\n    Args:\n        key_id: The CLI login session ID\n        team_id: Optional team ID to assign to the JWT. If provided, must be one of user's teams.","sourceCodeStart":2386,"sourceCodeEnd":2422,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/ui_sso.py#L2386-L2422","documentation":"Error \"Failed to process CLI SSO: {e}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/ui_sso.py:2404 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the embedded error and proxy logs, then restart the CLI SSO login flow."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}