mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
[openrouter] Error: req_id: 051b3113e5 PluginInvokeError: {"args":{},"error_type":"ChunkedEncodingError","message":"Response ended prematurely"} #579
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 @Vampxgg on GitHub (Aug 22, 2025).
Self Checks
Dify version
1.7.2
Plugin version
openrouter 0.0.17
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
[openrouter] Error: req_id: 051b3113e5 PluginInvokeError: {"args":{},"error_type":"ChunkedEncodingError","message":"Response ended prematurely"}
✔️ Error log
No response
@dosubot[bot] commented on GitHub (Aug 22, 2025):
This error is likely caused by an HTTP streaming issue—where the OpenRouter API response ends before all data is received. This can happen due to network instability, server-side timeouts, or resource constraints in Docker. The OpenRouter plugin itself delegates HTTP response handling to its dependencies and does not directly manage chunked encoding errors, so the root cause is often upstream or environmental1 .
Known issues with OpenRouter plugin versions (0.0.10+) include broken tool invocation and API compatibility problems, especially if deprecated parameters like
functionsorfunction_callare used instead of the updatedtoolsandtool_choicefields required by OpenRouter's API2 3 . Make sure your requests follow the latest OpenRouter API documentation.For Docker setups, plugin communication errors can sometimes be resolved by using
host.docker.internalinstead oflocalhostfor service endpoints, and ensuring services listen on0.0.0.04 . Also, check your Docker resource limits and network stability.If the error persists, try testing with another plugin (like Gemini) to see if the issue is specific to OpenRouter. Some users have found that downgrading the OpenRouter plugin to version 0.0.8 temporarily resolves invocation issues3 5 .
Recent updates in Dify improved error reporting for plugin invocation errors, so you should see more informative error messages in your logs6 . There is ongoing work to improve chunked response handling and file size limits, but these changes are not yet released7 .
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

https://github.com/langgenius/dify-official-plugins/blob/b120688c39bfddf8f68274c4698b7c0d52d9cf3e/models/openrouter/models/llm/llm.py ↩︎
https://github.com/langgenius/dify-official-plugins/issues/971 ↩︎
https://github.com/langgenius/dify-official-plugins/issues/1088 ↩︎
https://github.com/langgenius/dify-official-plugins/issues/918 ↩︎
https://github.com/langgenius/dify/issues/21847 ↩︎
https://github.com/langgenius/dify/pull/22908 ↩︎
https://github.com/langgenius/dify/pull/23692 ↩︎