BerriAI/litellm · error · HTTPException
Langfuse host must not include credentials
Error message
Langfuse host must not include credentials
What it means
Credential-in-URL guard: the Langfuse host URL carries userinfo (user:password before the @), which would be forwarded or logged and is never legitimate for a Langfuse endpoint. The proxy refuses the configuration to avoid leaking embedded credentials.
Source
Thrown at litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py:74
# Existing behavior allows host-only Langfuse settings.
base_target_url = "http://" + base_target_url
try:
base_url: Final = httpx.URL(base_target_url)
except Exception as e:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail={"error": f"Invalid Langfuse host: {e}"},
)
if base_url.scheme not in ("http", "https") or not base_url.host:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail={"error": "Invalid Langfuse host"},
)
if base_url.userinfo:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail={"error": "Langfuse host must not include credentials"},
)
return str(base_url)
def _validate_langfuse_proxy_path(endpoint: str) -> str:
decoded_endpoint: Final = _decode_to_convergence(endpoint)
if any(ord(char) < 32 for char in decoded_endpoint):
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail={"error": "Invalid Langfuse endpoint path"},
)
if "\\" in decoded_endpoint or decoded_endpoint.startswith("//"):
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail={"error": "Invalid Langfuse endpoint path"},View on GitHub (pinned to 77b7c6c40c)
Solutions
- Remove any user:password credentials from the Langfuse host URL; pass credentials separately.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py:74 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/da901c2c60354d44.
Report an issue: GitHub.