{"record":{"id":"fc8b2d317a627fec","repo":"BerriAI/litellm","slug":"prompt-id-is-required-for-dotprompt-manager","errorCode":null,"errorMessage":"prompt_id is required for dotprompt manager","messagePattern":"prompt_id is required for dotprompt manager","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/dotprompt/dotprompt_manager.py","lineNumber":124,"sourceCode":"        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        \"\"\"\n        Compile a .prompt file into a PromptManagementClient structure.\n\n        This method:\n        1. Loads the prompt template from the .prompt file (with optional version)\n        2. Renders it with the provided variables\n        3. Converts the rendered text into chat messages\n        4. Extracts model and optional parameters from metadata\n        \"\"\"\n\n        if prompt_id is None:\n            raise ValueError(\"prompt_id is required for dotprompt manager\")\n\n        try:\n            # Get the prompt template (versioned or base)\n            template: Final = self.prompt_manager.get_prompt(prompt_id=prompt_id, version=prompt_version)\n            if template is None:\n                version_str: Final = f\" (version {prompt_version})\" if prompt_version else \"\"\n                raise ValueError(f\"Prompt '{prompt_id}'{version_str} not found in prompt directory\")\n\n            # Render the template with variables (pass version for proper lookup)\n            rendered_content: Final = self.prompt_manager.render(\n                prompt_id=prompt_id,\n                prompt_variables=prompt_variables,\n                version=prompt_version,\n            )\n\n            # Convert rendered content to chat messages\n            messages: Final = self._convert_to_messages(rendered_content)\n","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/dotprompt/dotprompt_manager.py#L106-L142","documentation":"Error \"prompt_id is required for dotprompt manager\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/integrations/dotprompt/dotprompt_manager.py:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass prompt_id when calling the dotprompt manager."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}