Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_fix_autorouter_untagged_hijack

mateo-berrifeff5ae34c0a
diff --cc litellm/router.py
index e3b541566e2,c8441a6c93b..fb2af41dcf2
--- a/litellm/router.py
+++ b/litellm/router.py
@@@ -11377,12 -11363,9 +11380,14 @@@ class Router
that share a `model_name` by matching the request's tags against each
registered strategy's tags before falling back to the first registered.
Returns the tagged registry entry so the caller can tell whether the
- request's tags were what selected it.
+ request's tags were what selected it, and can locate the marker
+ deployment the strategy was registered from via its (model_name, tags)
+ pair.
+
+ With tag filtering enabled, strategies that all carry real tags matching
+ none of the request's do not capture it when the name also has plain
+ deployments: returning None hands the request to ordinary tag-aware
+ deployment selection.
"""
candidates: Final[list[TaggedPreRoutingStrategy[PreRoutingStrategy]]] = [
*self.auto_routers.get(model, []),