{"record":{"id":"889ce6a562ad4494","repo":"BerriAI/litellm","slug":"invalid-langfuse-host","errorCode":null,"errorMessage":"Invalid Langfuse host","messagePattern":"Invalid Langfuse host","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py","lineNumber":68,"sourceCode":"            return decoded\n        previous = decoded\n\n\ndef _normalize_langfuse_base_url(base_target_url: str) -> str:\n    if not (base_target_url.startswith(\"http://\") or base_target_url.startswith(\"https://\")):\n        # Existing behavior allows host-only Langfuse settings.\n        base_target_url = \"http://\" + base_target_url\n\n    try:\n        base_url: Final = httpx.URL(base_target_url)\n    except Exception as e:\n        raise HTTPException(\n            status_code=status.HTTP_400_BAD_REQUEST,\n            detail={\"error\": f\"Invalid Langfuse host: {e}\"},\n        )\n\n    if base_url.scheme not in (\"http\", \"https\") or not base_url.host:\n        raise HTTPException(\n            status_code=status.HTTP_400_BAD_REQUEST,\n            detail={\"error\": \"Invalid Langfuse host\"},\n        )\n\n    if base_url.userinfo:\n        raise HTTPException(\n            status_code=status.HTTP_400_BAD_REQUEST,\n            detail={\"error\": \"Langfuse host must not include credentials\"},\n        )\n\n    return str(base_url)\n\n\ndef _validate_langfuse_proxy_path(endpoint: str) -> str:\n    decoded_endpoint: Final = _decode_to_convergence(endpoint)\n    if any(ord(char) < 32 for char in decoded_endpoint):\n        raise HTTPException(\n            status_code=status.HTTP_400_BAD_REQUEST,","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py#L50-L86","documentation":"Post-parse scheme/host validation of the Langfuse base URL: the string parsed as a URL but its scheme is not http/https or it has no host component (e.g. 'https://' alone). Distinguishes structurally-bad hosts from URLs that parse yet remain unusable as a proxy target.","triggerScenarios":"Thrown at litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a well-formed Langfuse host URL (scheme + host)."],"exampleFix":null,"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-14T05:17:10.506Z"}