fix(auto-review): 灰区分类器与会话模型解耦,按账号动态选网关模型 - #2753
Closed
BarneyZhaoooo wants to merge 1 commit into
Closed
Conversation
第三方路由(xd/自定义 provider)下原生 Guardian 不启用,旧实现把分类 prompt 发给当前会话模型:DeepSeek 等强制思考模型输出过不了短 JSON 解析(makecindy#2174),Auto 档灰区持续降级人工确认。 改为三档分类器,灰区不再跟强制思考的会话模型: 1) xd 网关按账号下发目录动态选「能关思考、非 DeepSeek」的 gpt 系 模型,优先 mini/nano 预算档(分类器是高热路径,省钱); 2) 无网关模型时回落 ChatGPT 订阅档; 3) 会话模型兜底,保留 makecindy#1227 能力,但仅当该模型可关思考——DeepSeek 不再当分类器,自定义 provider 的可关思考模型照旧可用。 三档都失败才降级 ask。网关的 codex/ 折扣档改走 Responses 协议 (chat-completions 会 400)。 Closes makecindy#2174 Signed-off-by: han <zhaohan@xd.com>
BarneyZhaoooo
force-pushed
the
fix/auto-review-decouple-session-model
branch
from
August 14, 2026 12:22
1777dd5 to
82e6a78
Compare
Contributor
Author
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.
这次改了什么
摘要
Auto 档灰区动作的审阅器一直跟随当前会话模型。第三方路由(xd / 自定义 provider)下原生 Guardian 不启用,分类 prompt 就发给会话模型自己;DeepSeek 这类强制思考模型吐不出可解析的短 JSON(#2174),灰区动作持续降级成人工确认,Auto 档形同虚设。
本次改为三档分类器,灰区不再跟强制思考的会话模型:
三档都失败才降级 ask。
变更类型
fix缺陷修复范围
resolveAutoReviewGatewayModel:从 xd 运行时目录挑能关思考、非 DeepSeek 的 gpt 系模型,优先 mini/nano 预算档。requestText三档链:xd 网关动态模型 → ChatGPT 订阅 → 会话模型(仅可关思考);额度/effort 随选中模型算。codex/折扣档改走/v1/responses(chat-completions 会 400),并带 minimal-body 重试。auto_review_model_override;parseAutoPermissionReviewDecision的 1024 字上限。UI 变化
不涉及。纯 main 进程分类器路由改动,无界面/文案变化。
怎么验证的
自动验证
手工验证
实机(macOS dev,global,正式 userData):
taptap(llm-proxy.tapsvc.com) + deepseek-v4-pro + Auto 档,发curl -I https://example.com:直接执行,HTTP/2 200,无确认卡。auto permission reviewer completed verdict=allow,分类请求explicit utility text provider succeeded providerId=xd。未执行的验证
风险
风险分类
影响与回滚
提交前检查
git commit -s,见 DCO)Closes #2174