BerriAI/litellm · error · ValueError
Could not reach the proxy at {start_url}: {e}. Check that th
Error message
Could not reach the proxy at {start_url}: {e}. Check that the proxy is running and that --base-url points at it. What it means
Raised in the CLI SSO login flow when requests.post() to {base_url}/sso/cli/start raises a RequestException — connection refused, DNS failure, or timeout. This means the proxy is unreachable at the given --base-url (not running, wrong URL, or network blocked); the original exception text is embedded and chained.
Source
Thrown at litellm/proxy/client/cli/commands/auth.py:426
return [
{
"team_id": i.get("team_id") or i.get("id"),
"team_alias": i.get("team_alias"),
}
for i in team_details
if isinstance(i, dict) and (i.get("team_id") or i.get("id"))
]
if isinstance(teams, list):
return [{"team_id": str(t), "team_alias": None} for t in teams]
return []
def _start_cli_sso_flow(base_url: str) -> CliSsoStartData:
start_url: Final = f"{base_url}/sso/cli/start"
try:
response: Final = requests.post(start_url, timeout=10)
except requests.RequestException as e:
raise ValueError(
f"Could not reach the proxy at {start_url}: {e}. "
"Check that the proxy is running and that --base-url points at it."
) from e
if response.status_code in (404, 405):
raise ValueError(
f"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."
)
if response.status_code != 200:
detail: Final = _response_error_detail(response)
raise ValueError(
f"Starting CLI login failed: HTTP {response.status_code} from {start_url}"
+ (f": {detail}" if detail else "")
)
try:View on GitHub (pinned to 77b7c6c40c)
Solutions
- Ensure the proxy is running.
- Fix --base-url so it points at the proxy.
Example fix
curl http://localhost:4000/health/liveliness
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at litellm/proxy/client/cli/commands/auth.py:426 when the library encounters an invalid state.
Common situations: The CLI could not connect to the proxy to start login.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/1ca3a7543422a19d.
Report an issue: GitHub.