@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 4da8bf20d0
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[Tool] Fix auto tool call (#22434)

Signed-off-by: Chen Zhang <zhangch99@outlook.com>

Chen Zhang committed Aug 7, 2025 at 07:03 UTC 4da8bf20d08f1f8f97a4839d580eb923d0ca9415
1 file changed +5 -5
vllm/entrypoints/openai/serving_responses.py
+5 -5
@@ -132,9 +132,6 @@ class OpenAIServingResponses(OpenAIServing):
132 "\"auto\" tool choice has been enabled please note that while"
133 " the parallel_tool_calls client option is preset for "
134 "compatibility reasons, it will be ignored.")
135 - if not self.use_harmony:
136 - raise NotImplementedError("Auto tool choice is not supported "
137 - "yet unless using Harmony")
135
136 # HACK(woosuk): This is a hack. We should use a better store.
137 # FIXME: If enable_store=True, this may cause a memory leak since we
@@ -212,8 +209,8 @@ class OpenAIServingResponses(OpenAIServing):
209 await self._make_request(request, prev_response,
210 tokenizer))
211
215 - except (ValueError, TypeError, RuntimeError,
216 - jinja2.TemplateError) as e:
212 + except (ValueError, TypeError, RuntimeError, jinja2.TemplateError,
213 + NotImplementedError) as e:
214 logger.exception("Error in preprocessing prompt inputs")
215 return self.create_error_response(f"{e} {e.__cause__}")
216
@@ -313,6 +310,9 @@ class OpenAIServingResponses(OpenAIServing):
310 prev_response: Optional[ResponsesResponse],
311 tokenizer: AnyTokenizer,
312 ):
313 + if len(request.tools) > 0:
314 + raise NotImplementedError(
315 + "Tool use is not supported in Responses API without Harmony")
316 # Construct the input messages.
317 messages = self._construct_input_messages(request, prev_response)
318 _, request_prompts, engine_prompts = await self._preprocess_chat(