[Fix] correct tool_id for kimi-k2 when use tool_choice=required (#21259)

Co-authored-by: wangzhengtao <wangzhengtao@msh.team>
This commit is contained in:
bigmoyan
2025-08-20 12:59:54 -07:00
committed by GitHub
co-authored by wangzhengtao
parent 0cdbf5e61c
commit 582bbe6bd7
15 changed files with 283 additions and 166 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ from typing_extensions import TypeAlias
from vllm import envs
from vllm.entrypoints.chat_utils import (ChatCompletionMessageParam,
random_tool_call_id)
make_tool_call_id)
from vllm.entrypoints.score_utils import (ScoreContentPartParam,
ScoreMultiModalParam)
from vllm.logger import init_logger
@@ -1634,7 +1634,7 @@ class FunctionCall(OpenAIBaseModel):
class ToolCall(OpenAIBaseModel):
id: str = Field(default_factory=random_tool_call_id)
id: str = Field(default_factory=make_tool_call_id)
type: Literal["function"] = "function"
function: FunctionCall