BerriAI/litellm · error · ValueError
Not allowed to access model due to tags configuration. Passe
Error message
Not allowed to access model due to tags configuration. Passed model={model} and tags={request_tags} What it means
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.
Source
Thrown at litellm/router_strategy/tag_based_routing.py:322
inherited_required_set: frozenset[str] | None,
routing_confirmed: frozenset[str],
model: str,
request_tags: object,
) -> tuple[_TagRoutingDeployment, ...]:
if pool:
return tuple(pool)
if _chain_allows_fail_open(healthy_deployments, excluded_set, required_set, routing_confirmed):
# Fall open only within whatever still satisfies whichever constraints
# trace back to key/team policy. A constraint with no inherited backing at
# all (or, when inherited_tags is unavailable, any constraint at all) can
# be discarded; one inherited from key/team policy cannot -- if that alone
# is unsatisfiable, raise instead of silently routing around it.
trusted_pool: Final = _trusted_only_pool(
healthy_deployments, excluded_set, required_set, inherited_excluded_set, inherited_required_set
)
if trusted_pool:
return _default_tagged_pool(trusted_pool)
raise ValueError(
f"{RouterErrors.no_deployments_with_tag_routing.value}. Passed model={model} and tags={request_tags}"
)
def _resolve_constraint_only_pool(
healthy_deployments: Iterable[_TagRoutingDeployment],
excluded_set: frozenset[str],
required_set: frozenset[str],
inherited_excluded_set: frozenset[str] | None,
inherited_required_set: frozenset[str] | None,
routing_confirmed: frozenset[str],
model: str,
request_tags: object,
) -> tuple[_TagRoutingDeployment, ...]:
pool: Final = (
_require_all_tags(_exclude_deployments(healthy_deployments, excluded_set), required_set)
if required_set
else _exclude_deployments(_default_tagged_pool(healthy_deployments), excluded_set)View on GitHub (pinned to 77b7c6c40c)
Solutions
- Request a model whose tags match your key/team's allowed tags, or ask an admin to update tag configuration.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/router_strategy/tag_based_routing.py:322 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/4a6439daa77a2371.
Report an issue: GitHub.