mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
bedrock plugin on stdout: bufio.Scanner: token too long #319
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 @dimsky on GitHub (May 29, 2025).
Self Checks
Dify version
1.4.0
Plugin version
all
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
When transmitting multiple images or other binary data to large language models, the print statements in plugins like Bedrock will output the base64 data from the prompt to stdio, which can cause plugin crashes. Please remove print statements before publishing plugins.
Issue Details
When print statements output large amounts of base64-encoded data to standard output, it can lead to:
Buffer overflow
Excessive memory usage
Plugin response timeouts
System resource exhaustion
https://github.com/langgenius/dify-official-plugins/blob/2e7f132cabfd32cd71e373d910ab429157ce6f96/models/bedrock/models/llm/llm.py#L648
✔️ Error log
No response
@dimsky commented on GitHub (May 29, 2025):
If data must be displayed, only show the first few characters: