{"record":{"id":"719a336115f4df96","repo":"BerriAI/litellm","slug":"invalid-langfuse-host-e","errorCode":null,"errorMessage":"Invalid Langfuse host: {e}","messagePattern":"Invalid Langfuse host: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py","lineNumber":62,"sourceCode":"\ndef _decode_to_convergence(value: str) -> str:\n    previous = value\n    while True:\n        decoded = unquote(previous)\n        if decoded == previous:\n            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","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py#L44-L80","documentation":"URL parse failure in _normalize_langfuse_base_url: httpx.URL rejected the configured Langfuse host (after auto-prefixing http:// for host-only values), and the parser's exception '{e}' is included. The value is structurally invalid as a URL — stray characters, bad brackets, or malformed IPv6, for example.","triggerScenarios":"Thrown at litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a valid http(s) Langfuse host URL without credentials or invalid characters."],"exampleFix":null,"handlingStrategy":"try-catch","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-14T00:17:10.932Z"}