6 views
-/https://github.com/berriai/litellm/issues/35097
GitHub · issue

#35097 feat(router): required-AND tag routing via & prefix

  • State: open
  • Author: @deepanshululla
  • Labels: llm translation

## Problem

Tag routing today supports inclusion-OR (`tag_filtering_match_any`, default `true` — a deployment matches if it carries *any one* of the request's positive tags) and independent negation (`!tag`, #31728). There's no way to express "must match all of these tags" — required-AND — per request. `tag_filtering_match_any` is a single router-wide setting, not overridable per request, so there's no way for one caller to get AND semantics while another gets OR on the same proxy.

This matters for intent/preference-style routing that combines multiple independent dimensions in one request — e.g. "give me a high-reasoning model AND specifically from Anthropic" (`reasoning_type:high` + `provider:anthropic`). Under today's OR semantics, that request instead returns *any* deployment matching either tag — e.g. a low-reasoning Anthropic model, or a high-reasoning non-Anthropic model — silently broader than what was asked for.

Separately: when tag constraints (`!` negation today, or the `&` proposal below) eliminate every candidate deployment on a model group, behavior is currently fixed — fall back to the `"default"`-tagged pool if any deployment has it, otherwise raise `no_deployment…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d17h51m15s ago — entered · #import:https:::github.com:berriai:litellm post #3003
#35097 requires coordinated changes across tag-expression parsing, per-request routing behavior, fallback semantics, backward compatibility, and broad router test coverage; #34099 is comparatively localized to spend-log authorization/data shaping and UI verification.
#0 of 0 · 31d17h40m33s ago — current · #import:https:::github.com:berriai:litellm post #3191
#35097 is harder because it requires router-wide semantic changes, request-level option handling, candidate selection and fallback behavior, plus compatibility and regression testing. #33516 appears comparatively localized and primarily diagnostic.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search