dify - 💡(How to fix) Fix [Plugin vllm 0.2.3] Parameter Extractor fails with “content field is required” when using Qwen3 model with tools [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langgenius/dify#36104Fetched 2026-05-14 03:46:46
View on GitHub
Comments
3
Participants
3
Timeline
10
Reactions
1
Timeline (top)
commented ×3cross-referenced ×2labeled ×2closed ×1

Error Message

Error in stream response for plugin {'code': -500, 'message': '{"message":"{\"error_type\":\"unmarshal_error\",\"message\":\"unmarshal json failed: content field is required\"}","error_type":"PluginInvokeError","args":null}', 'data': None} ... core.plugin.impl.exc.PluginInvokeError: req_id: b9eff7bb47 PluginInvokeError: {"error_type":"unmarshal_error","message":"unmarshal json failed: content field is required"}

Fix Action

Fix / Workaround

Troubleshooting / Workaround

  • The same model AND the same vllm plugin work successfully when used in a Chatflow with manual tool calling enabled (no error).
  • Disabling streaming (stream: false) on the Parameter Extractor node avoids the error and allows the extraction to complete successfully.
  • This strongly suggests the plugin daemon is unable to handle a streamed chunk that contains tool_calls but no content field (or content: null), which is actually a valid OpenAI-compatible response pattern.

docker-plugin_daemon-1 (relevant snippet):

2026-05-13T01:58:50.807837768Z INFO dify-plugin-daemon middleware.go:83 ... path=/plugin/.../dispatch/llm/invoke status=200

Please advise on whether this is a plugin bug or a Dify core issue that can be patched. A temporary workaround is to disable streaming on the Parameter Extractor, but that is not ideal for production due to increased latency.

Code Example

Error in stream response for plugin {'code': -500, 'message': '{"message":"{\\"error_type\\":\\"unmarshal_error\\",\\"message\\":\\"unmarshal json failed: content field is required\\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
...
core.plugin.impl.exc.PluginInvokeError: req_id: b9eff7bb47 PluginInvokeError: {"error_type":"unmarshal_error","message":"unmarshal json failed: content field is required"}

---

2026-05-13 09:58:50.812 ERROR [Dummy-149] [base.py:313] 5676e3867ae85b1680dee29e1e3fc859 - Error in stream response for plugin {'code': -500, 'message': '{"message":"{\\"error_type\\":\\"unmarshal_error\\",\\"message\\":\\"unmarshal json failed: content field is required\\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
2026-05-13 09:58:50.813 ERROR [Dummy-149] [large_language_model.py:151] 5676e3867ae85b1680dee29e1e3fc859 - Error while consuming non-stream plugin chunk iterator.
...
core.plugin.impl.exc.PluginInvokeError: req_id: b9eff7bb47 PluginInvokeError: {"error_type":"unmarshal_error","message":"unmarshal json failed: content field is required"}
2026-05-13 09:58:50.815 ERROR [Dummy-149] [parameter_extractor_node.py:213] 5676e3867ae85b1680dee29e1e3fc859 - Failed to invoke parameter extractor model

---

2026-05-13T01:58:50.807837768Z INFO dify-plugin-daemon middleware.go:83 ... path=/plugin/.../dispatch/llm/invoke status=200
RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.14.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Steps to Reproduce

  1. Deploy Dify 1.14.0 via docker-compose.
  2. Install the vllm plugin (version 0.2.3 or 0.2.0) and configure it to point to a vLLM backend running Qwen3-14B-GPTQ-Int4.
  3. Create a Chatflow / Workflow, add a Parameter Extractor node.
  4. Configure a few extraction parameters (e.g., name, age).
  5. Provide an instruction and a test query that would naturally trigger a function/tool call (e.g., “My name is John and I am 30 years old”).
  6. Execute the workflow.

✔️ Expected Behavior

The Parameter Extractor successfully calls the model with tool definitions, receives the tool call response, and extracts the parameters. No “content field is required” error.

❌ Actual Behavior

The workflow fails immediately. In the docker-api-1 and docker-plugin_daemon-1 logs we see:

Error in stream response for plugin {'code': -500, 'message': '{"message":"{\\"error_type\\":\\"unmarshal_error\\",\\"message\\":\\"unmarshal json failed: content field is required\\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
...
core.plugin.impl.exc.PluginInvokeError: req_id: b9eff7bb47 PluginInvokeError: {"error_type":"unmarshal_error","message":"unmarshal json failed: content field is required"}

(Full stack trace provided in the attached logs section below.)


Troubleshooting / Workaround

  • The same model AND the same vllm plugin work successfully when used in a Chatflow with manual tool calling enabled (no error).
  • Disabling streaming (stream: false) on the Parameter Extractor node avoids the error and allows the extraction to complete successfully.
  • This strongly suggests the plugin daemon is unable to handle a streamed chunk that contains tool_calls but no content field (or content: null), which is actually a valid OpenAI-compatible response pattern.

Relevant Logs

docker-api-1:

2026-05-13 09:58:50.812 ERROR [Dummy-149] [base.py:313] 5676e3867ae85b1680dee29e1e3fc859 - Error in stream response for plugin {'code': -500, 'message': '{"message":"{\\"error_type\\":\\"unmarshal_error\\",\\"message\\":\\"unmarshal json failed: content field is required\\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
2026-05-13 09:58:50.813 ERROR [Dummy-149] [large_language_model.py:151] 5676e3867ae85b1680dee29e1e3fc859 - Error while consuming non-stream plugin chunk iterator.
...
core.plugin.impl.exc.PluginInvokeError: req_id: b9eff7bb47 PluginInvokeError: {"error_type":"unmarshal_error","message":"unmarshal json failed: content field is required"}
2026-05-13 09:58:50.815 ERROR [Dummy-149] [parameter_extractor_node.py:213] 5676e3867ae85b1680dee29e1e3fc859 - Failed to invoke parameter extractor model

docker-plugin_daemon-1 (relevant snippet):

2026-05-13T01:58:50.807837768Z INFO dify-plugin-daemon middleware.go:83 ... path=/plugin/.../dispatch/llm/invoke status=200

(No additional errors visible on the daemon side besides the 200 status; the unmarshaling happens after the response is passed back to the API.)


Additional Context

  • The vLLM backend itself is capable of function calling; I can trigger tool calls from a raw HTTP request to the vLLM endpoint without issues.
  • The plugin version string is vllm 0.2.3 – this is the Dify plugin version, not the vLLM server version. It appears to be the latest available on the marketplace for the 1.14.x branch.
  • The issue may be related to how vllm plugin packages streamed tool call responses for the Parameter Extractor consumption path.

Proposed Fix / Investigation

  1. Could the vllm plugin be updated to ensure every streamed chunk includes a valid content field (even if empty string) when a tool call is present?
  2. Alternatively, could Dify’s core stream consumer be made tolerant of chunks missing content when tool_calls is present (similar to how it works in normal chat completion streaming)?

Please advise on whether this is a plugin bug or a Dify core issue that can be patched. A temporary workaround is to disable streaming on the Parameter Extractor, but that is not ideal for production due to increased latency.


Thank you!

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

dify - 💡(How to fix) Fix [Plugin vllm 0.2.3] Parameter Extractor fails with “content field is required” when using Qwen3 model with tools [3 comments, 3 participants]