{"record":{"id":"b771b1e3cc981325","repo":"BerriAI/litellm","slug":"prompt-prompt-id-version-str-not-found-avail","errorCode":null,"errorMessage":"Prompt '{prompt_id}'{version_str} not found. Available prompts: {available_prompts}","messagePattern":"Prompt '(.+?)'(.+?) not found\\. Available prompts: (.+?)","errorType":"exception","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/dotprompt/prompt_manager.py","lineNumber":210,"sourceCode":"        Args:\n            prompt_id: The ID of the prompt template to render\n            prompt_variables: Variables to substitute in the template\n            version: Optional version number. If provided, looks for {prompt_id}.v{version}\n\n        Returns:\n            The rendered prompt string\n\n        Raises:\n            KeyError: If prompt_id is not found\n            ValueError: If template rendering fails\n        \"\"\"\n        # Get the template (versioned or base)\n        template: Final = self.get_prompt(prompt_id=prompt_id, version=version)\n\n        if template is None:\n            available_prompts: Final = list(self.prompts.keys())\n            version_str: Final = f\" (version {version})\" if version else \"\"\n            raise KeyError(f\"Prompt '{prompt_id}'{version_str} not found. Available prompts: {available_prompts}\")\n\n        variables: Final = prompt_variables or {}\n\n        # Validate input variables against schema if defined\n        if template.input_schema:\n            self._validate_input(variables, template.input_schema)\n\n        try:\n            # Create Jinja2 template and render\n            jinja_template: Final = self.jinja_env.from_string(template.content)\n            rendered: Final = jinja_template.render(**variables)\n            return rendered\n        except Exception as e:\n            raise ValueError(f\"Error rendering template '{prompt_id}': {e}\")\n\n    def _validate_input(self, variables: dict[str, Any], schema: dict[str, Any]) -> None:\n        \"\"\"Basic validation of input variables against schema.\"\"\"\n        for field_name, field_type in schema.items():","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/dotprompt/prompt_manager.py#L192-L228","documentation":"Error \"Prompt '{prompt_id}'{version_str} not found. Available prompts: {available_prompts}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/integrations/dotprompt/prompt_manager.py:210 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the available prompts listed, or add the missing prompt file."],"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"}