[Feature] limit thinking tokens (hard limit) (#20859)
Signed-off-by: Sungjae Lee <33976427+llsj14@users.noreply.github.com> Signed-off-by: Sungjae Lee <sung-jae.lee@navercorp.com> Signed-off-by: Chauncey <chaunceyjiang@gmail.com> Co-authored-by: Chauncey <chaunceyjiang@gmail.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
co-authored by
Chauncey
Harry Mellor
parent
8de5261e69
commit
4731884796
@@ -180,6 +180,7 @@ class ChatCompletionRequest(OpenAIBaseModel):
|
||||
| None
|
||||
) = "none"
|
||||
reasoning_effort: Literal["none", "low", "medium", "high"] | None = None
|
||||
thinking_token_budget: int | None = None
|
||||
include_reasoning: bool = True
|
||||
parallel_tool_calls: bool | None = True
|
||||
|
||||
@@ -515,6 +516,7 @@ class ChatCompletionRequest(OpenAIBaseModel):
|
||||
structured_outputs=self.structured_outputs,
|
||||
logit_bias=self.logit_bias,
|
||||
bad_words=self.bad_words,
|
||||
thinking_token_budget=self.thinking_token_budget,
|
||||
allowed_token_ids=self.allowed_token_ids,
|
||||
extra_args=extra_args or None,
|
||||
skip_clone=True, # Created fresh per request, safe to skip clone
|
||||
|
||||
Reference in New Issue
Block a user