{"record":{"id":"65fe5e106034c1e8","repo":"headroomlabs-ai/headroom","slug":"litellm-package-required-install-with-pip-instal","errorCode":null,"errorMessage":"LiteLLM package required. Install with: pip install litellm","messagePattern":"LiteLLM package required\\. Install with: pip install litellm","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"headroom/evals/html_extraction.py","lineNumber":334,"sourceCode":"                import litellm\n\n                def judge(question: str, ground_truth: str, prediction: str) -> tuple[float, str]:\n                    prompt = HTML_JUDGE_PROMPT.format(\n                        question=question,\n                        ground_truth=ground_truth,\n                        prediction=prediction,\n                    )\n                    response = litellm.completion(\n                        model=self.judge_model,\n                        messages=[{\"role\": \"user\", \"content\": prompt}],\n                        temperature=0.0,\n                        max_tokens=200,\n                    )\n                    return self._parse_judge_response(response.choices[0].message.content or \"\")\n\n                return judge\n            except ImportError:\n                raise ImportError(\n                    \"LiteLLM package required. Install with: pip install litellm\"\n                ) from None\n\n    def _parse_judge_response(self, text: str) -> tuple[float, str]:\n        \"\"\"Parse judge response to extract score and reasoning.\"\"\"\n        import re\n\n        reasoning = \"\"\n        score = 3.0  # Default\n\n        for line in text.strip().split(\"\\n\"):\n            line = line.strip()\n            if line.lower().startswith(\"reasoning:\"):\n                reasoning = line[len(\"reasoning:\") :].strip()\n            elif line.lower().startswith(\"score:\"):\n                match = re.search(r\"(\\d+(?:\\.\\d+)?)\", line)\n                if match:\n                    score = max(1.0, min(5.0, float(match.group(1))))","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/headroomlabs-ai/headroom/blob/322425c43bffde1ed0b64fecf3cf5951565dd82b/headroom/evals/html_extraction.py#L316-L352","documentation":"Error \"LiteLLM package required. Install with: pip install litellm\" thrown in headroomlabs-ai/headroom.","triggerScenarios":"Raised when the HTML extraction eval is configured to route through LiteLLM but the `litellm` package is not installed.","commonSituations":"See trigger scenarios.","solutions":["Install LiteLLM: pip install litellm","Or install the evals extra: pip install headroom-ai[evals]"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"322425c43bffde1ed0b64fecf3cf5951565dd82b","analyzedAt":"2026-08-15T01:03:05.481Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}