Repository navigation
fix: 在聊天中显示 Responses 思考摘要 - #315
Merged
Merged
Conversation
现象 Codex 经兼容配置使用 Responses 接口时,模型返回思考摘要,聊天中的思考区和历史回放没有显示。 根因 流式与回放只识别 reasoning_content 和 thinking 块,兼容配置保留的 Responses 原生 reasoning.summary 未进入展示管道。 修复 统一读取当前和旧版 Responses 的摘要文本。实时发到现有思考区,历史复用同样的提取逻辑。原生摘要与桥接字段同时存在时只展示一次。 验证 原生和旧版回放用例在旧实现失败。修复后真实 SDK 读取模拟 SSE,验证两种配置均产生完整思考区事件。Chromium 验证实时和刷新后显示。相关测试 154 项和 Ruff 通过。
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
现象
Responses 接口返回的思考摘要,在部分 OpenAI 兼容配置下未显示。刷新后,原生摘要已经落盘的历史回复也没有思考区。
根因
SDK 将
response.reasoning_summary_text.delta转换为reasoning.summary内容块。Ginno 的通用实时和回放路径读取thinking与reasoning_content,绕过了没有额外桥接过的摘要块。修复
additional_kwargs.reasoning。验证