Skip to content

fix(ali): route Wan 2.7 image generation with stale sync-model settings - #3

Closed
yi-ge wants to merge 2 commits into
codex/release-rc33from
codex/wan27-image-route-rc33
Closed

yi-ge wants to merge 2 commits into
codex/release-rc33from
codex/wan27-image-route-rc33

Conversation

@yi-ge

@yi-ge yi-ge commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

⚠️ 提交说明 / PR Notice

本 PR 使用 AI 辅助编写;提交者已核对改动和测试结果。此 PR 是 Ali 通道旧设置的防御性修复候选,尚未合并或部署。

🔗 关联任务 / Related Issue

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix)
  • ✨ 新功能 (New feature)
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

📝 变更描述 / Description

当持久化的 qwen.sync_image_models 沿用 Wan 2.7 上线前的列表时,wan2.7-image 和 wan2.7-image-pro 的 /v1/images/generations 请求会被 Ali 适配器送往旧 text2image/image-synthesis 端点,并启用异步头、使用 prompt-only 输入。阿里云官方文档规定这两款模型的同步文生图应走 multimodal-generation/generation,使用 input.messages。

本改动只对这两个精确的上游模型 ID 固定同步图像协议;其他模型继续使用既有可配置列表。它不改数据库或计费,不清除现有设置。补丁登记和 rc.33 候选验收说明已更新。

回归测试证明旧持久化列表在 Ali 通道会造成错误路由;线上 QuantumNous#126 原为 OpenAI 类型,改为阿里百炼类型及 Token Plan 原生 Base URL 后,两款模型已真实出图。因此本 PR 应按独立防御性改动审阅,合并前仍需确认不覆盖运维可配置策略,不能将其视为 QuantumNous#3522 的修复或上线验收。

📸 运行证明 / Proof of Work

  • 在 rc.33 部署源码上,回归用例模拟旧 sync_image_models 列表:修复前两款模型均错误地指向 text2image/image-synthesis,异步头为 enable;修复后指向 multimodal-generation/generation,请求使用 input.messages。
  • go test ./relay/channel/ali -count=1 通过。
  • CI run 36585066381:后端 vet/build/test 与前端 typecheck/test 均通过。
  • 添加渠道groq时代理地址报错 QuantumNous/new-api#126 渠道配置修正后,测试账号直连 napi.desirecore.cc/v1/images/generations 对两款模型均 HTTP 200,返回可下载 PNG;DesireCore GenerateImage(purpose="agent-avatar") 也分别交付透明 PNG。这是在未部署本 PR时通过配置修正取得的结果,不能用来证明本 PR 的生产效果。

✅ 提交前检查项 / Checklist

  • 人工确认: 维护者在合并前审阅本 PR 和线上通道诊断。
  • 非重复提交: 已检查本 fork 的开放 PR,未见相同的 Wan 2.7 图像路由修复。
  • 功能范围: 仅调整 Ali 图像生成路由和关联回归测试、补丁登记。
  • 范围聚焦: 没有修改其他模型或客户端工具。
  • 本地验证: 已运行上述定向测试。
  • 安全合规: 没有提交令牌、签名 URL 或用户图像。

@yi-ge

yi-ge commented Sep 29, 2026

Copy link
Copy Markdown
Member Author

2026-09-29 runtime channel check: the currently enabled priority-21 channel QuantumNous#126 advertising wan2.7-image and wan2.7-image-pro is OpenAI type with base URL https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode and no model mapping. In New API's fixed-channel UI test, selecting Image Generation (/v1/images/generations) returned HTTP 400 url error for each Wan model. Alibaba's Token Plan multimodal documentation requires the separate /api/v1/services/aigc/multimodal-generation/generation API with input.messages. This PR changes only the Ali adaptor and cannot fix the OpenAI QuantumNous#126 route. Keep this PR draft pending the user's planned channel-type change and a live retest; do not merge based on the current online failure alone. The qwen-image-2.0 control test stopped at missing gateway model pricing, so it says nothing about that upstream endpoint. See desirecore/desirecore#3522 for test details.

@yi-ge

yi-ge commented Sep 29, 2026

Copy link
Copy Markdown
Member Author

线上复验更新:desirecore/desirecore#3522 的 400 已通过修正 New API QuantumNous#126 的渠道配置解决。该渠道原为 OpenAI 类型、Base URL 带 /compatible-mode;改为阿里百炼类型及 Token Plan 原生 Base URL 后,两款 Wan 2.7 在固定渠道测试和官方网关直连中都成功返回可下载图片。DesireCore GenerateImage(purpose="agent-avatar") 的两次真实工具调用也都交付 1024×1024 透明 PNG。QuantumNous#3522 已按该故障范围关闭。

这说明本 PR 中“Ali 通道持久化 sync_image_models 旧列表”并非本次已证实的线上根因。补丁的回归测试仍证明该旧列表场景存在潜在错误路由,因此保留 draft 供独立审阅;请不要把合并本 PR 当作 QuantumNous#3522 的必要修复或线上验收。QuantumNous#78 同样切换类型和 Base URL,但用户确认其 Token Plan 套餐未开通,固定测试两模型均 403,故保持禁用。

@yi-ge yi-ge closed this Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant