feat(tool_call): changed return type of tool_call

Update the tool call response format so that all non-first chunks in a tool call have type: null.
This commit is contained in:
laoyao0822
2026-04-08 06:27:12 +08:00
committed by wxiwnd
parent 9b5ecc8c1f
commit 7c524ccacc
@@ -1359,7 +1359,8 @@ class OpenAIServingChat(OpenAIServingBase):
arguments=call_item.parameters, arguments=call_item.parameters,
), ),
) )
if tool_call_id is None:
tool_call.type = None
choice_data = ChatCompletionResponseStreamChoice( choice_data = ChatCompletionResponseStreamChoice(
index=index, index=index,
delta=DeltaMessage(tool_calls=[tool_call]), delta=DeltaMessage(tool_calls=[tool_call]),