Skip to content
Discussion options

You must be logged in to vote

工具名被解析成空字符串,导致任何 Skill 和工具都无法运行。

原因

packages/llm/llm-deepseek/src/translate.ts 在解析 SSE 流时,
每个新分块都会覆盖已有的工具名,而不是累加
当后续分块的 function.name 为空时,就把之前解析好的名字抹掉了。

解决方案

修改 packages/llm/llm-deepseek/src/translate.ts 第 159–160 行:

- if (call.id !== undefined) block.callId = call.id
- if (call.function?.name !== undefined) block.name = call.function.name
+ if (call.id !== undefined) block.callId = (block.callId ?? '') + call.id
+ if (call.function?.name !== undefined) block.name = (block.name ?? '') + call.function.name

改完重新 pnpm run build 再重启 dsh 即可。

我的环境: Windows 11 · DeepSeek-V4-Flash · SSE 流式输出

Replies: 6 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by wangziwei734
Comment options

You must be logged in to vote
1 reply
@wangziwei734
Comment options

Comment options

You must be logged in to vote
1 reply
@wangziwei734
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants