Summary
When using bikeread/dify_wechat_plugin with Dify Service API and a streaming-only model such as qwen3.5-flash, the plugin may return AI did not give a reply for follow-up text messages.
Image handling also has a fallback gap: if WeChat media_id download fails because the server IP is not in the WeChat whitelist, the plugin should still process the image reliably by downloading pic_url itself and uploading it to Dify as local_file.
There is also a conversation recovery issue: if a cached conversation_id becomes stale, Dify returns Conversation Not Exists, and the plugin should clear the cached conversation and retry automatically.
Reproduction
- Install and configure the WeChat plugin with a Dify chat app.
- Configure the plugin to call Dify through Service API.
- Use a streaming-only model such as
qwen3.5-flash.
- Send an image to the public account.
- Send a follow-up text such as
这是什么.
Actual Behavior
- The image request may succeed, but the follow-up text can return
AI did not give a reply.
- If a cached conversation is stale, Dify returns
Conversation Not Exists.
- If WeChat media API access is blocked by IP whitelist, the plugin cannot fetch
media_id directly.
Relevant errors observed locally:
This model only supports incremental_output set to True.
Conversation Not Exists
invalid ip xxx.xxx.xxx.xxx, not in whitelist
Expected Behavior
- Text requests should work with streaming-only models.
- If
media_id fetch fails, image requests should still work by downloading pic_url and uploading it to Dify as local_file.
- If a cached conversation becomes stale, the plugin should clear it and retry once automatically.
Root Cause
- Service API text requests use
response_mode=blocking, which breaks on models that require incremental output.
- When
media_id fetch fails, the current fallback is fragile.
- Cached stale
conversation_id is not always auto-recovered.
Suggested Fix
- Always use
response_mode=streaming for Service API chat requests.
- Parse SSE responses for both text and image requests.
- If Dify returns
Conversation Not Exists, clear cached conversation and retry once.
- If WeChat
media_id fetch fails, download pic_url inside the plugin and upload it to Dify /files/upload, then send it as local_file.
- Keep
remote_url only as the last fallback.
Notes
I already verified this locally with qwen3.5-flash and Dify Service API. If needed, I can open a PR with the exact patch.
Summary
When using
bikeread/dify_wechat_pluginwith Dify Service API and a streaming-only model such asqwen3.5-flash, the plugin may returnAI did not give a replyfor follow-up text messages.Image handling also has a fallback gap: if WeChat
media_iddownload fails because the server IP is not in the WeChat whitelist, the plugin should still process the image reliably by downloadingpic_urlitself and uploading it to Dify aslocal_file.There is also a conversation recovery issue: if a cached
conversation_idbecomes stale, Dify returnsConversation Not Exists, and the plugin should clear the cached conversation and retry automatically.Reproduction
qwen3.5-flash.这是什么.Actual Behavior
AI did not give a reply.Conversation Not Exists.media_iddirectly.Relevant errors observed locally:
Expected Behavior
media_idfetch fails, image requests should still work by downloadingpic_urland uploading it to Dify aslocal_file.Root Cause
response_mode=blocking, which breaks on models that require incremental output.media_idfetch fails, the current fallback is fragile.conversation_idis not always auto-recovered.Suggested Fix
response_mode=streamingfor Service API chat requests.Conversation Not Exists, clear cached conversation and retry once.media_idfetch fails, downloadpic_urlinside the plugin and upload it to Dify/files/upload, then send it aslocal_file.remote_urlonly as the last fallback.Notes
I already verified this locally with
qwen3.5-flashand Dify Service API. If needed, I can open a PR with the exact patch.