Skip to content

fix(plugins/alibaba): keep upstream metadata in openai_image render - #7507

Merged
Calcium-Ion merged 1 commit into
QuantumNous:mainfrom
feitianbubu:fix/ali-image-metadata
Sep 21, 2026
Merged

Calcium-Ion merged 1 commit into
QuantumNous:mainfrom
feitianbubu:fix/ali-image-metadata

Conversation

@feitianbubu

@feitianbubu feitianbubu commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

🚀 变更类型 / Type of change

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

📝 变更描述 / Description

加回 metadata

alibaba 插件 openai_image.render 补回 metadata,和 rc.38 响应兼容。插件版本 1.4.0 → 1.4.1。

📸 运行证明 / Proof of Work

image

✅ 提交前检查项 / Checklist

  • 人工确认: 无论描述是否由 AI 生成,我已审阅并精炼全文,仅保留可复核的要点,并声明对其准确性与完整性负责。PR 正文及后续评论均未直接粘贴未经人工过滤的大段 AI 文本。
  • 非重复提交: 我已搜索现有的 Issues 与 PRs,确认不是重复提交。
  • 新功能关联 Issue: 若此 PR 标记为 New feature,我已关联对应 Issue;若尚无 Issue,我已先自行创建。
  • 事前沟通: 若改动较大或涉及方向性变更,已在关联 Issue 中与维护者沟通并达成一致。
  • 功能范围: 本 PR 不是 Coding Plan、逆向渠道、第三方封装接口,也不是对 Codex 渠道类型的改动。
  • 非透传: 本 PR 不是针对开启透传后的转发行为;透传会直接发送内容,不会经过 new-api 的逻辑处理。
  • 范围聚焦: 本 PR 为一项聚焦改动,未包含无关代码。
  • 本地验证: 已按变更路径实际验证,并写明命令与观察结果。仅声明 go build 通过或测试通过,不视为有效证明。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 9dfee0a1-a3dc-46fc-8fe3-b4fd774dc03c

📥 Commits

Reviewing files that changed from the base of the PR and between 9c293e8 and 0836306.

📒 Files selected for processing (2)
  • plugins/alibaba_responses_test.go
  • plugins/tasks/alibaba/plugin.js

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


Walkthrough

The Alibaba OpenAI image renderer now returns task artifact metadata. The plugin version changes to 1.4.1. A test verifies that the rendered metadata retains an image count of 2.

Changes

Alibaba image metadata

Layer / File(s) Summary
Render metadata and validation
plugins/tasks/alibaba/plugin.js, plugins/alibaba_responses_test.go
The renderer adds artifactData(task) as response metadata. The plugin version changes from 1.4.0 to 1.4.1. The test verifies metadata.usage.image_count equals 2.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: calcium-ion

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preserving upstream metadata in the Alibaba openai_image render output.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the image stream,
Metadata now joins the dream.
Two bright images safely count,
In the response they now appear.
The plugin hops to version four-one,
And tests confirm the work is done.

Comment @coderabbitai help to get the list of available commands.

@Calcium-Ion
Calcium-Ion merged commit 474ed66 into QuantumNous:main Sep 21, 2026
3 checks passed
GuDong2003 pushed a commit to GuDong2003/new-api that referenced this pull request Sep 25, 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.

2 participants