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]

fix: test

Ishaan Jaffer15ecc363d840
diff --git a/litellm/router_strategy/tag_based_routing.py b/litellm/router_strategy/tag_based_routing.py
index 1384c7aea00..b25c20eb281 100644
--- a/litellm/router_strategy/tag_based_routing.py
+++ b/litellm/router_strategy/tag_based_routing.py
@@ -137,9 +137,11 @@ def _get_tags_from_request_kwargs(
return []
if metadata_variable_name in request_kwargs:
metadata = request_kwargs[metadata_variable_name] or {}
- return metadata.get("tags", [])
+ tags = metadata.get("tags", [])
+ return tags if tags is not None else []
elif "litellm_params" in request_kwargs:
litellm_params = request_kwargs["litellm_params"] or {}
_metadata = litellm_params.get(metadata_variable_name, {}) or {}
- return _metadata.get("tags", [])
+ tags = _metadata.get("tags", [])
+ return tags if tags is not None else []
return []