mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
Can not get output when useing tongyi DeepSeek3.1 #606
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Once2012 on GitHub (Aug 31, 2025).
Self Checks
Dify version
1.7.1 to 1.8.0
Plugin version
langgenius / tongyi 0.0.43
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I created a ChatFlow and used the DeepSeek V3.1 model in an LLM Node. However, after running it, there was no output at all. When I reduce the size of the prompt (<1200), there will be an output. However, if it exceeds this value, there is a high probability that there will be no output. In the debugging information, it can be seen that the text field in the output information is empty.
Additionally, if I directly write the code to call the API of Aliyun Tongyi's DeepSeek V3.1, with the same prompt, the correct output will be obtained.
✔️ Error log
No response
@dosubot[bot] commented on GitHub (Aug 31, 2025):
Hi @Once2012! I'm Dosu and I’m helping the dify-official-plugins team.
This issue is likely caused by how the tongyi plugin processes streamed output for DeepSeek V3.1. The plugin uses a
replacemethod to extract incremental deltas, which can result in character loss or empty output if the prompt is large or if the output and accumulated text don't align perfectly. This is a known bug for DeepSeek models in the tongyi plugin, especially with longer prompts source.There are no hardcoded prompt size limits in Dify or the plugin for DeepSeek V3.1; the model's config allows very large prompts (context_size: 131072), and you can adjust
max_tokens(default 4096, up to 65536) to control output length source. However, if the underlying API returns success but no content, Dify will show an empty output field with no error source.Workarounds:
max_tokensparameter in your model config to see if output is truncated.replacefor streamed output (see suggested fixes).If direct API calls work but Dify does not, the issue is almost certainly in the plugin's output handling logic.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@Once2012 commented on GitHub (Aug 31, 2025):
"This is a known bug for DeepSeek models in the tongyi", NONONO, DeepSeek V3 or R1 in tongyi is always OK
In the subsequent tests, even with just a few lines of prompts in DeepSeek V3.1, there was still no response. I'm unable to determine at this moment when there will be a return and when there won't.
The DeepSeek V3.1 parameters I used were: temperature=0 and top_p=1
@dosubot[bot] commented on GitHub (Aug 31, 2025):
You're right—DeepSeek V3 and R1 work fine in the tongyi plugin; the output bug is specific to DeepSeek V3.1. The root cause is the plugin's streamed output handling: it uses a
replacemethod to build the response, which can lose characters or result in empty output, even with small prompts and regardless of parameters like temperature or top_p. This bug is confirmed for V3.1 and not present in V3 or R1 details.There are no hardcoded prompt size limits in the config; the issue is with how the plugin accumulates streamed output config reference. Workarounds like increasing
max_tokensor reducing prompt size may help with truncation, but won't fix the root bug.The recommended fix is to patch the plugin to use string appending instead of
replace, for example:This prevents character loss and empty output suggested fix.
If you want step-by-step patch instructions, let me know!
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
