{"record":{"id":"60825b2acb52f1e8","repo":"BerriAI/litellm","slug":"tier-labels-values-must-be-unique-across-tiers-sh","errorCode":null,"errorMessage":"tier_labels values must be unique across tiers; shared labels for: {'; '.join(duplicated)}","messagePattern":"tier_labels values must be unique across tiers; shared labels for: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/router_strategy/complexity_router/config.py","lineNumber":686,"sourceCode":"                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\":\n        if self.plugins and self.adaptive:\n            raise ValueError(\n                \"plugins and adaptive=True cannot both be set: adaptive's bandit selection doesn't yet \"\n                \"consume plugin-narrowed candidate pools. Disable adaptive or remove plugins.\"\n            )\n        return self\n\n    def tier_label(self, tier: ComplexityTier) -> str:\n        \"\"\"Operator-facing display name for a tier, falling back to its canonical name.\"\"\"\n        return self.tier_labels.get(tier, \"\").strip() or tier.value\n\n    def labeled_tiers(self) -> tuple[tuple[ComplexityTier, str], ...]:","sourceCodeStart":668,"sourceCodeEnd":704,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/router_strategy/complexity_router/config.py#L668-L704","documentation":"Config validator on ComplexityRouterConfig: two or more tiers share the same human-readable label (case-folded), so logs and classifier output could not distinguish them; the colliding tiers are listed.","triggerScenarios":"Thrown at litellm/router_strategy/complexity_router/config.py:686 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make tier_labels values unique across tiers."],"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"}