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 12, 22:15 UTC
[Frontend] Allow parsed tool arguments (#28820)
Signed-off-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Quentin Gallouédec committed
Nov 19, 2025 at 23:20 UTC
1c7bcc55b86d6cb867072dfb890dec6c7e747a1b
1 file changed
+2
-1
vllm/entrypoints/chat_utils.py
+2
-1
@@ -1437,7 +1437,8 @@ def _postprocess_messages(messages: list[ConversationMessage]) -> None:
1437
for item in message["tool_calls"]:
1438
# if arguments is None or empty string, set to {}
1439
if content := item["function"].get("arguments"):
1440
- item["function"]["arguments"] = json.loads(content)
1440
+ if not isinstance(content, (dict, list)):
1441
+ item["function"]["arguments"] = json.loads(content)
1442
else:
1443
item["function"]["arguments"] = {}
1444