diff --git a/litellm/proxy/litellm_pre_call_utils.py b/litellm/proxy/litellm_pre_call_utils.py index 4877ad0a36..097f798de2 100644 --- a/litellm/proxy/litellm_pre_call_utils.py +++ b/litellm/proxy/litellm_pre_call_utils.py @@ -433,14 +433,13 @@ class LiteLLMProxyRequestSetup: ) -> Optional[List[str]]: tags = None - if llm_router and llm_router.enable_tag_filtering is True: - # Check request headers for tags - if "x-litellm-tags" in headers: - if isinstance(headers["x-litellm-tags"], str): - _tags = headers["x-litellm-tags"].split(",") - tags = [tag.strip() for tag in _tags] - elif isinstance(headers["x-litellm-tags"], list): - tags = headers["x-litellm-tags"] + # Check request headers for tags + if "x-litellm-tags" in headers: + if isinstance(headers["x-litellm-tags"], str): + _tags = headers["x-litellm-tags"].split(",") + tags = [tag.strip() for tag in _tags] + elif isinstance(headers["x-litellm-tags"], list): + tags = headers["x-litellm-tags"] # Check request body for tags if "tags" in data and isinstance(data["tags"], list): tags = data["tags"]