[Feature Request]: Support DashScope new image-generation protocol (wan2.6/2.7, qwen-image-3.0)
Do you need to file a feature request?
- [ ] I have searched the existing feature request and this feature request is not already filed.
- [ ] I believe this is a legitimate feature request, not just a question or bug.
Feature Request Description
Summary
DashScopeImagegenAdapter only speaks DashScope's legacy text-to-image protocol. Newer Bailian image models (wan2.6-t2i, wan2.7-image, wan2.7-image-pro, qwen-image-3.0) are served by a different endpoint and payload shape, so selecting them in Settings -> Media Generation -> Image Generation fails at request time.
Current behaviour
In deeptutor/services/imagegen/adapters/dashscope.py:
_SUBMIT_PATHis hardcoded toservices/aigc/text2image/image-synthesis- the payload is
{"input": {"prompt": ...}} - results are read from
output.results[].url
Observed failure (1.7.1 Docker image, Bailian key, Beijing region)
| model ID | result on the legacy endpoint |
|---|---|
wan2.7-image |
400 InvalidParameter: url error |
qwen-image-3.0 |
400 InvalidParameter: url error |
wan2.5-t2i-preview |
task SUCCEEDED |
wan2.2-t2i-plus |
task SUCCEEDED |
What the new models expect
- sync:
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation - async:
.../services/aigc/image-generation/generationwithX-DashScope-Async: enable - payload:
{"model": ..., "input": {"messages": [{"role": "user", "content": [{"text": ...}]}]}, "parameters": {...}} - result:
output.choices[].message.content[].image(async polling still usesGET /api/v1/tasks/{id}, unchanged) sizeaccepts1K/2K/W*H;thinking_modedefaults totrue
Proposed change
Branch inside the existing DashScope adapter on the model family, selecting endpoint + payload builder + result extractor. Roughly 40-60 LOC concentrated in 4 spots of one file; the provider registry, settings UI and base_url handling do not need to change (the workspace-specific host is already configurable). Happy to open a PR if maintainers are interested.
Related Module
API/Backend
Use Case
Any user selecting the newest Bailian models in Settings gets a 400 instead of an image and has to fall back to wan2.5 / wan2.2. This blocks wan2.7 features (4K, multi-reference editing) and qwen-image-3.0 typography.
Additional Context
Docs:
- https://help.aliyun.com/zh/model-studio/wan-image-generation-and-editing-api-reference
- https://help.aliyun.com/zh/model-studio/text-to-image-v2-api-reference
I also checked the dev branch: the same file still posts to the legacy path, so this is not fixed upstream yet. The async task polling endpoint is shared between old and new protocols, which keeps the change localized.
I'll take care of this issue in a bit.
Verified resolved in the released code: v1.7.2 (0ef8f0496b6e). Rechecked against the current local dev branch. Closing as fixed.