Skip to content

Merge upstream/main while preserving fork customizations - #24

Merged
Nanako1900 merged 3 commits into
mainfrom
claude/sync-upstream-2026-11-11
Nov 11, 2026
Merged

Nanako1900 merged 3 commits into
mainfrom
claude/sync-upstream-2026-11-11

Conversation

@Nanako1900

Copy link
Copy Markdown
Owner

Agent

  • Tool: Claude Code
  • Tool version: 2.1.319
  • Model (full id): claude-opus-5-5
  • Host (CLI / IDE / GitHub coding agent / other): Claude 桌面版(Code 标签页)
  • Date (UTC): 2026-11-11

本 PR 的合并冲突由 AI 辅助解决(提交者不是 new-api 的历史核心开发者)。

Links

User request

  • Verbatim:「查看一下能不能合并和开PR」(附 GitHub「Sync fork」提示截图:领先上游 147 个提交、落后 2 个,并有冲突)
  • Later constraints or corrections from the user:无。

Out of scope — refuse

  • Matched: no
  • If yes, what was told to the user: 不适用

Open gate — do not open unless all are satisfied

  • Out of scope (including pass-through-only forwarding): no
  • Usage / configuration / integration (answered instead of opening): no
  • Required issue facts present without invention: yes
  • Verification is actual commands or steps and observed results, not only go build or tests passed: yes
  • Body is short and factual; no unfiltered AI-generated text: yes
  • Open: yes
  • If no, what was told to the user: 不适用

Kind

  • Bug fix
  • New feature
  • Performance / refactor
  • Docs
  • Other: 同步上游

Issue facts

  • Actual behavior:分叉 main 落后上游 2 个提交,GitHub 的「Sync fork」提示有冲突,只给「Discard 147 commits」选项。
  • Impact:不同步就拿不到上游的易支付 RSA 签名和 DeepSeek developer 角色修复。
  • Frequency:不适用。
  • Evidence that the problem is in new-api rather than the client or upstream:不适用。
  • Applicable types and their fields:

