Conversation
ciko5450
marked this pull request as ready for review
July 14, 2026 08:59
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.
改动
chat/completions增加stream=true请求,解析 SSE 和逐行 JSON 数据。POST /api/chat/stream,通过ready、segment、done、errorSSE 事件逐段显示,等待期间每 10 秒保活。/api/chatJSON 接口保持兼容;图片或不适合流式处理的手机请求自动回退完整回复。用户影响
普通聊天不再等待整段模型输出完成。桌面端和手机网页都会在第一个完整句段生成后立即展示,后续句段继续进入同一回复序列。
验证
node --checkgit diff --check与敏感信息扫描通过兼容性与风险
没有持久化配置格式变化。不支持流式的供应商会自动回退原有完整 Agent 请求。fast path 使用保守规则排除可能需要工具或媒体处理的消息。手机浏览器断开连接后,宿主已经开始的回合仍会完成并写入历史,避免产生半条历史,但可能继续消耗当前一次模型请求。