{"record":{"id":"7b3daf50191d672f","repo":"BerriAI/litellm","slug":"prompt-prompt-id-version-str-not-found-in-pro","errorCode":null,"errorMessage":"Prompt '{prompt_id}'{version_str} not found in prompt directory","messagePattern":"Prompt '(.+?)'(.+?) not found in prompt directory","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/dotprompt/dotprompt_manager.py","lineNumber":131,"sourceCode":"        \"\"\"\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\n            # Extract model from metadata (if specified)\n            template_model: Final = template.model\n\n            # Extract optional parameters from metadata\n            optional_params: Final = self._extract_optional_params(template)\n\n            return PromptManagementClient(","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/dotprompt/dotprompt_manager.py#L113-L149","documentation":"Error \"Prompt '{prompt_id}'{version_str} not found in prompt directory\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/integrations/dotprompt/dotprompt_manager.py:131 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the prompt file for the given prompt_id (and version) to the prompt directory."],"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"}