{"record":{"id":"4a6439daa77a2371","repo":"BerriAI/litellm","slug":"not-allowed-to-access-model-due-to-tags-configurat","errorCode":null,"errorMessage":"Not allowed to access model due to tags configuration. Passed model={model} and tags={request_tags}","messagePattern":"Not allowed to access model due to tags configuration\\. Passed model=(.+?) and tags=(.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/router_strategy/tag_based_routing.py","lineNumber":322,"sourceCode":"    inherited_required_set: frozenset[str] | None,\n    routing_confirmed: frozenset[str],\n    model: str,\n    request_tags: object,\n) -> tuple[_TagRoutingDeployment, ...]:\n    if pool:\n        return tuple(pool)\n    if _chain_allows_fail_open(healthy_deployments, excluded_set, required_set, routing_confirmed):\n        # Fall open only within whatever still satisfies whichever constraints\n        # trace back to key/team policy. A constraint with no inherited backing at\n        # all (or, when inherited_tags is unavailable, any constraint at all) can\n        # be discarded; one inherited from key/team policy cannot -- if that alone\n        # is unsatisfiable, raise instead of silently routing around it.\n        trusted_pool: Final = _trusted_only_pool(\n            healthy_deployments, excluded_set, required_set, inherited_excluded_set, inherited_required_set\n        )\n        if trusted_pool:\n            return _default_tagged_pool(trusted_pool)\n    raise ValueError(\n        f\"{RouterErrors.no_deployments_with_tag_routing.value}. Passed model={model} and tags={request_tags}\"\n    )\n\n\ndef _resolve_constraint_only_pool(\n    healthy_deployments: Iterable[_TagRoutingDeployment],\n    excluded_set: frozenset[str],\n    required_set: frozenset[str],\n    inherited_excluded_set: frozenset[str] | None,\n    inherited_required_set: frozenset[str] | None,\n    routing_confirmed: frozenset[str],\n    model: str,\n    request_tags: object,\n) -> tuple[_TagRoutingDeployment, ...]:\n    pool: Final = (\n        _require_all_tags(_exclude_deployments(healthy_deployments, excluded_set), required_set)\n        if required_set\n        else _exclude_deployments(_default_tagged_pool(healthy_deployments), excluded_set)","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/router_strategy/tag_based_routing.py#L304-L340","documentation":"Raised by tag-based routing when the requested model plus the request's tags violate the configured allowed/required tag policies — every candidate deployment was excluded and fail-open conditions did not apply.","triggerScenarios":"Thrown at litellm/router_strategy/tag_based_routing.py:322 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Request a model whose tags match your key/team's allowed tags, or ask an admin to update tag configuration."],"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"}