perf(router): remove redundant .items() for dictionary length check

This commit is contained in:
Sparrow He 2026-04-18 21:50:35 +08:00
parent 9bbb4491d0
commit 797e9df926
No known key found for this signature in database
GPG key ID: E7449770C1B09D2B

View file

@ -233,9 +233,7 @@ class LowestCostLoggingHandler(CustomLogger):
input_tokens = 0
# randomly sample from all_deployments, incase all deployments have latency=0.0
_items = random.sample(
list(all_deployments.items()), len(all_deployments.items())
)
_items = random.sample(list(all_deployments.items()), len(all_deployments))
### GET AVAILABLE DEPLOYMENTS ### filter out any deployments > tpm/rpm limits
potential_deployments = []