{"record":{"id":"16b6b07ab01e988c","repo":"BerriAI/litellm","slug":"reminder-markers-open-and-close-must-be-different","errorCode":null,"errorMessage":"reminder_markers open and close must be different strings","messagePattern":"reminder_markers open and close must be different strings","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/router_strategy/complexity_router/config.py","lineNumber":94,"sourceCode":"class ReminderMarkerPair(BaseModel):\n    \"\"\"One open/close delimiter pair a harness wraps injected context in.\n\n    Normalizing here rather than at the scan is what makes matching case-insensitive: markers reach\n    the scan already lowered, so it lowercases only the haystack and never the needles. Stripping\n    keeps YAML indentation whitespace from becoming part of the delimiter.\n    \"\"\"\n\n    open: str = Field(description=\"Opening delimiter, e.g. '<system-reminder>'\")\n    close: str = Field(description=\"Closing delimiter, e.g. '</system-reminder>'\")\n\n    @model_validator(mode=\"after\")\n    def _normalize(self) -> \"ReminderMarkerPair\":\n        open_marker: Final = self.open.strip().lower()\n        close_marker: Final = self.close.strip().lower()\n        if not open_marker or not close_marker:\n            raise ValueError(\"reminder_markers entries must not be blank\")\n        if open_marker == close_marker:\n            raise ValueError(\"reminder_markers open and close must be different strings\")\n        self.open = open_marker\n        self.close = close_marker\n        return self\n\n\n# ─── Default Keyword Lists ───\n# Note: Keywords should be full words/phrases to avoid substring false positives.\n# The matching logic uses word boundary detection for single-word keywords.\n\nDEFAULT_CODE_KEYWORDS: Final[list[str]] = [\n    \"function\",\n    \"class\",\n    \"def\",\n    \"const\",\n    \"let\",\n    \"var\",\n    \"import\",\n    \"export\",","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/router_strategy/complexity_router/config.py#L76-L112","documentation":"Pydantic validator on ReminderMarkerPair: open and close are the same string after normalization, which would make the injected-context scanner unable to pair delimiters, so the pair is rejected.","triggerScenarios":"Thrown at litellm/router_strategy/complexity_router/config.py:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use distinct strings for the open and close reminder markers."],"exampleFix":null,"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-14T05:17:10.506Z"}