When the Qwen3 model is configured to support stream function calling within Dify's vLLM plugin, the Agent reports an error: "Unterminated string starting at: line 1 column 20 (char 19)". #380

Closed
opened 2026-02-16 10:19:13 -05:00 by yindo · 2 comments
Owner

Originally created by @vinland100 on GitHub (Jun 18, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.4.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

using vllm deployment qwen3-32b:
docker run -dit --name vllm-qwen3-32b --runtime nvidia --gpus all -v "$HOME/.cache/modelscope:/root/.cache/modelscope" --env "VLLM_USE_MODELSCOPE=true" -p 8001:8000 --ipc=host vllm/vllm-openai:latest --model Qwen/Qwen3-32B --enable-auto-tool-choice --tool-call-parser hermes --enable-reasoning --tensor-parallel-size 2 --gpu-memory-utilization 0.6

deployment Dify v1.4.3 using docker, set vllm plugin in Dify, set stream function calling as support.
then you see this error.

✔️ Expected Behavior

work normally

Actual Behavior

Image

Image

when set to not support stream function calling, it works good, but it looks weird, the reasoning content not present first, must to click it to present:
Image

Originally created by @vinland100 on GitHub (Jun 18, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce using vllm deployment qwen3-32b: `docker run -dit --name vllm-qwen3-32b --runtime nvidia --gpus all -v "$HOME/.cache/modelscope:/root/.cache/modelscope" --env "VLLM_USE_MODELSCOPE=true" -p 8001:8000 --ipc=host vllm/vllm-openai:latest --model Qwen/Qwen3-32B --enable-auto-tool-choice --tool-call-parser hermes --enable-reasoning --tensor-parallel-size 2 --gpu-memory-utilization 0.6` deployment Dify v1.4.3 using docker, set vllm plugin in Dify, set stream function calling as support. then you see this error. ### ✔️ Expected Behavior work normally ### ❌ Actual Behavior ![Image](https://github.com/user-attachments/assets/c26882d6-4d1c-4d11-b94e-de5ec78626ad) ![Image](https://github.com/user-attachments/assets/5a1aca92-19a9-4052-928b-2a4cfc97fadb) when set to not support stream function calling, it works good, but it looks weird, the reasoning content not present first, must to click it to present: ![Image](https://github.com/user-attachments/assets/0164c667-4786-4cd7-bd7e-8e1f080859e5)
yindo closed this issue 2026-02-16 10:19:13 -05:00
Author
Owner

@vinland100 commented on GitHub (Jun 18, 2025):

‌‌This error still exists when using the OpenAI-API-compatible plugin.

@vinland100 commented on GitHub (Jun 18, 2025): ‌‌This error still exists when using the OpenAI-API-compatible plugin.
Author
Owner

@dosubot[bot] commented on GitHub (Aug 19, 2025):

Hi, @vinland100. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported an "Unterminated string" error when using the Qwen3-32B model with Dify v1.4.3's vLLM plugin configured for stream function calling.
  • Disabling stream function calling avoids the error but causes delayed reasoning content display requiring manual interaction.
  • The issue occurs in a self-hosted Docker setup.
  • You also observed the same problem with the OpenAI-API-compatible plugin.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here.
  • If I don’t hear back within 5 days, I will automatically close this issue.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 19, 2025): Hi, @vinland100. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported an "Unterminated string" error when using the Qwen3-32B model with Dify v1.4.3's vLLM plugin configured for stream function calling. - Disabling stream function calling avoids the error but causes delayed reasoning content display requiring manual interaction. - The issue occurs in a self-hosted Docker setup. - You also observed the same problem with the OpenAI-API-compatible plugin. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here. - If I don’t hear back within 5 days, I will automatically close this issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#380