[DSV4] Support max reasoning effort (#40982)

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
This commit is contained in:
Bugen Zhao
2026-04-29 11:03:47 +00:00
committed by GitHub
parent 37e288214b
commit 33f36d4260
6 changed files with 126 additions and 6 deletions
@@ -182,7 +182,19 @@ class ChatCompletionRequest(OpenAIBaseModel):
| ChatCompletionNamedToolChoiceParam
| None
) = "none"
reasoning_effort: Literal["none", "low", "medium", "high"] | None = None
reasoning_effort: (
Literal["none", "minimal", "low", "medium", "high", "xhigh", "max"] | None
) = Field(
default=None,
description=(
"Constrains effort on reasoning for reasoning models. "
"Currently supported values are none, minimal, low, medium, "
"high, xhigh, and max. Reducing reasoning effort can result in "
"faster responses and fewer tokens used on reasoning in a response. "
"Note that 'max' is specific to the DeepSeek V4 series and is not "
"part of the standard OpenAI API specification."
),
)
thinking_token_budget: int | None = None
include_reasoning: bool = True
parallel_tool_calls: bool | None = True