Repository navigation
[Defense] 路由覆写后来源 reasoningEffort 跨模型滞留:建议在 provider/model 切换边界重校验档位 #9201
Replies: 2 comments
This gap now has a plugin form:
|
|
补充一条判据细节(供维护者与后来者参考,也当社区踩坑记录): 在 argszero 指出的「继承档 vs 本路由明选档」区分之上,建议把 waterfall 覆写层的清理规则明确为「清继承档、保留本路由明选档」——判据取「继承 ⇒ clear」,而不是「Unsupported ⇒ clear」:
理由:「Unsupported ⇒ clear」无法区分「从别的模型继承来的档位」与「用户在本路由主动选择的档位」,会误伤后者;「继承 ⇒ clear」以档位来源为准,两种意图都能正确处理。 关联讨论:#122 / #1861 / #3493 / #3566。 本机实证(踩坑记录):2026-10-08~09 多对话同族 |
Uh oh!
There was an error while loading. Please reload this page.
English summary: When a route-override layer (e.g. a preset/controller plugin that rewrites
provider/modelin theagent/requestwaterfall) omitsreasoningEffort, an effort inherited from the session's model selection — valid on the source model — survives into the request for the target model. If the target is a hand-declared model withoutreasoningEfforts, DSH's client-side precheck rejects the whole turn withUNSUPPORTED_REASONING_EFFORTbefore any HTTP call. Suggested defense: revalidate/clear effort at the provider/model switch boundary.环境 / Environment
@linxin666/dsh-value-mode0.1.0),expert 路由未钉死 ⇒ 顶层请求由插件覆写为agent-default-model路由xai/grok-4.6(medium)、deepseek-official/deepseek-flash(high)、xiaomi-token-plan/mimo-v2.6-flash(high)models声明·无reasoningEfforts·随包目录无底本):stepfun/step-5-preview、step-3.7-flash、qwen-token-plan-cn/qwen3.8-flash现象 / Actual
单个早晨 05:28–07:24(本地)内 10 次客户端预检拒绝、跨 6 个会话:
报错发生在任何 HTTP 请求之前;同会话把模型切回已声明档位的模型(mimo)立即恢复。
证据链(三环·每环有锚)
model/selection因此携带reasoningEffort(本机会话事件实录:{"provider":"xai","model":"grok-4.6","reasoningEffort":"medium"}等)。agent/request拦截器覆写provider/model后,其自身路由未显式携带档位时只 spread 路由字段、不删除内层已注入的reasoningEffort键(插件源码packages/dsh-value-mode中该 spread 为...route.reasoningEffort ? { reasoningEffort: route.reasoningEffort } : {}形态,无 else 清除分支)。dsh-llm的resolveCallWithInfo对reasoning === undefined且请求带档的组合直接 throw(发前拒绝);手写模型未声明reasoningEfforts时能力按「无」解析(dsh-llm-pi-ai的resolveModelReasoning:base?.reasoning ?? false)。绑定质量:10 次报错逐一绑定到会话真身的
turn/error级事件,时刻与错误日志毫秒级对齐;每次报错前该会话的model/selection事件恰好携带一个外来档位;零反例。行为侧写:同一会话 step5→step3.7→qwen 连切全炸、切回 mimo 即恢复。期望行为 / Expected(建议的路由边界三判据)
原则:隐式继承→清除;显式请求不兼容→报错;不做静默忽略(静默退化会让用户以为获得了更高推理强度)。
我方已做的消费方止血
已给两个手写模型补全 8 档
reasoningEfforts声明并逐档 API 实测(HTTP 200),受影响会话已恢复。但止血不等于路由边界正确:只要还有手写模型未声明、或未来再有覆写型插件,同款泄漏会以别的模型名复现。关联讨论 / Related
reasoningEffortsvsreasoning字段语义)最小复现 / Repro
llm-pi-ai.providers.<route>.models,不写reasoningEfforts);provider/model但不带reasoningEffort的层(本例 value-mode 未钉 expert、回落默认模型)把请求路由到步骤 1 的模型;UNSUPPORTED_REASONING_EFFORT,无 HTTP 请求。附注
dsh-settings-file默认watch: true+100ms debounce,但本机两次外部修改 settings.yaml 后运行态未即时跟进(另有三项诊断在做,属独立问题,不并入本报告)。All reactions