From 7729092ebf746756528b013a3b177175dcbab8e2 Mon Sep 17 00:00:00 2001 From: PairZhu <1115306638@qq.com> Date: Thu, 14 Aug 2025 15:59:17 +0800 Subject: [PATCH] fix: stream tool call id --- mcp_bridge/openai_clients/streamChatCompletion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcp_bridge/openai_clients/streamChatCompletion.py b/mcp_bridge/openai_clients/streamChatCompletion.py index f518cd4..79d76fe 100644 --- a/mcp_bridge/openai_clients/streamChatCompletion.py +++ b/mcp_bridge/openai_clients/streamChatCompletion.py @@ -137,7 +137,7 @@ async def chat_completions(request: CreateChatCompletionRequest, http_request: R call_id = parsed_data.choices[0].delta.tool_calls[0].id call_id = call_id if call_id is not None else "" - tool_call_id = id if tool_call_id == "" else tool_call_id + tool_call_id = call_id if tool_call_id == "" else tool_call_id arg = parsed_data.choices[0].delta.tool_calls[0].function.arguments tool_call_json += arg if arg is not None else ""