CherryHQ/cherry-studio · error · Error
Unsupported DashScope image model: ${descriptor.id}
Error message
Unsupported DashScope image model: ${descriptor.id} What it means
Thrown by `buildRequestBody` in the DashScope transport when a model descriptor's `id` matches none of the hardcoded `case` branches. The transport dispatches the request body shape per model id (text2image, chat-like, wanx-v1, i2i, mt-image, imageedit); an unknown id means the transport has no body builder for it and cannot form a valid request.
Source
Thrown at src/main/ai/provider/custom/dashscope/dashscopeTransport.ts:364
case 'wan2.7-image':
case 'wan2.7-image-pro':
return buildChatLikeBody(input, bag)
case 'qwen-image':
case 'qwen-image-plus':
case 'wanx2.1-t2i-turbo':
case 'wanx2.1-t2i-plus':
case 'wanx2.0-t2i-turbo':
return buildText2ImageBody(input, bag)
case 'wanx-v1':
return buildWanxV1Body(input, bag)
case 'wan2.5-i2i-preview':
return buildWan25I2IBody(input, bag)
case 'qwen-mt-image':
return buildQwenMtImageBody(input, bag)
case 'wanx2.1-imageedit':
return buildWanxImageEditBody(input, bag)
default:
throw new Error(`Unsupported DashScope image model: ${descriptor.id}`)
}
}
class DashScopeTransport implements ImageGenerationTransport {
private apiKey: string
private baseURL: string
private pendingDescriptors = new Map<string, DashScopeModelDescriptor>()
constructor(settings: DashScopeTransportSettings) {
this.apiKey = settings.apiKey
this.baseURL = settings.imageBaseURL || DEFAULT_DASHSCOPE_IMAGE_BASE_URL
}
async submit(input: ImageGenerationSubmitInput): Promise<{ taskId?: string; imageUrls?: string[] }> {
const descriptor = input.modelDescriptor
if (!descriptor) {
throw new Error(`Missing modelDescriptor for DashScope model: ${input.modelId}`)
}View on GitHub (pinned to 726446b54c)
Solutions
- Add the model id to the matching `case` branch in `buildRequestBody` (dashscopeTransport.ts) using the correct body builder.
- Confirm the registry's `vendorTransport` carries the canonical wire id — aliases should map to it before reaching the transport.
- If the model is genuinely unsupported, prevent it from being routed to the DashScope transport upstream.
Example fix
// before (model 'wanx3.0-t2i' hits default and throws) // after — add to the text2image family case 'wanx2.1-t2i-turbo': case 'wanx2.1-t2i-plus': case 'wanx2.0-t2i-turbo': case 'wanx3.0-t2i': return buildText2ImageBody(input, bag)
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_DASHSCOPE_IMAGE_MODELS = new Set([
'z-image-turbo', 'qwen-image-edit', 'qwen-image-edit-plus',
'wan2.6-image', 'wan2.7-image', 'wan2.7-image-pro',
'qwen-image', 'qwen-image-plus',
'wanx2.1-t2i-turbo', 'wanx2.1-t2i-plus', 'wanx2.0-t2i-turbo',
'wanx-v1', 'wan2.5-i2i-preview', 'qwen-mt-image', 'wanx2.1-imageedit'
])
if (!SUPPORTED_DASHSCOPE_IMAGE_MODELS.has(descriptor.id)) {
throw new Error(`Model ${descriptor.id} has no DashScope body builder — add it to the registry and the transport switch`)
} Type guard
const isSupportedDashScopeImageModel = (id: string): boolean => SUPPORTED_DASHSCOPE_IMAGE_MODELS.has(id)
Prevention
- Keep the transport switch and the registry model list in sync (one source of truth)
- Add a test enumerating registry image models against the switch
- Route unsupported models away from the DashScope transport in the pipeline
When it happens
Trigger: A DashScope image model whose registry id is not listed in the switch (e.g. a newly released model not yet added, or a mistyped/renamed id). The descriptor is injected from the registry's `vendorTransport`, so the registry id and the switch must stay in sync.
Common situations: DashScope shipped a new image model and the registry was updated but the transport switch was not; a custom/aliased model id diverges from the canonical wire id; a test used a placeholder id.
Related errors
- OpenAI-compatible reranking model only supports text documen
- Rerank response must contain a results array
- Rerank response results must be objects
- Rerank response results must contain numeric index and relev
- Failed to generate image: ${error.message}
AI-assisted analysis of CherryHQ/cherry-studio@726446b54c (2026-08-12).
Data as JSON: /api/errors/fc31f4cb49511230.
Report an issue: GitHub.