fix: prefer to use max_completion_tokens rather than max_tokens (#17516)

This commit is contained in:
Yingchun Lai
2026-01-22 12:22:20 +08:00
committed by GitHub
parent e95668abc7
commit a5bbcda968

View File

@@ -654,7 +654,7 @@ class ChatCompletionRequest(BaseModel):
sampling_params = {
"temperature": get_param("temperature"),
"max_new_tokens": self.max_tokens or self.max_completion_tokens,
"max_new_tokens": self.max_completion_tokens or self.max_tokens,
"min_new_tokens": self.min_tokens,
"stop": stop,
"stop_token_ids": self.stop_token_ids,