[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:
Sungjae Lee
2026-03-24 09:53:07 -07:00
committed by GitHub
co-authored by Chauncey Harry Mellor
parent 8de5261e69
commit 4731884796
13 changed files with 702 additions and 12 deletions
+4
View File
@@ -53,6 +53,7 @@ from vllm.config import (
PoolerConfig,
PrefetchOffloadConfig,
ProfilerConfig,
ReasoningConfig,
SchedulerConfig,
SpeculativeConfig,
StructuredOutputsConfig,
@@ -581,6 +582,7 @@ class EngineArgs:
kv_events_config: KVEventsConfig | None = None
ec_transfer_config: ECTransferConfig | None = None
reasoning_config: ReasoningConfig = get_field(VllmConfig, "reasoning_config")
generation_config: str = ModelConfig.generation_config
enable_sleep_mode: bool = ModelConfig.enable_sleep_mode
@@ -1297,6 +1299,7 @@ class EngineArgs:
vllm_group.add_argument(
"--attention-config", "-ac", **vllm_kwargs["attention_config"]
)
vllm_group.add_argument("--reasoning-config", **vllm_kwargs["reasoning_config"])
vllm_group.add_argument("--kernel-config", **vllm_kwargs["kernel_config"])
vllm_group.add_argument(
"--additional-config", **vllm_kwargs["additional_config"]
@@ -1958,6 +1961,7 @@ class EngineArgs:
kv_transfer_config=self.kv_transfer_config,
kv_events_config=self.kv_events_config,
ec_transfer_config=self.ec_transfer_config,
reasoning_config=self.reasoning_config,
profiler_config=self.profiler_config,
additional_config=self.additional_config,
optimization_level=self.optimization_level,