mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Failed to transform agent message ... JSONDecodeError #757
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 @vvhr on GitHub (Oct 29, 2025).
Self Checks
Dify version
1.9.2
Plugin version
0.0.25
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
✔️ Error log
Agent Failed: Failed to transform agent message: req_id: 3b276b8b6a PluginInvokeError: {"args":{},"error_type":"JSONDecodeError","message":"Extra data: line 1 column 32 (char 31)"}
@dosubot[bot] commented on GitHub (Oct 29, 2025):
This error is caused by the agent message containing multiple JSON objects or extra data outside a single JSON object, which the parser can't handle. This is a known issue when models like Claude Haiku (especially with the FunctionCalling strategy) return outputs that aren't strictly a single JSON object—sometimes including trailing text or multiple JSON blocks. Recent Dify updates fixed similar JSON parsing bugs by stripping out extra tags (like
<think>) and making the parser more robust to both{}and[]formats, but these fixes landed after v1.9.2 (details).To work around this in your current version, check your agent/tool prompts to ensure they instruct the model to return only a single, clean JSON object with no extra text. If possible, upgrade to a newer Dify version where these parsing improvements are included. If you must stay on v1.9.2, you may need to patch your deployment to sanitize model outputs before parsing, or backport the relevant fixes from the recent PRs.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
