@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 855b101d75
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 11, 11:15 UTC

[Frontend] add tools for dsv32 developer role (#30040)

Signed-off-by: pridejcyang <pridejcyang@tencent.com> Co-authored-by: pridejcyang <pridejcyang@tencent.com> Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>

yjc9696 committed Dec 15, 2025 at 23:08 UTC 855b101d75d2fc1fa02a47a6fcfa4053e8541cf0
1 file changed +9
vllm/entrypoints/chat_utils.py
+9
@@ -24,6 +24,7 @@ from openai.types.chat import (
24 ChatCompletionContentPartInputAudioParam,
25 ChatCompletionContentPartRefusalParam,
26 ChatCompletionContentPartTextParam,
27 + ChatCompletionFunctionToolParam,
28 ChatCompletionMessageToolCallParam,
29 ChatCompletionToolMessageParam,
30 )
@@ -269,6 +270,9 @@ class CustomChatCompletionMessageParam(TypedDict, total=False):
270 reasoning: str | None
271 """The reasoning content for interleaved thinking."""
272
273 + tools: list[ChatCompletionFunctionToolParam] | None
274 + """The tools for developer role."""
275 +
276
277 ChatCompletionMessageParam: TypeAlias = (
278 OpenAIChatCompletionMessageParam
@@ -300,6 +304,9 @@ class ConversationMessage(TypedDict, total=False):
304 reasoning_content: str | None
305 """Deprecated: The reasoning content for interleaved thinking."""
306
307 + tools: list[ChatCompletionFunctionToolParam] | None
308 + """The tools for developer role."""
309 +
310
311 # Passed in by user
312 ChatTemplateContentFormatOption = Literal["auto", "string", "openai"]
@@ -1619,6 +1626,8 @@ def _parse_chat_message_content(
1626 if "name" in message and isinstance(message["name"], str):
1627 result_msg["name"] = message["name"]
1628
1629 + if role == "developer":
1630 + result_msg["tools"] = message.get("tools", None)
1631 return result
1632
1633