[V0 Deprecation] Remove best_of (#29090)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-11-21 11:40:40 +08:00
committed by GitHub
parent 698024ecce
commit 56e96b37e4
6 changed files with 4 additions and 65 deletions
@@ -250,14 +250,8 @@ class OpenAIServingCompletion(OpenAIServing):
model_name = self.models.model_name(lora_request)
num_prompts = len(engine_prompts)
# Similar to the OpenAI API, when n != best_of, we do not stream the
# results. Noting that best_of is only supported in V0. In addition,
# we do not stream the results when use beam search.
stream = (
request.stream
and (request.best_of is None or request.n == request.best_of)
and not request.use_beam_search
)
# We do not stream the results when using beam search.
stream = request.stream and not request.use_beam_search
# Streaming response
if stream: