[Reasoning] [Bugfix] Reject invalid thinking_token_budget values (#43402)
Signed-off-by: linzm1007 <linzm1007@126.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
5d09f471f4
commit
739af5c7e1
@@ -29,6 +29,7 @@ from vllm.sampling_params import (
|
||||
RequestOutputKind,
|
||||
SamplingParams,
|
||||
StructuredOutputsParams,
|
||||
ThinkingTokenBudget,
|
||||
)
|
||||
from vllm.utils import random_uuid
|
||||
|
||||
@@ -185,11 +186,12 @@ class CompletionRequest(OpenAIBaseModel):
|
||||
"can detect such behavior and terminate early, saving time and tokens.",
|
||||
)
|
||||
|
||||
thinking_token_budget: int | None = Field(
|
||||
thinking_token_budget: ThinkingTokenBudget = Field(
|
||||
default=None,
|
||||
description=(
|
||||
"Maximum number of tokens allowed for thinking operations "
|
||||
"(reasoning models). -1 = unlimited."
|
||||
"(reasoning models). Non-negative integer sets the limit; "
|
||||
"-1 means unlimited (treated as unset)."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user