mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
modelscope: does not support image as an input, and response_format changes #707
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 @KylinAnn on GitHub (Oct 12, 2025).
Self Checks
Dify version
v1.9.1
Plugin version
0.0.7
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
In this workflow, the 1st joint is for uploading files, and the second is calling modelscope (Qwen3-VL) to understand the images.
It's working at first, and not working at around 10.11 16:30:00 Beijing time, which showed "Invalid value: image. Supported values are: 'text','image_url','video_url' and 'video'.",
And this morning(13th Oct), new error occurs.
[modelscope] Error: req_id: 11b241d317 PluginInvokeError: {"args":{"description":"[models] Error: Error code: 400 - {'error': {'code': 'invalid_parameter_error', 'message': "\u003c400\u003e InternalError.Algo.InvalidParameter: Unknown format of response_format, response_format should be a dict, includes 'type' and an optional key 'json_schema'. The response_format type from user is \u003cclass 'str'\u003e.", 'param': None, 'type': 'invalid_request_error'}, 'request_id': '715ccda2-52ca-4454-9af0-c75f93a7fade'}"},"error_type":"InvokeError","message":"[models] Error: Error code: 400 - {'error': {'code': 'invalid_parameter_error', 'message': "\u003c400\u003e InternalError.Algo.InvalidParameter: Unknown format of response_format, response_format should be a dict, includes 'type' and an optional key 'json_schema'. The response_format type from user is \u003cclass 'str'\u003e.", 'param': None, 'type': 'invalid_request_error'}, 'request_id': '715ccda2-52ca-4454-9af0-c75f93a7fade'}"}
✔️ Error log
No response
@dosubot[bot] commented on GitHub (Oct 12, 2025):
Hi @KylinAnn! I'm Dosu and I’m helping the dify-official-plugins team.
This issue is caused by recent changes in the modelscope plugin and the upstream model API. The Qwen3-VL models now require image inputs to be provided as
"image_url"(either a URL or base64 data), not as"image"type. Supplying"image"will trigger a validation error.For the
response_formatparameter, the API now expects a dictionary with at least a"type"key (and optionally"json_schema"), not a simple string. If you send a string, you'll get a 400 error about invalid parameter format. This change was introduced in a recent update to the plugin and model configs, as seen in PR #1775.To fix your workflow:
"image_url"type before sending to the model.response_formatas a dict, e.g.{"type": "json_object"}or{"type": "text"}as required by your use case.These requirements match the errors you're seeing and are due to recent plugin and API changes. If your workflow or plugin code still uses the old formats, you'll need to update them to match the new expectations.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@KylinAnn commented on GitHub (Oct 16, 2025):
Need more precise instruct.
I have converted an image into base64 format outside the workflow, and pass the base64 into LLM.
However, the input would be too long, exceeding the model's max context length.
[openai_api_compatible] Error: req_id: ac9150d2b5 PluginInvokeError: {"args":{"description":"[models] Error: API request failed with status code 400: {"error":{"message":"This model's maximum context length is 65536 tokens. However, your request has 382084 input tokens. Please reduce the length of the input messages. None","type":"BadRequestError","param":null,"code":400}}"},"error_type":"InvokeError","message":"[models] Error: API request failed with status code 400: {"error":{"message":"This model's maximum context length is 65536 tokens. However, your request has 382084 input tokens. Please reduce the length of the input messages. None","type":"BadRequestError","param":null,"code":400}}"}
@dosubot[bot] commented on GitHub (Oct 16, 2025):
Passing large base64-encoded images directly to the LLM will quickly exceed the model's context length, causing errors like the one you saw. The recommended approach is to upload your image to a public location (such as S3, Google Drive, or any web-accessible storage), then pass the direct image URL to the model as an
"image_url"type input. This keeps your payload small and avoids context length issues.The correct input structure for the modelscope plugin is:
If you must use base64, only do so for very small images, as the token count grows rapidly. For most workflows, uploading the image and passing its URL is the best practice. The plugin does not provide automatic upload or URL generation, so this step needs to be handled outside the workflow or by a custom node.
Reference: modelscope plugin code handling image_url inputs.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
