{"record":{"id":"5f3b33ec6417f7dc","repo":"BerriAI/litellm","slug":"post-start-url-returned-http-response-status-co","errorCode":null,"errorMessage":"POST {start_url} returned HTTP {response.status_code}. Either --base-url is wrong, or the proxy is older than this CLI and does not support the CLI SSO login flow; upgrade the proxy or use a CLI version that matches it.","messagePattern":"POST (.+?) returned HTTP (.+?)\\. Either --base-url is wrong, or the proxy is older than this CLI and does not support the CLI SSO login flow; upgrade the proxy or use a CLI version that matches it\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/client/cli/commands/auth.py","lineNumber":432,"sourceCode":"            if isinstance(i, dict) and (i.get(\"team_id\") or i.get(\"id\"))\n        ]\n    if isinstance(teams, list):\n        return [{\"team_id\": str(t), \"team_alias\": None} for t in teams]\n    return []\n\n\ndef _start_cli_sso_flow(base_url: str) -> CliSsoStartData:\n    start_url: Final = f\"{base_url}/sso/cli/start\"\n    try:\n        response: Final = requests.post(start_url, timeout=10)\n    except requests.RequestException as e:\n        raise ValueError(\n            f\"Could not reach the proxy at {start_url}: {e}. \"\n            \"Check that the proxy is running and that --base-url points at it.\"\n        ) from e\n\n    if response.status_code in (404, 405):\n        raise ValueError(\n            f\"POST {start_url} returned HTTP {response.status_code}. \"\n            \"Either --base-url is wrong, or the proxy is older than this CLI and does not support \"\n            \"the CLI SSO login flow; upgrade the proxy or use a CLI version that matches it.\"\n        )\n    if response.status_code != 200:\n        detail: Final = _response_error_detail(response)\n        raise ValueError(\n            f\"Starting CLI login failed: HTTP {response.status_code} from {start_url}\"\n            + (f\": {detail}\" if detail else \"\")\n        )\n\n    try:\n        data: Final[CliSsoStartData] = response.json()\n    except ValueError:\n        content_type: Final = response.headers.get(\"content-type\", \"unknown\")\n        raise ValueError(\n            f\"The proxy returned a non-JSON response from {start_url} (content-type: {content_type}). \"\n            \"A proxy, load balancer, or auth gateway in front of LiteLLM may be intercepting the request. \"","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/client/cli/commands/auth.py#L414-L450","documentation":"POST /sso/cli/start returned 404 or 405, which the CLI interprets as either a wrong --base-url or a proxy too old to implement the CLI SSO endpoints; the user is told to upgrade whichever side is older.","triggerScenarios":"Thrown at litellm/proxy/client/cli/commands/auth.py:432 when the library encounters an invalid state.","commonSituations":"The login start endpoint returned an error status (wrong URL or proxy too old).","solutions":["Verify --base-url is correct.","Upgrade the proxy to a version supporting the CLI SSO login flow, or use a matching CLI version."],"exampleFix":"pip install -U 'litellm[proxy]' and retry.","handlingStrategy":"validation","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"}