{"record":{"id":"f35d0a654543eaeb","repo":"BerriAI/litellm","slug":"tier-labels-values-must-not-reuse-another-tier-s-c","errorCode":null,"errorMessage":"tier_labels values must not reuse another tier's canonical name, which would make logs and the classifier rubric ambiguous: {', '.join(shadowed)}","messagePattern":"tier_labels values must not reuse another tier's canonical name, which would make logs and the classifier rubric ambiguous: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/router_strategy/complexity_router/config.py","lineNumber":674,"sourceCode":"            raise ValueError(\"keyword_tier_rules must be non-empty when semantic_keyword_matching is enabled\")\n        return self\n\n    @model_validator(mode=\"after\")\n    def _validate_tier_labels(self) -> \"ComplexityRouterConfig\":\n        if not self.tier_labels:\n            return self\n        blank: Final = tuple(sorted(tier.value for tier, label in self.tier_labels.items() if not label.strip()))\n        if blank:\n            raise ValueError(f\"tier_labels values must be non-empty; blank labels for tiers: {', '.join(blank)}\")\n        shadowed: Final = tuple(\n            sorted(\n                f\"{tier.value} -> {label.strip()}\"\n                for tier, label in self.tier_labels.items()\n                if label.strip().upper() in ComplexityTier.__members__ and label.strip().upper() != tier.value\n            )\n        )\n        if shadowed:\n            raise ValueError(\n                \"tier_labels values must not reuse another tier's canonical name, which would make logs \"\n                f\"and the classifier rubric ambiguous: {', '.join(shadowed)}\"\n            )\n        labeled: Final = self.labeled_tiers()\n        folded_labels: Final = tuple(label.casefold() for _, label in labeled)\n        duplicated: Final = tuple(\n            \" and \".join(tier.value for tier, label in labeled if label.casefold() == folded)\n            for position, folded in enumerate(folded_labels)\n            if folded_labels.count(folded) > 1 and folded_labels.index(folded) == position\n        )\n        if duplicated:\n            raise ValueError(\n                f\"tier_labels values must be unique across tiers; shared labels for: {'; '.join(duplicated)}\"\n            )\n        return self\n\n    @model_validator(mode=\"after\")\n    def _validate_plugins_adaptive_combo(self) -> \"ComplexityRouterConfig\":","sourceCodeStart":656,"sourceCodeEnd":692,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/router_strategy/complexity_router/config.py#L656-L692","documentation":"Config validator on ComplexityRouterConfig: a tier label (case-insensitively) equals another tier's canonical name (e.g. labeling the simple tier 'MEDIUM'), which would make logs and the classifier rubric ambiguous; offending labels are listed.","triggerScenarios":"Thrown at litellm/router_strategy/complexity_router/config.py:674 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename labels that reuse another tier's canonical name so each tier label is distinct."],"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-14T00:17:10.932Z"}