mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
failed to read response body: bufio.Scanner: token too long #324
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 @TaylorSwift5201314 on GitHub (May 29, 2025).
Self Checks
Dify version
V1.4.1
Cloud or Self Hosted
Cloud
Steps to reproduce
I don't encounter this issue with GPT-4.1, but when using Doubao-1.5-vision-pro, if the image size exceeds 3MB, it directly prompts: "failed to read response body: bufio.Scanner: token too long".
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
@dosubot[bot] commented on GitHub (May 29, 2025):
The "failed to read response body: bufio.Scanner: token too long" error when using Doubao-1.5-vision-pro with images larger than 3MB is a known issue. This error typically occurs because the Go bufio.Scanner has a buffer size limit, and large images—especially when base64 encoded—can exceed this limit.
A similar issue was previously resolved by upgrading to Dify version 1.4.0 or later, so your current version (1.4.1) should already include that fix for the Volcengine plugin and Doubao-1.5-vision-pro model. However, if you are using the openai_api_compatible provider, the error can still occur with large images due to the way images are encoded and sent to the backend. In this case, reducing the image size before uploading or switching to a different model provider can help avoid the error. More details can be found in these related issues:
If you continue to encounter this error after reducing image size or changing providers, please provide additional details about your setup or the specific provider configuration.
To reply, just mention my name @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@TaylorSwift5201314 commented on GitHub (May 29, 2025):
Such problems occurred when using the online version V1.4.1
@TaylorSwift5201314 commented on GitHub (May 29, 2025):
GPT-4.1:Normal
Doubao-1.5-vision-pro:failed to read response body: bufio.Scanner: token too long