litellm - 💡(How to fix) Fix [Feature]: Add native DashScope / Alibaba Cloud image generation support for Qwen-Image and Wan models

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Please add native image generation support for Alibaba Cloud DashScope / Model Studio image models, including Qwen-Image and Wan text-to-image models, in LiteLLM's /v1/images/generations endpoint.

This is related to the previous issue:

However, that issue was closed without actually adding native DashScope image generation support. The underlying issue still exists: LiteLLM currently does not have a DashScope image generation provider adapter.

Official Alibaba Cloud documentation:

https://www.alibabacloud.com/help/zh/model-studio/text-to-image?spm=a2c63.p38356.help-menu-2400256.d_0_3_2_0.43d27032PZcjYN#2e3d0267bdazi

Alibaba Cloud Model Studio provides image generation models such as:

  • qwen-image
  • qwen-image-plus
  • qwen-image-max
  • qwen-image-2.0-pro
  • Wan text-to-image models

These models are available through DashScope native APIs, but they currently cannot be used cleanly through LiteLLM's OpenAI-compatible /v1/images/generations endpoint.


Error Message

Got this error

Root Cause

However, that issue was closed without implementing native DashScope image generation support. The problem is broader than a missing model name such as qwen-image-2.0-pro. DashScope image generation requires a native provider adapter because Alibaba Cloud image models are exposed through DashScope native APIs, not through the OpenAI-compatible /images/generations endpoint.

Code Example

https://dashscope.aliyuncs.com/compatible-mode/v1/images/generations

---

model_list:
  - model_name: qwen-image
    litellm_params:
      model: openai/qwen-image
      api_key: os.environ/DASHSCOPE_API_KEY
      api_base: https://dashscope.aliyuncs.com/compatible-mode/v1
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

The Feature

Summary

Please add native image generation support for Alibaba Cloud DashScope / Model Studio image models, including Qwen-Image and Wan text-to-image models, in LiteLLM's /v1/images/generations endpoint.

This is related to the previous issue:

However, that issue was closed without actually adding native DashScope image generation support. The underlying issue still exists: LiteLLM currently does not have a DashScope image generation provider adapter.

Official Alibaba Cloud documentation:

https://www.alibabacloud.com/help/zh/model-studio/text-to-image?spm=a2c63.p38356.help-menu-2400256.d_0_3_2_0.43d27032PZcjYN#2e3d0267bdazi

Alibaba Cloud Model Studio provides image generation models such as:

  • qwen-image
  • qwen-image-plus
  • qwen-image-max
  • qwen-image-2.0-pro
  • Wan text-to-image models

These models are available through DashScope native APIs, but they currently cannot be used cleanly through LiteLLM's OpenAI-compatible /v1/images/generations endpoint.


Why this is not solved by the previous issue

Issue #25319 was about qwen-image-2.0-pro not being supported by LiteLLM.

However, the problem is broader than a missing model name.

The actual issue is that DashScope image generation models do not appear to be available through the OpenAI-compatible endpoint:

https://dashscope.aliyuncs.com/compatible-mode/v1/images/generations

Motivation, pitch

Motivation, pitch

We deploy LiteLLM in China and use Alibaba Cloud DashScope / Model Studio as one of our main model providers.

Chat models work with the existing DashScope provider, and embedding models can be integrated through DashScope OpenAI-compatible mode. However, image generation models such as Qwen-Image and Wan text-to-image models cannot currently be used through LiteLLM's OpenAI-compatible /v1/images/generations endpoint.

This is related to the previous issue:

https://github.com/BerriAI/litellm/issues/25319

However, that issue was closed without implementing native DashScope image generation support. The problem is broader than a missing model name such as qwen-image-2.0-pro. DashScope image generation requires a native provider adapter because Alibaba Cloud image models are exposed through DashScope native APIs, not through the OpenAI-compatible /images/generations endpoint.

Official Alibaba Cloud documentation:

https://www.alibabacloud.com/help/zh/model-studio/text-to-image?spm=a2c63.p38356.help-menu-2400256.d_0_3_2_0.43d27032PZcjYN#2e3d0267bdazi

What I tested

1. Using DashScope OpenAI-compatible mode

LiteLLM config:

model_list:
  - model_name: qwen-image
    litellm_params:
      model: openai/qwen-image
      api_key: os.environ/DASHSCOPE_API_KEY
      api_base: https://dashscope.aliyuncs.com/compatible-mode/v1

Got this error

<img width="1116" height="98" alt="Image" src="https://github.com/user-attachments/assets/7f894c68-ee1c-495a-ae35-a3de51319439" />

What part of LiteLLM is this about?

Proxy

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

Yes

Twitter / LinkedIn details

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Feature]: Add native DashScope / Alibaba Cloud image generation support for Qwen-Image and Wan models