{"record":{"id":"bcd1d3c66eca7295","repo":"BerriAI/litellm","slug":"dynamic-langfuse-hosts-must-include-dynamic-langfu","errorCode":null,"errorMessage":"Dynamic Langfuse hosts must include dynamic Langfuse credentials","messagePattern":"Dynamic Langfuse hosts must include dynamic Langfuse credentials","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py","lineNumber":112,"sourceCode":"\n    endpoint_path: Final = \"/\" + decoded_endpoint.lstrip(\"/\")\n    if any(segment in (\".\", \"..\") for segment in endpoint_path.split(\"/\")):\n        raise HTTPException(\n            status_code=status.HTTP_400_BAD_REQUEST,\n            detail={\"error\": \"Invalid Langfuse endpoint path\"},\n        )\n    return endpoint_path\n\n\ndef _get_langfuse_proxy_credentials(\n    *,\n    dynamic_host_supplied: bool,\n    dynamic_langfuse_public_key: str | None,\n    dynamic_langfuse_secret_key: str | None,\n):\n    if dynamic_host_supplied:\n        if not dynamic_langfuse_public_key or not dynamic_langfuse_secret_key:\n            raise HTTPException(\n                status_code=status.HTTP_400_BAD_REQUEST,\n                detail={\"error\": \"Dynamic Langfuse hosts must include dynamic Langfuse credentials\"},\n            )\n        return dynamic_langfuse_public_key, dynamic_langfuse_secret_key\n\n    return (\n        dynamic_langfuse_public_key or litellm.utils.get_secret(secret_name=\"LANGFUSE_PUBLIC_KEY\"),\n        dynamic_langfuse_secret_key or litellm.utils.get_secret(secret_name=\"LANGFUSE_SECRET_KEY\"),\n    )\n\n\ndef _build_langfuse_proxy_target(\n    *,\n    endpoint: str,\n    base_target_url: str,\n    dynamic_host_supplied: bool,\n):\n    endpoint_path: Final = _validate_langfuse_proxy_path(endpoint)","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py#L94-L130","documentation":"Consistency guard for dynamic Langfuse routing: the request supplied a dynamic Langfuse host but omitted the dynamic public or secret key. A per-request host points at a tenant-specific Langfuse instance whose credentials cannot be inferred, so both dynamic keys must accompany a dynamic host.","triggerScenarios":"Thrown at litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py:112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the dynamic Langfuse credentials along with the dynamic Langfuse 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"}