Authoritative effective model selection for subagents and plugin runtimes #2053
Replies: 3 comments
|
模型路由需要"权威生效模型选择"(子代理/插件运行时)——第三方插件做模型路由时缺一个标准接口,和 #1498/#2006 的诉求同源。 模型选择/继承的机制第 9 章有讨论:https://github.com/Electricitysheep/dsh-handbook/blob/main/docs/09-mcp-subagent-workflow.md |
|
先说一句:@Cfomodz 的"Duplicate of #1581/#1472/#2006"我认为判错了,而且这个判错会让这帖被埋掉,所以值得说清楚。 那三帖是缺陷报告(子代理继承了创建期冻结的模型快照,导致跨 provider 计费)。你这帖你自己在开头就写明了:
你问的是"插件作者该拿什么当权威证据"。这两件事不但不重复,而且是互补的——那三帖恰恰是"该拿什么当权威"这个问题答错时的后果。下面我把这层关系说清楚,也算是对你三个问题的一份来自另一个消费者的回答。 你的问题 3 先答:
|
| 需要它做什么 | |
|---|---|
| 你(#2053) | 读:断言"这个 child 实际用了什么",作为契约测试与可观测性的依据 |
| #2639 | 写:在 activation 发布前决定"这个 child 该用什么" |
一个既能读又能写的权威解析点,比两个各自的补丁值钱。建议互相引一下——一个 seam 提案有两个来自不同方向的真实消费者,是最难自证也最有说服力的东西。
一个附带的建议
你们那个契约测试(DSHelm 解析策略 → agent loop + installModelSelection → request/header → adapter GenerateOptions 四者一致)本身很有价值。建议在原帖里把它的"能证伪什么"写得更显眼——它不是"我们的实现是对的",而是"如果这四者哪天不一致了,这个测试会红"。这个社区里最近连着出了好几例"声明处有值、消费处读不到、中间没人报错"的问题,而你们这条链恰恰是那类漂移的探测器。
边界与利益相关
我们不修 DSH 自家组件——模型选择瀑布、request/header、subagent 的 options 解析都在 DSH 里。上面全是对已有报告的引用与一份实践数据点;我没有读过 DSHelm 或 dsh-agent-teams 的源码,关于它们的描述完全采信你的原帖。
利益相关:我维护 pi2dsh,它也做模型路由,所以我和你在这个 seam 上是同一类需求方——先说在前面。这条不推销:你要的是官方确认一个契约,装我们的东西对此毫无帮助。
Uh oh!
There was an error while loading. Please reload this page.
Summary
Third-party DSH plugins that route models (agent distributions, team runtimes, workflow plugins) need an authoritative seam to determine the effective provider / model / reasoningEffort of a request. This is a question about the ecosystem contract, not a bug report.
Background
DSH already provides rich seams:
ctx.llm.resolveModelInfofor exact-model capability,installModelSelectionfor composing provider/model/reasoningEffort into an agent's request config,prepareCallfor validating a call config, and the session log'srequest/headerevent as the durable record of what was actually sent.We are building DSHelm, an independent DSH-native agent distribution, and we wrote a keyless contract test that asserts the full chain:
For our own path these four agree (test:
packages/dsh/tests/dsh-request-contract.test.ts). The question is about plugin-authored model routing — e.g. a team runtime that wants per-member models.Observations on the ecosystem
dsh-agent-teams(0.1.5) passes per-memberagentOptions: { provider, model }intosubagents.startContinuableand uses awithPendingbridge to make the selection visible while the child materializes. That is a reasonable composition strategy.request/headerevent (and the adapter'sGenerateOptions).resolveModelInfoanswers capability questions,prepareCallvalidates, but neither is an authority on which route a particular child ended up with.Questions
request/headerevent the authoritative evidence plugin authors should assert against for effective provider/model/reasoningEffort? (That is what we do; we'd like this confirmed as the intended contract.)request/headerread helper, a model-selection snapshot, or a documented invariant?agentOptionsonSubagentStartRequest,installModelSelectionin the child setup scope, or both with an explicit precedence?Environment
dsh --version: 0.1.0-rc.6@deepseek-ai/dsh-*: 0.1.0-rc.6, Cordis 4.0.1We encountered this while building DSHelm, an independent open-source agent distribution for DSH (not affiliated with DeepSeek). Happy to turn any of the above into a concrete proposal or test fixture if that helps.
All reactions