fix: 解决了 Langfuse 标题模型和 DeepSeek EOF 问题#1296
Open
GggggitHub wants to merge 1 commit into
Open
Conversation
修复 agent-chat 选择 DeepSeek 时标题生成仍回退到 qwen3.5-plus,以及 DeepSeek 流式连接 EOF 未被稳定重试的问题。 根因:标题生成只读取 custom agent 默认模型,忽略本次请求的 summary_model_id;流式上游连接被中断时返回 eof/broken pipe,但重试白名单未覆盖这些瞬时网络错误,底层 raw HTTP 也缺少响应头超时。 改动: - 标题生成优先使用本次请求传入的 summary_model_id,避免选 deepseek-v4-pro 时仍调用 qwen3.5-plus。 - 将 eof、broken pipe、connection reset 纳入 LLM 瞬时错误重试,并为 rawHTTPClient 增加响应头/Expect-Continue 超时。 验证: - gofmt -w internal/handler/session/qa.go internal/agent/const.go internal/models/chat/remote_api.go - go build ./internal/handler/session/... ./internal/agent/... ./internal/models/chat/... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
fix: 解决 Langfuse 标题模型和 DeepSeek EOF 问题
PR Description 可以直接复制下面这版:
Description
修复 agent-chat 选择 DeepSeek 时,异步标题生成仍回退到
qwen3.5-plus,以及 DeepSeek 流式连接 EOF 未被稳定重试的问题。根因:
summary_model_id,导致用户选择deepseek-v4-pro时,标题生成仍可能调用默认的
qwen3.5-plus。eof、broken pipe、connection reset,但这些瞬时网络错误未被重试白名单覆盖。rawHTTPClient缺少响应头超时,部分上游慢失败会拖长请求耗时。改动:
summary_model_id,避免选deepseek-v4-pro时仍调用qwen3.5-plus。eof、broken pipe、connection reset纳入 LLM 瞬时错误重试。rawHTTPClient增加ResponseHeaderTimeout和ExpectContinueTimeout,减少上游连接异常时的慢失败耗时。Type of Change
Related Issue
Fixes #
Testing
已在本地执行以下验证: