Skip to content

Conversation

@ggndnn
Copy link
Contributor

@ggndnn ggndnn commented May 23, 2025

Fix tool call merging issue during deepseek stream processing, same as #2589.

@markpollack
Copy link
Member

@mxsl-gr thoughts?

@mxsl-gr
Copy link
Contributor

mxsl-gr commented May 30, 2025

Hi, @ggndnn Thanks for the PR!
I’ve done quite a few tests, and both deepseek-chat and ZhiPuAI in stream mode don’t seem to return an empty string for the tool call id.
It seems like this issue might be specific to OpenAI, If you have a minimal reproducible scenario, that would be even better!

@ggndnn
Copy link
Contributor Author

ggndnn commented May 30, 2025

@mxsl-gr Hi, In order to obtain the reasoning_content while also utilizing the tool calling feature, I believe the DeepSeekApi is capable of doing so, so I used it to access aliyun models such as qwen3-235b-a22b, then got the issue.

@mxsl-gr
Copy link
Contributor

mxsl-gr commented May 30, 2025

@mxsl-gr Hi, In order to obtain the reasoning_content while also utilizing the tool calling feature, I believe the DeepSeekApi is capable of doing so, so I used it to access aliyun models such as qwen3-235b-a22b, then got the issue.

You’re right! I tested it with Qwen3 and saw the same issue.
It related to the model’s default return values. From a defensive programming perspective, I think this merge change doesn’t hurt and can be helpful.

@ilayaperumalg
Copy link
Member

@ggndnn Thanks for the PR. Rebased and merged as d61192a. Back-ported into 1.0.x as well.

@ilayaperumalg
Copy link
Member

Related fix at the OpenAI side: #3608

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants