[BugFix] Fix blocked reasoning parsing with MRV2 (#43808)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2026-05-28 04:59:34 +00:00
committed by GitHub
parent e54eff769d
commit 626fa9bba5
3 changed files with 36 additions and 22 deletions
+17 -9
View File
@@ -49,6 +49,7 @@ class InputProcessor:
self.speculative_config = vllm_config.speculative_config
self.structured_outputs_config = vllm_config.structured_outputs_config
self.observability_config = vllm_config.observability_config
self.use_v2_model_runner = vllm_config.use_v2_model_runner
self.generation_config_fields = model_config.try_get_generation_config()
@@ -98,15 +99,22 @@ class InputProcessor:
self.tokenizer,
)
if params.thinking_token_budget is not None and (
self.vllm_config.reasoning_config is None
or not self.vllm_config.reasoning_config.enabled
):
raise ValueError(
"thinking_token_budget is set but reasoning_config is "
"not configured. Please set --reasoning-config to use "
"thinking_token_budget."
)
if params.thinking_token_budget is not None:
if (
self.vllm_config.reasoning_config is None
or not self.vllm_config.reasoning_config.enabled
):
raise ValueError(
"thinking_token_budget is set but reasoning_config is "
"not configured. Please set --reasoning-parser "
"and/or --reasoning-config to use thinking_token_budget."
)
if self.use_v2_model_runner:
raise ValueError(
"thinking_token_budget is not yet supported by the V2 "
"model runner. Run vLLM with VLLM_USE_V2_MODEL_RUNNER=0 "
"to use thinking_token_budget."
)
elif isinstance(params, PoolingParams):
supported_pooling_tasks = [
task for task in supported_tasks if task in POOLING_TASKS