agent functioncalling JSONDecodeError with Qwen LLM #243

Closed
opened 2026-02-16 10:18:34 -05:00 by yindo · 0 comments
Owner

Originally created by @yzddmr6 on GitHub (Apr 30, 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 Dify issues & Dify Official Plugins, 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.3.1

Plugin version

0.0.15

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Create a chatflow like this, use qwen-max-latest , and add custom tools
    Image

Tool result like this
Image

{
    "查询IOC": "39.1.1.1",
    "查询结果详情": {
        "Context": {},
        "ThreatLevel": "低危",
        "Confidence": "88",
        "Ip": {
            "country": "中国",
            "province": "浙江省",
            "city": "杭州市",
            "ip": "39.1.1.1",
            "isp": "移动",
            "asn_label": "CMNET-Zhejiang-AP - China Mobile Communications Corporation, CN"
        },
        "gmt_first": "2023-05-01 18:13:38",
        "gmt_last": "2025-04-29 20:29:59"
    }
}
  1. Run chatflow in preview and get error

Image

Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"JSONDecodeError","message":"Unterminated string starting at: line 1 column 1 (char 0)"}
  1. After testing, only the Qwen series models have this problem. Switching to chatgpt works normally.

Image

  1. The above problems can be stably triggered in the latest version plugin, and it works fine in version langgenius/agent 0.0.14 and langgenius/tongyi 0.0.18

✔️ Error log

Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"JSONDecodeError","message":"Unterminated string starting at: line 1 column 1 (char 0)"}

Originally created by @yzddmr6 on GitHub (Apr 30, 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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.3.1 ### Plugin version 0.0.15 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Create a chatflow like this, use qwen-max-latest , and add custom tools ![Image](https://github.com/user-attachments/assets/df713825-c9ef-49d8-bc9d-d6052297ed52) Tool result like this ![Image](https://github.com/user-attachments/assets/37853404-f204-4daf-a839-0b86b2a30450) ``` { "查询IOC": "39.1.1.1", "查询结果详情": { "Context": {}, "ThreatLevel": "低危", "Confidence": "88", "Ip": { "country": "中国", "province": "浙江省", "city": "杭州市", "ip": "39.1.1.1", "isp": "移动", "asn_label": "CMNET-Zhejiang-AP - China Mobile Communications Corporation, CN" }, "gmt_first": "2023-05-01 18:13:38", "gmt_last": "2025-04-29 20:29:59" } } ``` 2. Run chatflow in preview and get error ![Image](https://github.com/user-attachments/assets/6bb9faa1-b103-4cd1-9448-28c0353bc1fc) ``` Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"JSONDecodeError","message":"Unterminated string starting at: line 1 column 1 (char 0)"} ``` 3. After testing, only the Qwen series models have this problem. Switching to chatgpt works normally. ![Image](https://github.com/user-attachments/assets/63aef767-09bb-4404-aeb5-c82cfdadf451) 4. The above problems can be stably triggered in the latest version plugin, and it works fine in version langgenius/agent 0.0.14 and langgenius/tongyi 0.0.18 ### ✔️ Error log Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"JSONDecodeError","message":"Unterminated string starting at: line 1 column 1 (char 0)"}
yindo added the bug label 2026-02-16 10:18:34 -05:00
yindo closed this issue 2026-02-16 10:18:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#243