[Bugfix][Frontend] Preserve logprobs when top_logprobs is null (#47838)

Signed-off-by: Ting Sun <suntcrick@gmail.com>
Signed-off-by: Flora Feng <4florafeng@gmail.com>
Co-authored-by: Flora Feng <4florafeng@gmail.com>
This commit is contained in:
Ting SUN
2026-10-05 22:43:31 +00:00
committed by GitHub
co-authored by Flora Feng
parent 89a00995c9
commit 4a705c7b54
7 changed files with 46 additions and 12 deletions
@@ -61,6 +61,7 @@ from vllm.entrypoints.chat_utils import (
from vllm.entrypoints.generate.base.protocol import (
PerRequestMetrics,
StopParam,
TopLogprobsParam,
validate_cache_salt,
)
from vllm.entrypoints.serve.engine.protocol import OpenAIBaseModel
@@ -210,7 +211,7 @@ class ResponsesRequest(OpenAIBaseModel):
text: ResponseTextConfig | None = None
tool_choice: ToolChoice = "auto"
tools: list[Tool] = Field(default_factory=list)
top_logprobs: int | None = 0
top_logprobs: TopLogprobsParam = 0
top_p: float | None = None
top_k: int | None = None
truncation: Literal["auto", "disabled"] | None = "disabled"