BerriAI/litellm · error · ValueError
The response from {start_url} is missing required field(s):
Error message
The response from {start_url} is missing required field(s): {', '.join(missing_fields)}. The proxy version may not match this CLI; upgrade whichever is older. What it means
Raised in the CLI SSO flow after a 2xx response when the parsed JSON object is missing one or more required fields of CliSsoStartData (e.g. the login/verification URLs). The missing field names are listed and the message suggests a version mismatch: the CLI is talking to an older/newer proxy whose /sso/cli/start contract differs; upgrade whichever side is older.
Source
Thrown at litellm/proxy/client/cli/commands/auth.py:457
raise ValueError(
f"Starting CLI login failed: HTTP {response.status_code} from {start_url}"
+ (f": {detail}" if detail else "")
)
try:
data: Final[CliSsoStartData] = response.json()
except ValueError:
content_type: Final = response.headers.get("content-type", "unknown")
raise ValueError(
f"The proxy returned a non-JSON response from {start_url} (content-type: {content_type}). "
"A proxy, load balancer, or auth gateway in front of LiteLLM may be intercepting the request. "
f"Response starts with: {response.text[:200]!r}"
)
required_fields: Final[tuple[str, ...]] = ("login_id", "poll_secret", "user_code")
missing_fields: Final = tuple(field for field in required_fields if not isinstance(data.get(field), str))
if missing_fields:
raise ValueError(
f"The response from {start_url} is missing required field(s): {', '.join(missing_fields)}. "
"The proxy version may not match this CLI; upgrade whichever is older."
)
return data
def _get_cli_sso_poll_headers(poll_secret: str) -> dict[str, str]:
return {"x-litellm-cli-poll-secret": poll_secret}
def _poll_for_authentication(base_url: str, key_id: str, poll_secret: str) -> CliAuthResult | None:
"""
Poll the server for authentication completion and handle team selection.
Returns:
Dictionary with authentication data if successful, None otherwise
"""
poll_url: Final = f"{base_url}/sso/cli/poll/{key_id}"View on GitHub (pinned to 77b7c6c40c)
Solutions
- Upgrade whichever is older: the proxy or the CLI, so their login flows match.
Example fix
pip install -U litellm and upgrade the proxy deployment.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/client/cli/commands/auth.py:457 when the library encounters an invalid state.
Common situations: The proxy's login response lacked fields the CLI expects (version mismatch).
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/37abf7c44a33285e.
Report an issue: GitHub.