npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mackwan84/dsh-image-dashscope

v0.3.0

Published

阿里云百炼图像生成 Provider:qwen-image 3.0 与 Wan 2.7 系列的文生图、参考图 I2I 和异步任务调用

Readme

@mackwan84/dsh-image-dashscope

English

阿里云百炼图像生成 Provider,实现 @mackwan84/dsh-imageImageGenerationService

  • qwen-image 3.0 系列/api/v1/services/aigc/image-generation/generation 异步任务(input.messages 结构,本 Provider 支持单张参考图的 I2I 风格一致);
  • Wan 2.7 系列:同一新版异步端点与 input.messages 结构,仅支持 wan2.7-image / wan2.7-image-pro,支持文生图与单参考图 I2I;
  • 任务轮询、限流自动退避重试Throttling.RateQuota → 25s × 2)、AbortSignal 取消;
  • 凭据解析:ctx.credentials seam → 启动环境(.env/进程环境)→ MISSING_CREDENTIAL
  • 凭据请求 redirect: 'error'(凭据不跟随重定向)。

配置(cordis.yml config 块)

| 键 | 默认 | 说明 | | -------------------- | -------------------------------- | ---------------------- | | apiKey | DASHSCOPE_API_KEY | 凭据引用(环境变量名) | | baseUrl | https://dashscope.aliyuncs.com | 网关(国内) | | wireframeModel | qwen-image-3.0 | 线框图模型 | | highFidelityModel | qwen-image-3.0-pro | 高保真模型 | | pollTimeoutMs | 600000 | 轮询总时限 | | pollIntervalMs | 5000 | 轮询间隔 | | rateLimitRetries | 2 | 限流重试次数 | | rateLimitBackoffMs | 25000 | 限流退避间隔 |

Model Experience

本包无模型可见内容;错误以 ImageProviderError.code 区分可重试、限流、凭据与参数问题。 创建或轮询阶段的 401/InvalidApiKeyMISSING_CREDENTIAL;连接中断等 fetch 传输失败(undici 统一抛 TypeError)→ NETWORK_ERROR;调用方主动取消保持原始取消错误,不误报为网络失败;非传输类异常(如编程错误)也原样上抛。

Wan 2.7 尺寸

  • Web 缺省 2048*1152,Mobile 缺省 1152*2048
  • wan2.7-image 支持 1K/2K 或官方像素合法域,不支持 4K;
  • wan2.7-image-pro 仅在纯文生图允许 4K,参考图 I2I 最高 2K;
  • n 统一钳制为 1~4;不启用组图模式;
  • Wan 2.2/2.6、wanx 与未知模型在本地返回 INVALID_PARAMETER,不会猜测旧端点。

Known Limitations

  • edit(指令编辑/掩码局部重绘)为 NOT_IMPLEMENTED:百炼编辑链路尚未在本仓实测; 编辑模式当前请启用火山方舟 Provider(@mackwan84/dsh-image-volcengine,Seedream 5.0 Pro);
  • 参考图模式支持 qwen-image 与 Wan 2.7;当前 data URL 链路以生成资产 PNG 为正式回归基线;
  • reference 路径会被限制在 cwd(缺省为进程工作目录)之内,逃逸路径直接以 INVALID_PARAMETER 拒绝。