Skip to content

[upstream #103] Terminate streams on exact bare done markers (55515dba) - #105

Merged
woncc merged 1 commit into
mainfrom
codex/r3-0201-issue-103-bare-done
Nov 1, 2026
Merged

woncc merged 1 commit into
mainfrom
codex/r3-0201-issue-103-bare-done

Conversation

@woncc

@woncc woncc commented Nov 1, 2026

Copy link
Copy Markdown

🔗 关联任务 / Related Issue

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix)

📝 变更描述 / Description

从指定基线 154b35e2be56e127dd06ce29d5afe98d99690592 cherry-pick 上游补丁,仅修改 relay/helper/stream_scanner.go 和 relay/helper/stream_scanner_test.go。

先移除可选的 data: 前缀并清理首尾空白,再精确匹配 [DONE]。裸标记正确结束流;data: [DONE]extra 保留为普通数据,裸 [DONE]extra 被忽略。测试覆盖裸标记、空白、带前缀及非精确匹配的七个场景,并检查结束原因和接收计数。

未包含 7e6596728、#81/#82、原生 SSE 大包或 OAuth 变更。此 PR 仅交付待审分支,不执行合入。

📸 运行证明 / Proof of Work

  • GOMAXPROCS=2 go test -count=1 -timeout=120s ./relay/helper -run 'Stream|Done|Scanner' → exit 0,ok github.com/QuantumNous/new-api/relay/helper 2.626s。
  • git diff --check 和 git diff --check HEAD^ HEAD → exit 0,无输出。
  • 父提交核对为指定基线;提交差异仅包含上述两个文件。
  • 无 UI、数据库或认证变更;未进行真实供应商连接测试。

✅ 提交前检查项 / Checklist

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