{"record":{"id":"61b29b3df3df6e32","repo":"BerriAI/litellm","slug":"prompt-id-is-required-for-langfuse-prompt-manageme","errorCode":null,"errorMessage":"prompt_id is required for Langfuse prompt management","messagePattern":"prompt_id is required for Langfuse prompt management","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/langfuse/langfuse_prompt_management.py","lineNumber":243,"sourceCode":"            allow_env_credentials=dynamic_callback_params.get(\"langfuse_host\") is None,\n        )\n        langfuse_prompt_client: Final = self._get_prompt_from_id(\n            langfuse_prompt_id=prompt_id,\n            langfuse_client=langfuse_client,\n        )\n        return langfuse_prompt_client is not None\n\n    def _compile_prompt_helper(\n        self,\n        prompt_id: str | None,\n        prompt_spec: PromptSpec | None,\n        prompt_variables: dict | None,\n        dynamic_callback_params: StandardCallbackDynamicParams,\n        prompt_label: str | None = None,\n        prompt_version: int | None = None,\n    ) -> PromptManagementClient:\n        if prompt_id is None:\n            raise ValueError(\"prompt_id is required for Langfuse prompt management\")\n\n        langfuse_client: Final = langfuse_client_init(\n            langfuse_public_key=dynamic_callback_params.get(\"langfuse_public_key\"),\n            langfuse_secret=dynamic_callback_params.get(\"langfuse_secret\"),\n            langfuse_secret_key=dynamic_callback_params.get(\"langfuse_secret_key\"),\n            langfuse_host=dynamic_callback_params.get(\"langfuse_host\"),\n            allow_env_credentials=dynamic_callback_params.get(\"langfuse_host\") is None,\n        )\n        langfuse_prompt_client: Final = self._get_prompt_from_id(\n            langfuse_prompt_id=prompt_id,\n            langfuse_client=langfuse_client,\n            prompt_label=prompt_label,\n            prompt_version=prompt_version,\n        )\n\n        ## SET PROMPT\n        compiled_prompt: Final = self._compile_prompt(\n            langfuse_prompt_client=langfuse_prompt_client,","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/integrations/langfuse/langfuse_prompt_management.py#L225-L261","documentation":"Guard in Langfuse _compile_prompt_helper: prompt_id is None, but Langfuse prompt management resolves prompts by prompt_id, so there is nothing to fetch from the Langfuse server.","triggerScenarios":"Calling Langfuse prompt management without supplying prompt_id.","commonSituations":"prompt_id omitted from the completion request.","solutions":["Pass prompt_id in the request when using Langfuse prompt management."],"exampleFix":"litellm.completion(model='gpt-4', prompt_id='my_langfuse_prompt', messages=msgs)","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-23T08:17:48.524Z"}