mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
tongyi response format use a trick way not model parameters #567
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 @jiangbo721 on GitHub (Aug 17, 2025).
Self Checks
Dify version
1.4.1
Plugin version
0.3.0
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
✔️ Error log
No response
@dosubot[bot] commented on GitHub (Aug 17, 2025):
You're correct—recent updates to the Tongyi (Qwen) plugin (v0.3.0) changed how response formats are handled. Instead of passing a
response_formatas a direct model parameter, the plugin now uses template-based or custom post-processing logic to shape the output (the "trick way") because some Tongyi models don't natively support switching formats via parameters. This means the plugin adapts the model's output after inference to match JSON, XML, etc., as needed, rather than relying on the model to do it itself. This shift is confirmed by the removal ofresponse_formatfrom several model YAML files in PR #1209.There are known issues with this approach, especially with JSON output—sometimes the returned data is invalid or missing quotes due to quirks in the incremental output and post-processing logic (see issue #458). If you need reliable JSON, you may need to add extra validation or post-processing in your workflow.
This workaround is necessary due to Tongyi's API limitations, and while it can introduce compatibility concerns, it's currently the only way to support flexible response formats for these models in Dify.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
