BerriAI/litellm · error · ValueError
Worker URL must start with http:// or https://
Error message
Worker URL must start with http:// or https://
What it means
Pydantic URL validator on WorkerRegistryEntry.url: the worker URL does not start with http:// or https://, so it cannot be used as an HTTP control-plane target. Commonly caused by omitting the scheme (e.g. 'worker:4000').
Source
Thrown at litellm/types/proxy/control_plane_endpoints.py:13
from pydantic import BaseModel, field_validator
class WorkerRegistryEntry(BaseModel):
worker_id: str
name: str
url: str
@field_validator("url")
@classmethod
def url_must_be_http(cls, v: str) -> str:
if not v.startswith(("http://", "https://")):
raise ValueError("Worker URL must start with http:// or https://")
return v
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Prefix the worker URL with http:// or https://, e.g. https://worker.example.com.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/types/proxy/control_plane_endpoints.py:13 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/5a04ab5346e04d91.
Report an issue: GitHub.