mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Analyze picture has error using Qwen-omni-7B #433
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 @fanfan-lucky on GitHub (Jul 9, 2025).
Self Checks
Dify version
1.5.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Run failed: [openai_api_compatible] Error: PluginInvokeError: {"args":{"description":"[models] Error: Object of type ImagePromptMessageContent is not JSON serializable"},"error_type":"InvokeError","message":"[models] Error: Object of type ImagePromptMessageContent is not JSON serializable"}
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
@dosubot[bot] commented on GitHub (Jul 9, 2025):
This error happens because the ImagePromptMessageContent object (used for image prompts) isn't being converted to a JSON-serializable format before being sent to the model/plugin. Dify's core code uses Pydantic's model_dump and a custom jsonable_encoder to handle this serialization, so this error usually means that somewhere in the integration (possibly in a plugin or external handler for Qwen-omni-7B), the object is being passed directly to json.dumps or similar without first converting it to a dict or using the encoder.
There is no official Qwen-omni-7B provider in the core Dify repo, so this is likely an issue with a custom or third-party integration. To fix it, ensure that any ImagePromptMessageContent objects are passed through model_dump(), dict(), or Dify's jsonable_encoder before serialization. This will convert them into a format that can be safely serialized to JSON and sent to the model/plugin. You can see how Dify handles this in its plugin invocation code and encoder utility (reference, reference).
If you're using a custom plugin or extension for Qwen-omni-7B, check its code to make sure it serializes prompt messages correctly. If you need a workaround, you can manually convert any ImagePromptMessageContent to a dict before sending it to the plugin or API.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@fanfan-lucky commented on GitHub (Jul 9, 2025):
Already resolved.