@@ -73,8 +73,6 @@ def __init__(
73
73
enable_force_include_usage = enable_force_include_usage ,
74
74
)
75
75
self .enable_auto_tools = enable_auto_tools
76
- self .expand_tools_even_if_tool_choice_none = (
77
- expand_tools_even_if_tool_choice_none )
78
76
self .chat_template = chat_template
79
77
self .chat_template_content_format : Final = chat_template_content_format
80
78
@@ -142,20 +140,6 @@ async def create_responses(
142
140
tokenizer = await self .engine_client .get_tokenizer (lora_request )
143
141
if request .tools is None :
144
142
tool_dicts = None
145
- elif (request .tool_choice == "none"
146
- and not self .expand_tools_even_if_tool_choice_none ):
147
- if len (request .tools ) > 0 :
148
- logger .warning_once (
149
- "Tools are specified but tool_choice is set to 'none' "
150
- "and --expand-tools-even-if-tool-choice-none is not "
151
- "enabled. Tool definitions will be excluded from the "
152
- "prompt. This behavior will change in vLLM v0.10 where "
153
- "tool definitions will be included by default even "
154
- "with tool_choice='none'. To adopt the new behavior "
155
- "now, use --expand-tools-even-if-tool-choice-none. "
156
- "To suppress this warning, either remove tools from "
157
- "the request or set tool_choice to a different value." )
158
- tool_dicts = None
159
143
else :
160
144
tool_dicts = [tool .model_dump () for tool in request .tools ]
161
145
_ , request_prompts , engine_prompts = await self ._preprocess_chat (
@@ -326,15 +310,13 @@ async def responses_full_generator(
326
310
)
327
311
outputs = []
328
312
function_calls : list [FunctionCall ] = []
329
- if ( not self .enable_auto_tools or not self .tool_parser ) :
313
+ if not self .enable_auto_tools or not self .tool_parser :
330
314
# Tools are not enabled
331
315
if reasoning_item :
332
316
outputs .append (reasoning_item )
333
317
if message_item :
334
318
outputs .append (message_item )
335
- elif (request .tool_choice == "none" and \
336
- not self .expand_tools_even_if_tool_choice_none ) or \
337
- request .tool_choice is None :
319
+ elif request .tool_choice is None :
338
320
# No tool calls.
339
321
if reasoning_item :
340
322
outputs .append (reasoning_item )
0 commit comments