Repository navigation
Conversation
Contributor
Author
|
关闭本 PR,让 #8815 的 hosted-item 修复集中在 #8820。 我用双方新增测试交叉检查了 范围差异也已核实:本 PR 额外覆盖的 done-only 文本、reasoning 及 AI 辅助本地复核,Go 1.27.4/macOS arm64,合成 HTTP/SSE;本轮未运行真实 provider 或全后端。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8815.
非流式
/v1/messages使用强制流式的 Responses 上游。当 Codex OAuth 只在response.output_item.done给出完整输出、终态的output为空时,原读取器只累加文本和函数参数,搜索的server_tool_use/web_search_tool_result块因此消失。本次在共享缓冲读取器中复用原生 Responses 已有的
responsesStreamOutputItems:按output_index收集和去重完整 done item,在终态output为空时优先恢复,再沿用现有 delta 补全。普通终态、失败处理与用量解析沿用现有流程。恢复也保留 reasoning 的encrypted_content和仅通过 done item 返回的文本。#8803 负责搜索结果的 sources 内容,本次恢复搜索块沿用当前 main 的内容转换。回归通过真实 Messages/Chat 转发和共享读取器覆盖 OAuth/API Key、重复/乱序 done item、SSE event-only type、EOF 最后一帧以及非空终态优先级。未改产品源码的
main@530c5e3a4f上 7 个叶子场景失败、1 个控制通过;修复后 focused 通过。完整验证使用 Go 1.27.4 / macOS arm64:
go test -p=1 -tags=unit ./... -json -count=1:26,889 pass / 41 条件 skip(测试和子用例)。go test -p=1 -tags=integration ./... -json -count=1:16,143 pass / 16 条件 skip;测试容器实际运行 PostgreSQL 18.1 与 Redis 8.4,已正常释放。golangci-lint v2.14.0 run --timeout=30m --concurrency=2 ./...:0 issues。gofmt、git diff --check通过。AI agent(Codex)完成源码核对、实现和本地验证。测试使用合成 HTTP/SSE;未调用真实 provider。
发布时的首轮上游
backend-security因main固定的 Go 1.27.3 命中 GO-2026-6859 而失败;日志列出修复版本为 Go 1.27.4。共享工具链升级 #8767 尚未合入,其安全检查已通过。