[Model Runner V2] Fix openai.InternalServerError: Error code: 500 - 'list index out of range' (#45467)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-06-13 01:44:16 -07:00
committed by GitHub
parent 0d29612292
commit 2ecf7d0eb4
+2
View File
@@ -56,6 +56,8 @@ class SamplingStates:
num_logprobs = sampling_params.logprobs
if num_logprobs is None:
num_logprobs = NO_LOGPROBS
elif num_logprobs == -1:
num_logprobs = self.vocab_size
self.num_logprobs[req_idx] = num_logprobs
def apply_staged_writes(self) -> None: