[PR #362] [MERGED] fix:response data will be discard if tool/llm response buffer overflow #468

Closed
opened 2026-02-16 01:16:03 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/362
Author: @kinoooolu
Created: 6/25/2025
Status: Merged
Merged: 6/25/2025
Merged by: @Yeuoly

Base: mainHead: feat/response-buffer-overflow


📝 Commits (1)

  • 031d7f1 fix:response data will be discard if tool/llm response buffer overflow

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 internal/core/plugin_daemon/generic.go (+1 -1)

📄 Description

Description:
When the plugin-daemon receives responses from a tool, if the tool returns data too quickly, the queue of the stream will be full, finally causing data to be discarded without any error log.

Steps to Reproduce:

  1. Develop an unzip plugin.
  2. Package 100 PDF files (each ~500KB) into a single ZIP archive.
  3. Use the unzip plugin in a workflow to extract the files.
  4. Result: The unzip plugin outputs only 20 to 50+ PDFs each time, losing a significant portion of the files.

Proposed Fix:
Replace the stream object’s Write method with WriteBlocking to ensure synchronous handling.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/362 **Author:** [@kinoooolu](https://github.com/kinoooolu) **Created:** 6/25/2025 **Status:** ✅ Merged **Merged:** 6/25/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `feat/response-buffer-overflow` --- ### 📝 Commits (1) - [`031d7f1`](https://github.com/langgenius/dify-plugin-daemon/commit/031d7f13f414b1814b587a698b429e8d1619b388) fix:response data will be discard if tool/llm response buffer overflow ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `internal/core/plugin_daemon/generic.go` (+1 -1) </details> ### 📄 Description **Description:** When the `plugin-daemon` receives responses from a tool, if the tool returns data too quickly, the queue of the stream will be full, finally causing data to be discarded without any error log. **Steps to Reproduce:** 1. Develop an `unzip` plugin. 2. Package 100 PDF files (each ~500KB) into a single ZIP archive. 3. Use the `unzip` plugin in a workflow to extract the files. 4. **Result:** The `unzip` plugin outputs only 20 to 50+ PDFs each time, losing a significant portion of the files. **Proposed Fix:** Replace the stream object’s `Write` method with `WriteBlocking` to ensure synchronous handling. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:16:03 -05:00
yindo closed this issue 2026-02-16 01:16:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#468