Repository navigation
refactor(models): 统一模型错误分类与重试边界 - #6047
Merged
Merged
Conversation
added 8 commits
October 12, 2026 20:07
撤回全局错误分类和无关 API 扩张,使本次改造仅聚焦 VLM 重试职责收拢。
将重试决策集中到 RetryEmbedder,避免 Provider 与 SDK 重试叠乘,同时保持组合模型和账号资源语义。
保留主线统一重试包装器,并接入结构化模型错误分类边界。
qin-ctx
requested changes
Oct 14, 2026
qin-ctx
left a comment
Collaborator
There was a problem hiding this comment.
统一 Provider 错误边界的方向合理,但当前分类会影响已有的备用模型切换和账户熔断语义。已用真实 OpenAI SDK 配合模拟 HTTP 响应,对比 base 与当前提交,确认两项回归:主模型返回 model_not_found 时不再尝试健康的备用模型;输入过长的 HTTP 500 响应被作为服务故障重试并累计到账户熔断。两项具体问题已分别标在代码行上,需要在合并前解决。
added 2 commits
October 14, 2026 20:25
直接基于 ModelErrorKind 驱动重试、凭证切换与熔断策略,确保模型不存在时切换备用配置,并优先解析 Provider 结构化业务错误。
保留主线中的快速损坏 ZIP 错误断言,并删除慢速套件中的重复用例。
11 of 20 tasks
qin-ctx
approved these changes
Oct 15, 2026
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.
Description
统一 VLM 与 Embedding Provider 的错误分类和重试边界,使用结构化
ModelError替代基于错误消息关键词的重试判断。每层仅处理自身负责的错误;未处理或恢复失败的错误保持原异常语义向上透传。
Human Involvement
Related Issue
无。
Type of Change
Changes Made
ModelErrorKind和ModelError,记录 Provider、HTTP 状态码及结构化业务码。Testing
本地专项回归:
337 passed, 1 skipped。同时通过:
ruff checkgit diff --checkChecklist
Screenshots (if applicable)
不适用。
Additional Notes
本分支已合并最新
main。冲突解决时保留了主线统一重试包装器,并在其上接入结构化模型错误分类。