Change

  • 合并 upstream/main(579573ac)到分叉 main(3e6a2ea4)。
  • 冲突只在 7 个语言文件 web/src/i18n/locales/*.json,都是两边在相邻位置各自加了键:
    • 两边新增的键全部保留,按键名排序。
    • Playground 两边都改了值,保留分叉的「在线体验 / 線上體驗」,不用上游的「游乐场 / 遊樂場」。
    • 分叉之前删掉的 Turnstile、密码重置等键(如 929b05b 改用极验)在合并后仍是删除状态,和分叉一致。
  • 代码文件没有冲突。

Research

Duplicate / prior art

  • Search queries (issues, PRs):本分叉仓库上一次同步是 660fb3f(Merge upstream/main while preserving fork customizations)。
  • What already existed and why this is not a duplicate:那次之后上游又新增了 2 个提交。

Docs and code

  • https://docs.newapi.ai/ 、https://deepwiki.com/QuantumNous/new-api :未查阅,本 PR 只是合并上游提交。
  • Code paths and what they imply for this change:用脚本核对了每个语言文件的键:分叉 main 的键全部还在;上游有、合并结果没有的,只有合并基点 bd6bb53 里就有、后来被分叉删掉的键。

Alternatives considered

  • Option A:在 GitHub 上点「Discard 147 commits」。会丢掉分叉的全部改动,不可行。
  • Option B:本地合并后解决冲突,开 PR。
  • Why this approach:保留分叉改动,冲突解决过程可以审查。

Files

Path Why
web/src/i18n/locales/{en,fr,ja,ru,vi,zh,zh-TW}.json 手动解决的冲突
其余 15 个文件 上游 QuantumNous#8291、QuantumNous#8287 的原样改动,自动合并

Behavior

  • Before:分叉落后上游 2 个提交。
  • After:领先上游 148 个提交(含本合并提交)、落后 0 个;系统设置里可以选易支付签名方式。
  • Explicit non-goals / leftover work:没有改上游代码。

Verification

  • Commands and results:
    • go build -o /tmp/newapi-sync-check .(临时放一个 web/dist/index.html 满足 embed,构建后已删除):成功。
    • go vet ./controller/ ./relay/channel/deepseek/ ./setting/operation_setting/ ./model/:无输出。
    • go test ./controller/ ./relay/channel/deepseek/ ./setting/operation_setting/ ./model/:全部 ok。
    • bunx vitest run src/features/system-settings src/features/home src/i18n(在 web/):39 个文件、357 个测试全部通过,包括上游新增的 epay-sign-settings.test.tsx。
    • bunx -p typescript tsc -b(在 web/):退出码 0。
    • 7 个语言文件:Python 解析 JSON 成功,没有重复键。
  • Manual steps and observed result:没有启动服务手动点易支付设置。
  • UI: screenshot or recording (or why none):无。
  • Tests added or updated, or why none:无,测试来自上游。
  • Databases / providers / platforms exercised:model 包测试只用 SQLite;没有跑 MySQL、PostgreSQL。上游 feat(payment): 易支付支持 RSA 签名方式 QuantumNous/new-api#8291 在 model/option.go 只加了保存设置前的签名配置校验,没有改表结构。
  • Not verified:MySQL / PostgreSQL;真实易支付回调。

Risks

  • Failure modes:语言文件的 Playground 选了分叉的译法;如果想要上游的译法需要再改。
  • Billing / quota / auth impact:易支付多了 RSA 签名方式;没保存过签名方式的站点默认 MD5,升级后行为不变(见 payment_setting.go)。没有改计费。
  • Follow-ups:无。

Scope check

  • Single focused change: yes
  • Secrets included: no
  • Out of scope (Coding Plan / reverse-engineered channel / third-party wrapper / Codex / pass-through-only forwarding): no

🤖 Generated with Claude Code

seefs001 and others added 3 commits November 10, 2026 21:44
…ntumNous#8287)

DeepSeek Chat Completions rejects the developer role. Rewrite developer messages as system messages before sending them upstream; the Responses API accepts developer and is left unchanged.
* feat(payment): 易支付支持 RSA 签名方式

支付设置新增「签名方式」,可在 MD5 与 RSA 之间二选一。默认 MD5,已配置 MD5 的站点升级后行为不变。

- RSA 模式用商户私钥签名下单请求,跳转 /api/pay/submit;充值和订阅回调用平台公钥验签,MD5 签名的回调会被拒绝
- 保存时校验密钥:RSA 生效期间商户私钥和平台公钥必须能解析,切换到 RSA 前要先保存两把密钥;读取设置时不返回密钥
- 设置页选择 MD5 时只显示商户密钥,选择 RSA 时显示商户私钥和平台公钥;七种语言补齐文案
- go-epay 升级到 v0.0.6

* refactor(payment): 易支付签名设置改用 payment_setting 注册配置

签名方式、商户私钥、平台公钥改为 PaymentSetting 的字段,键名为 payment_setting.epay_sign_type、payment_setting.epay_merchant_private_key、payment_setting.epay_platform_public_key,由配置管理器统一加载和保存,不再在 option.go 里逐项初始化和赋值。

- 保存校验移到 operation_setting.ValidateEpaySignOption,规则不变
- 读取设置时不返回以 private_key 结尾的配置项;平台公钥可以正常显示和修改
Brings in EPay RSA signing (QuantumNous#8291) and the DeepSeek developer-role
mapping (QuantumNous#8287). The only conflicts were in the seven frontend locale
files, where both sides added keys next to each other: every key from
both sides is kept, and the fork's "Playground" wording (在线体验 /
線上體驗) wins over upstream's 游乐场 / 遊樂場.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Nanako1900
Nanako1900 merged commit 36ea89b into main Nov 11, 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.

3 participants