mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-20 00:11:50 +00:00
refactor(tag_regex): remove unnecessary _healthy_list copy
This commit is contained in:
parent
8fcda9083f
commit
259240fb46
1 changed files with 1 additions and 6 deletions
|
|
@ -124,14 +124,9 @@ async def get_deployments_for_tag(
|
|||
# behaviour for operators who use plain tags: a request that carries a
|
||||
# User-Agent (all proxy requests do) but targets deployments with no
|
||||
# tag_regex will continue to use the original tag-only code path.
|
||||
_healthy_list = (
|
||||
healthy_deployments
|
||||
if isinstance(healthy_deployments, list)
|
||||
else list(healthy_deployments)
|
||||
)
|
||||
has_regex_deployments = any(
|
||||
d.get("litellm_params", {}).get("tag_regex")
|
||||
for d in _healthy_list
|
||||
for d in healthy_deployments
|
||||
)
|
||||
has_tag_filter = bool(request_tags) or (
|
||||
bool(header_strings) and has_regex_deployments
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue