[bug]SubAgent routing can use stale/wrong models and silently escalate cost #5973
Replies: 2 comments
EN / EnglishQuick note: I checked current master and the stale-route half of this looks already addressed — child agents now take the parent's model/provider from its latest request header rather than a spawn-time snapshot. If you hit this on an earlier version that would explain it — which version were you running? The Flash-root-silently-spawning-Pro-subagents half is real regardless of version though: the UI shows one model while children actually run another, with no warning about the cost jump. That one deserves a fix on its own. 中文版 / ZH补一句:我翻了翻当前 master,stale 路由这部分看起来已经处理了——子代理现在是从父会话最新的 request header 拿模型/provider,不是创建时快照。如果你是较早的版本遇到这个,那就说得通了——你当时跑的是哪个版本? Flash Root 静默拉起 Pro 子代理那半,跟版本无关、是真实问题:界面显示一个模型、子代理实际跑另一个,成本跳档也没有任何提醒——这半值得单独修。 |
|
我核对了一下当前 master(c389f96bf3),支持 @yamingmou 对"stale-route 半段已修"的判断,但想把你这个报告的两个半段拆开——它们的机制其实不同,别混在一起定位。 ① stale-route 半段:master 已修(支持 @yamingmou) ② Flash-root→Pro-subagent 半段:这是真的,但机制不是 stale-route,而是"纯继承跳过 cost-tier preflight" const requiresRoutePreflight = hasDelegationModelRequest(modelRequest)
|| hasConfiguredLlmSelection(config.agentOptions)
所以"Flash root 却 spawn 出 Pro 子代理",现实有三种可能,都指向 cost-tier 治理而非路由陈旧:
你期望的"preflight 在首次请求前解析并验证有效 provider/model、阻止 tier 升级",实际上就是要把 ③ 一个可挂载的插件面提示(与你的诉求相关):我发过一个 建议:如果你能确认版本 + 提供该次运行的 route 快照(root 当时 request header 的 provider/model),就能把②的三种可能收敛到具体一种;若确认是纯继承跳过 preflight 的 cost-tier 问题,那值得单独提一个"给纯继承子代理也做 route/cost-tier preflight"的 feature(core 面),我可以帮忙起草。 |
Uh oh!
There was an error while loading. Please reload this page.
SubAgent routing can use stale/wrong models and silently escalate cost
I have encountered two serious SubAgent routing issues in DSH.
1. SubAgents may inherit a stale model/provider route
In a previous long-running project, I switched the Root Agent to
bailian/kimi-k3, but newly spawned SubAgents still useddeepseek-official/deepseek-v4-pro.This appeared to behave like a “one step behind” / stale route inheritance bug: the Root Agent showed the newly selected model, while SubAgents continued using a provider/model snapshot from the previous session/state.
In that run, the Root Agent was Kimi, but all 20 SubAgents were actually routed to DeepSeek V4 Pro, resulting in unexpected additional API cost.
So the model shown for the Root Agent does not necessarily represent the model that newly created SubAgents will actually use.
2. Flash Root Agent can silently spawn more expensive Pro SubAgents
More recently, I explicitly started a task with:
deepseek-v4.1-flash (high)but DSH automatically spawned multiple:
deepseek-v4-pro (high)SubAgents.
Three Pro SubAgents were created before I manually stopped the task. The run cost about RMB 6 and was still incomplete.
The current SubAgent Route Guard detected the route mismatch, but only after the first request had already happened. In other words, it currently behaves more like an audit log than a real guard.
Expected behavior
Before any SubAgent sends its first model request, DSH should resolve and verify its effective provider/model.
At minimum:
The core issue is that SubAgent routing is currently not predictable enough for users to control either model selection or cost.
All reactions