dsh-auto-model-routing 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.2
4
+
5
+ - AUTO now handles Claude and GPT model families only: selecting any other main model switches the session to MANUAL instead of failing the turn in the effort mapper.
6
+ - Support the renamed `dsh-magpie-connector` Magpie route as an exact policy transport (replacing `dsh-magpie`); `dsh-magpie-connect` remains supported.
7
+ - Fix the missing feedback entry on turns whose request configuration did not change: the main decision is marked applied from the effective request header instead of waiting for a new one.
8
+ - Record two implicit feedback facts as separate ledger events keyed by session and decision: reply exposure and a later switch to MANUAL. No message text is stored; routing is unchanged.
9
+ - The usage report adds a mutually exclusive implicit-signal breakdown per comparison group, with a fixed caveat that implicit no-objection is not the same as appropriate.
10
+ - Sync the AUTO-selected effort through the official selection and simplify the picker display.
11
+
12
+ ## 0.4.1
13
+
14
+ - Add the on-demand `auto-model-routing-report` skill and read-only `lib/usage-report.js`: joins policy-v2 decisions to actual per-call usage by message ID, grouped by version × model × depth, with coverage gaps, sample thresholds and fixed caveats. Observational only; never writes, spawns or uses the network, and never prints message text, paths or session IDs.
15
+
3
16
  ## 0.4.0
4
17
 
5
18
  - Upgrade AUTO by default: keep the main model fixed, independently judge child capability and reasoning investment, and enforce exact fresh-child bindings with persisted replay. Preserve explicit legacy rollback and MANUAL behavior.
package/README.md CHANGED
@@ -2,8 +2,37 @@
2
2
 
3
3
  English · [简体中文](README.zh.md)
4
4
 
5
+ ![AUTO interaction: toggle AUTO/MANUAL and inspect the decision](docs/auto-routing.gif)
6
+
7
+ *Interaction recording from the earlier four-tier UI (isolated mock Host); current decisions use independent capability and depth as described below.*
8
+
9
+ [Repository](https://github.com/prgrmrwy/dsh-auto-model-routing) · [Releases](https://github.com/prgrmrwy/dsh-auto-model-routing/releases) · [npm](https://www.npmjs.com/package/dsh-auto-model-routing)
10
+
5
11
  <!-- problem -->
6
- Keep the main model you chose; let AUTO select reasoning investment for each turn and suitable resources for fresh sub-agents. Jev judges **capability and effort independently**. DSH applies the route, and the UI distinguishes a decision from a configuration that actually reached a request.
12
+ **Add AUTO mode to DSH: automatic effort for the main agent, automatic model + effort for sub-agents.** Stop adjusting reasoning investment every turn or choosing a model for every delegated task.
13
+
14
+ - **Main agent: keep your selected model and adjust reasoning effort per user turn.**
15
+ - **Sub-agents: judge capability needs and reasoning investment independently, then select model + effort.** A stronger model does not automatically mean deeper reasoning.
16
+ - **Visible decisions, local feedback:** inspect candidate distributions and actual application status, then rate the allocation below a reply.
17
+
18
+ ### Which DSH scenarios does AUTO cover?
19
+
20
+ | Scenario | AUTO behavior | Current boundary |
21
+ |---|---|---|
22
+ | Main-agent user turn | Judge effort for each new user turn; keep the main model | Not rejudged at every tool step; model must support the effort |
23
+ | Official fresh `subagent` | Select and bind child model + effort before its first request | Real Magpie Claude/GPT ordinary child calls verified; catalog and allowlist apply |
24
+ | Official fresh `spawn_teammate` | Bind the new teammate's model + effort using the same policy | Mock-host coverage; real-provider teammate acceptance remains unverified |
25
+ | Resume or continue a bound child | Replay its initial allocation without rejudging | Requires the plugin enabled and intact route records |
26
+ | Explicit model / effort | Preserve the specified dimension; judge only the other | Both specified: validate without calling Jev |
27
+ | Fork, third-party or unbound creation paths | No automatic-allocation guarantee | Fork and unbound AUTO child paths are explicitly rejected, not silently replaced |
28
+
29
+ This describes official integration paths—not acceptance of every DSH entry point, CLI/TUI interface or third-party plugin. The Web UI is the currently verified interface. MANUAL makes no new judgments. `route_subagent` is a preview, not a required step before dispatch.
30
+
31
+ ### Local feedback → future learning and adjustment
32
+
33
+ **Available now:** rate a decision-bound reply as appropriate, too high, too low or unknown; change or clear the rating. Feedback and decision snapshots stay on your machine. Submitting feedback does not upload it to the decision service or immediately change routing; AUTO task judgments themselves still use your selected external service.
34
+
35
+ **Planned direction:** add learning, evaluation and policy adjustment based on local feedback and execution outcomes, so AUTO can better fit your tasks. **Automatic learning and feedback-driven tuning are not implemented yet.** Today's records support later evaluation; they are not evidence of measured quality gains or cost savings.
7
36
 
8
37
  **Install.** Tested with DSH `0.2.0-rc.2`, Web UI, Node.js `>=22.19`.
9
38
 
@@ -13,7 +42,7 @@ dsh plugin --profile web add dsh-auto-model-routing
13
42
  dsh plugin --profile web add prgrmrwy/dsh-auto-model-routing
14
43
  ```
15
44
 
16
- Restart DSH and refresh the Web page. In **Settings → 自动模型路由**, choose a decision service, save its API key, and use **测试连接** with a fixed public sample. New chats default to **MANUAL**; click the chip to use AUTO. The companion delegation skill is included—no separate skill installation is needed.
45
+ Restart DSH and refresh the Web page. In **Settings → Auto model routing**, choose a decision service, save its API key, and use **Test connection** with a fixed public sample. These are English descriptions of the controls; the plugin's interface labels are currently in Chinese. New chats default to **MANUAL**; click the chip to use AUTO. The companion delegation skill is included—no separate skill installation is needed.
17
46
 
18
47
  ## Use
19
48
 
@@ -22,11 +51,12 @@ Restart DSH and refresh the Web page. In **Settings → 自动模型路由**, ch
22
51
  | **AUTO / MANUAL chip**, left of the model picker | Click to switch. Hover for the decision, candidate distribution, certainty, model/effort and application status. |
23
52
  | **Decision hint** | Shows new decisions briefly; its Settings switch does not hide the hover panel. |
24
53
  | **Gauge button** below an eligible reply | Mark the allocation appropriate, too high, too low or unknown; change or clear your feedback later. Only replies bound to an applied main decision qualify. |
25
- | **Settings → 自动模型路由** | Choose service/model, manage its separate key, test the connection, set defaults/cap/deadline, or expand **查看决策策略** to inspect the actual rubric and model slots. |
54
+ | **Settings → Auto model routing** | Choose service/model, manage its separate key, test the connection, set defaults/cap/deadline, or expand **View decision strategy** to inspect the actual rubric and model slots. |
26
55
 
27
56
  ### Main model stays fixed; children are selected separately
28
57
 
29
- - **Main chat:** `lower / baseline / higher` moves at most one supported effort step below/at/above the model's verified recommended starting point. The cap defaults to `xhigh`; AUTO never selects `max`. It does not change the main provider/model or write global model defaults.
58
+ - **Main chat:** `lower / baseline / higher` moves at most one supported effort step below/at/above the model's verified recommended starting point. The cap defaults to `xhigh`; AUTO never selects `max`. It keeps the main provider/model and synchronizes the selected effort through official `selectModel`, which also saves global defaults.
59
+ - **Claude/GPT families only:** AUTO manages models whose id (after any transport prefix) starts with `claude-` or `gpt-`. Selecting any other main model — DeepSeek, GLM, Grok, Gemini, Kimi, Qwen, … — switches the session to MANUAL and locks the chip: it shows an outlined info icon, and hovering the whole button explains the support scope with an issue/PR link to the repository. Switching back to a Claude/GPT model restores a clickable MANUAL chip; AUTO is never re-enabled automatically.
30
60
  - **Fresh children:** capability is `bounded / analytical / frontier`; effort is judged separately. Claude slots are Haiku / Sonnet / Opus 5.5; GPT slots are Luna / Sol / Sol. The current catalog, supported efforts and official child allowlist must all permit the route. Magpie uses its exact provider and full family-prefixed model IDs, not a fallback to local transports.
31
61
  - **Explicit choices win:** specifying a model or effort leaves only the other dimension to judge. Specifying both skips Jev and validates the route. Missing task scope stops delegation rather than guessing.
32
62
  - **Official creation binds the route:** fresh `subagent` and fresh `spawn_teammate` paths bind an exact child identity before its first request. `route_subagent` is an optional preview—not proof of application and not a user constraint to copy into a subsequent call. Fork and unbound creation paths are unsupported; there is no silent substitution.
@@ -45,6 +75,12 @@ Preset model menus expose documented versions, not live availability guarantees.
45
75
 
46
76
  **Certainty is not the selected probability.** Choice certainty is `(pmax − 1/n) / (1 − 1/n)`: with three candidates, a 70% top probability gives 55% certainty. The panel shows the service's returned certainty and full candidate distribution separately, including returned zeroes; missing values are marked unavailable. Neither number is task success rate.
47
77
 
78
+ ### Magpie transports and picker display
79
+
80
+ The default policy accepts both exact transports, `dsh-magpie-connector` and `dsh-magpie-connect`. They are not aliases: full model ids, live model capabilities, supported effort/caps, the current allowlist and the parent's captured allowlist all retain their exact transport identity. Unknown families need an explicit model. With a root AUTO session and explicit `policy: legacy`, both Magpie previews reject before Jev; MANUAL still returns `routed: false` without judging or state writes. Already bound children replay their saved route.
81
+
82
+ AUTO applies the selected effort to the current main request and awaits official `selectModel` on the same provider/model when the effort changes. This also updates global defaults; the official picker shows one effort value. MANUAL requests pass through unchanged and bound children never write the main selection. A selection-sync failure is logged while the current request retains its selected effort. Magpie menu grouping still requires ohmydsh's managed five-package Host extension; stock rc.2 keeps a flat list. See [Magpie setup and display requirements](<../dsh-magpie-connector/README.md#model-menu-groups-and-effort>); local tests do not establish deployment or live GUI acceptance.
83
+
48
84
  ## Good to know
49
85
 
50
86
  - **Failures are visible.** Main judgment failure disables AUTO with a reason; child judgment/route failure stops dispatch. No local classifier, automatic retry, upgrade or cross-service fallback.
@@ -54,16 +90,12 @@ Preset model menus expose documented versions, not live availability guarantees.
54
90
  - **Local state:** configuration is under `$DSH_HOME/plugins/dsh-auto-model-routing/`; mode, child routes and feedback are under `$DSH_HOME/state/auto-model-routing/`. Feedback stores resource metadata, IDs, versions, returned distributions and timestamps—not task/reply text. Request event IDs allow later usage correlation; costs are not fabricated when unavailable. See [feedback and evaluation](docs/feedback-evaluation.md).
55
91
  - **No automatic learning.** Human allocation feedback is observational. It does not change routing or prove quality/cost benefits. Old messages without decision bindings are not backfilled; old records with missing evaluation fields remain unknown.
56
92
  - **Upgrade:** existing AUTO sessions use the new policy without a version switch or rewriting their stored mode. New chats still default to MANUAL unless configured otherwise. Historical four-tier mappings remain only for explicit `policy: "legacy"` rollback in plugin configuration; they are not the current policy or feedback menu.
57
-
58
93
  ## Architecture
59
94
  <!-- section: architecture -->
60
95
 
61
- ```text
62
- user turn → pre-step → selected Jev service → depth → main request effort
63
- fresh child creation → exact child binding → capability + depth → validated route
64
- request/header → configuration match → applied evidence
65
- assistant message → immutable decision snapshot → human feedback events
66
- ```
96
+ ![AUTO architecture — independent judgments, validated requests and allocation feedback](docs/architecture-v2.en.svg)
97
+
98
+ Main failures disable AUTO; child failures stop dispatch. Explicit model/effort constraints are preserved. The diagram shows the AUTO paths; MANUAL makes no new judgments and fork is unsupported. Feedback does not automatically alter routing.
67
99
 
68
100
  Entry: [index.ts](src/index.ts). Enforcement: [policy-host.ts](src/policy-host.ts). Actual rubric: [policy-v2-rubric.json](src/policy-v2-rubric.json). Model slots: [policy-v2.ts](src/policy-v2.ts). UI: [client](src/client/index.ts). Coverage and limitations: [development verification](docs/policy-v2-development.md), [real Magpie acceptance](docs/magpie-live-acceptance.md).
69
101
 
@@ -72,11 +104,9 @@ Entry: [index.ts](src/index.ts). Enforcement: [policy-host.ts](src/policy-host.t
72
104
 
73
105
  These isolated-host recordings use mock Jev/model responses and show the previous UI, not the current default policy.
74
106
 
75
- ![Legacy AUTO effort adjustment demo](docs/auto-routing.gif)
76
107
  ![Legacy four-tier routing settings](docs/settings.gif)
77
108
 
78
109
  </details>
79
-
80
110
  ## Development
81
111
 
82
112
  ```sh
@@ -85,7 +115,9 @@ npm run typecheck
85
115
  npm run build
86
116
  ```
87
117
 
88
- Tests use the official AgentLoop with fake LLM streams and mock/loopback Jev responses, not paid model calls. `scripts/label-report.mjs` reports **legacy tier labels only**; it is not a report for new allocation feedback. Evaluation schema and deduplication rules are in [feedback-evaluation.md](docs/feedback-evaluation.md).
118
+ Tests use the official AgentLoop with fake LLM streams and mock/loopback Jev responses, not paid model calls. `scripts/label-report.mjs` reports **legacy tier labels only**. To observe AUTO decisions and their actual token usage, ask the agent to use the `auto-model-routing-report` skill (on demand only; it runs the read-only `lib/usage-report.js`). It is observational, not a savings measurement. Evaluation schema and deduplication rules are in [feedback-evaluation.md](docs/feedback-evaluation.md).
119
+
120
+ Development stays in the source monorepo; this repository is its release mirror. The package builds and loads independently using its declared dependencies, bundled skill and official DSH services; no monorepo checkout or monorepo instruction file is required. External design references are optional background, not runtime inputs.
89
121
 
90
122
  The [current specification](https://github.com/prgrmrwy/ohmydsh/blob/main/openspec/specs/auto-model-routing/spec.md) lives in the source monorepo. The bundled [delegation skill](skills/subagent-model-routing/SKILL.md) supplies guidance; enforcement belongs to the official host hooks, not the prompt. No measured task-quality or token-savings claim is made.
91
123
 
package/README.zh.md CHANGED
@@ -2,8 +2,37 @@
2
2
 
3
3
  [English](README.md) · 简体中文
4
4
 
5
+ ![AUTO 交互:切换 AUTO/MANUAL 并查看决策](docs/auto-routing.gif)
6
+
7
+ *此交互录屏来自早期四档界面(隔离 mock 宿主);当前策略按下文独立判断能力与投入。*
8
+
9
+ [插件仓库](https://github.com/prgrmrwy/dsh-auto-model-routing) · [版本发布](https://github.com/prgrmrwy/dsh-auto-model-routing/releases) · [npm](https://www.npmjs.com/package/dsh-auto-model-routing)
10
+
5
11
  <!-- problem -->
6
- 主模型由你选,AUTO 为每轮选择推理投入,并为 fresh 子任务选配资源。Jev **独立判断能力需求和投入**,DSH 验证并应用配置;界面区分“做出了判断”和“实际请求已生效”。
12
+ **为 DSH 增加 AUTO 模式:主 Agent 自动调 effort,子 Agent 自动选 model + effort。** 不必每轮手动选择推理投入,也不必为每个子任务手动挑模型。
13
+
14
+ - **主 Agent:保留你选择的模型,按回合调整推理投入(effort)。**
15
+ - **子 Agent:按任务独立判断能力需求与推理投入,选择模型与 effort。** 不是把“更强模型”和“更深推理”捆成一个档位。
16
+ - **看得见、能反馈:** 展示决策分布与实际生效状态,在回复下方提交本机分配反馈。
17
+
18
+ ### AUTO 覆盖哪些 DSH 场景?
19
+
20
+ | 场景 | AUTO 的作用 | 当前边界 |
21
+ |---|---|---|
22
+ | 主 Agent 用户回合 | 每个新用户回合判断 effort,主模型不换 | 不逐工具步骤重判;模型必须支持相应 effort |
23
+ | 官方 fresh `subagent` | 首次请求前选择并绑定子 model + effort | 真实 Magpie Claude/GPT 普通子调用已验证;受目录和允许列表约束 |
24
+ | 官方 fresh `spawn_teammate` | 按同一策略绑定新 teammate 的 model + effort | 已有 mock 宿主覆盖,尚未完成真实模型 teammate 验收 |
25
+ | 已绑定子实例恢复或继续执行 | 重用初始路线,不重新分配 | 依赖插件保持启用及路由记录完整 |
26
+ | 显式指定 model / effort | 保留已指定维度,仅判断未指定维度 | 两者都指定则只校验,不调用 Jev |
27
+ | fork、第三方或未绑定创建路径 | 不承诺自动选配 | fork 与未绑定 AUTO 子路径会明确拒绝,不静默替代 |
28
+
29
+ 这里是官方接入路径的覆盖说明,不代表所有 DSH 入口、CLI/TUI 界面或第三方插件都已验收。Web UI 是当前验证入口;MANUAL 不做新判断。`route_subagent` 仅预览,不是必须先调用的派发步骤。
30
+
31
+ ### 本机反馈 → 未来的学习调整
32
+
33
+ **现在:** 在已绑定决策的回复下评价“合适 / 投入偏高 / 投入不足 / 无法判断”,可修改、撤销。反馈与决策快照保存在本机,不会因点击反馈而上传到决策服务,也不会立即改变路由;AUTO 任务判断本身仍按所选服务外发。
34
+
35
+ **未来方向:** 增加基于本机反馈与执行结果的学习、评估和策略调整,让 AUTO 更贴合你的任务。**尚未实现自动学习或反馈驱动调参**,目前记录用于后续评估,不承诺已证明的质量提升或成本节省。
7
36
 
8
37
  **安装**:已验证 DSH `0.2.0-rc.2`、Web UI,Node.js `>=22.19`。
9
38
 
@@ -26,7 +55,8 @@ dsh plugin --profile web add prgrmrwy/dsh-auto-model-routing
26
55
 
27
56
  ### 主模型不换,子任务独立选配
28
57
 
29
- - **主会话**:`lower / baseline / higher` 相对于具体模型已验证的推荐起点,在受支持序列降低一档、保持或提高一档。缺省上限 `xhigh`,自动不选 `max`;不修改主 provider/model,也不改写全局模型默认值。
58
+ - **主会话**:`lower / baseline / higher` 相对于具体模型已验证的推荐起点,在受支持序列降低一档、保持或提高一档。缺省上限 `xhigh`,自动不选 `max`;主 provider/model 不变;通过官方 `selectModel` 同步选定 effort,同时保存全局默认值。
59
+ - **仅支持 Claude / GPT 系列**:AUTO 只管理模型名(去掉 transport 前缀后)以 `claude-` 或 `gpt-` 开头的主模型。切换到其他主模型(DeepSeek、GLM、Grok、Gemini、Kimi、Qwen 等)会自动落为 MANUAL 并锁定芯片:芯片显示描边 info 图标,悬停整个按钮说明支持范围并提供仓库的 issue/PR 链接。切回 Claude / GPT 系列后芯片恢复可点击且保持 MANUAL,不会自动重新启用 AUTO。
30
60
  - **fresh 子任务**:能力需求为 `bounded / analytical / frontier`,推理投入独立判断。Claude 能力槽为 Haiku / Sonnet / Opus 5.5;GPT 为 Luna / Sol / Sol。实际路由必须同时满足当前目录、支持的 effort 和官方子智能体允许列表。Magpie 保留真实 provider 与家族前缀完整模型 ID,不回退到本地入口。
31
61
  - **尊重显式选择**:只指定模型或投入时,仅判断另一维;两者都指定则不请求 Jev,只校验路由。缺少任务目标或范围时停止委派,不猜。
32
62
  - **官方创建绑定路由**:fresh `subagent` 和 fresh `spawn_teammate` 在子任务首次请求前绑定精确身份。`route_subagent` 只是可选预览,不代表已应用,也不能把推荐复制成用户约束。fork 和未绑定创建路径暂不支持,不静默替换。
@@ -45,6 +75,12 @@ dsh plugin --profile web add prgrmrwy/dsh-auto-model-routing
45
75
 
46
76
  **判定确定度不等于选中概率**:Choice 公式为 `(pmax − 1/n) / (1 − 1/n)`,三个候选中最高概率 70% 对应确定度 55%。面板分别显示服务返回的确定度和完整分布,保留返回的 0%,缺值标未提供。两者都不是任务成功率。
47
77
 
78
+ ### Magpie transport 与选择器展示
79
+
80
+ 默认策略接受 `dsh-magpie-connector`、`dsh-magpie-connect` 两个精确 transport,不互为 alias:完整 model id、实时模型能力、支持 effort/cap、当前允许列表与父 captured allowlist 都按原 transport 校验。未知家族需显式 model。根会话 AUTO 且显式 `policy: legacy` 时,两种 Magpie 预览均在 Jev 前拒绝;MANUAL 仍直接返回 `routed: false`,不判档、不写状态。已绑定子实例恢复原路线。
81
+
82
+ AUTO 将选定 effort 应用于本次主请求;effort 改变时,等待官方 `selectModel` 同步同一 provider/model,并允许保存全局默认值。官方选择器只显示一个 effort。MANUAL 请求原样通过,已绑定子会话不写主选择;同步失败会记录告警,本次请求仍保留选定 effort。Magpie 菜单分组仍需 ohmydsh 受管五包 Host 扩展,stock rc.2 保持 flat 列表。见 [Magpie 配置与展示前提](<../dsh-magpie-connector/README.zh.md#模型菜单分组与-effort>);本地测试不等于已部署或 live GUI 验收。
83
+
48
84
  ## 须知
49
85
 
50
86
  - **失败可见**:主判断失败会停用 AUTO 并显示原因,子判断或路由失败则停止派发。没有本地分类器、自动重试、自动升级或跨服务降级。
@@ -58,12 +94,9 @@ dsh plugin --profile web add prgrmrwy/dsh-auto-model-routing
58
94
  ## 架构
59
95
  <!-- section: architecture -->
60
96
 
61
- ```text
62
- 用户回合 → pre-step → 所选 Jev 服务 → depth → 主请求 effort
63
- fresh 子创建 → 精确身份绑定 → capability + depth → 校验路由
64
- request/header → 配置匹配 → applied 证据
65
- assistant 消息 → 不可变决策快照 → 人工反馈事件
66
- ```
97
+ ![AUTO 架构:独立判断、请求校验与分配反馈](docs/architecture-v2.zh.svg)
98
+
99
+ 主判断失败停用 AUTO,子失败停止派发;保留显式 model/effort。图示为 AUTO 路径,MANUAL 不做新判断,fork 暂不支持。反馈不会自动改变路由。
67
100
 
68
101
  入口:[index.ts](src/index.ts)。执行接入:[policy-host.ts](src/policy-host.ts)。实际判据:[policy-v2-rubric.json](src/policy-v2-rubric.json)。模型槽:[policy-v2.ts](src/policy-v2.ts)。界面:[client](src/client/index.ts)。覆盖边界:[开发验证](docs/policy-v2-development.md)、[真实 Magpie 验收](docs/magpie-live-acceptance.md)。
69
102
 
@@ -72,11 +105,9 @@ assistant 消息 → 不可变决策快照 → 人工反馈事件
72
105
 
73
106
  下列隔离宿主录屏使用模拟 Jev/模型响应,展示旧界面,不代表当前默认策略。
74
107
 
75
- ![旧版 AUTO 推理强度调整](docs/auto-routing.gif)
76
108
  ![旧版四档路由设置](docs/settings.gif)
77
109
 
78
110
  </details>
79
-
80
111
  ## 开发验证
81
112
 
82
113
  ```sh
@@ -85,7 +116,9 @@ npm run typecheck
85
116
  npm run build
86
117
  ```
87
118
 
88
- 测试使用官方 AgentLoop、假 LLM 流和 mock/回环 Jev,不产生真实模型费用。`scripts/label-report.mjs` **仅汇总旧四档标注**,不是新分配反馈报表;新数据结构与去重口径见[feedback-evaluation.md](docs/feedback-evaluation.md)。
119
+ 测试使用官方 AgentLoop、假 LLM 流和 mock/回环 Jev,不产生真实模型费用。`scripts/label-report.mjs` **仅汇总旧四档标注**。如需观察 AUTO 决策及实际 token 用量,请明确让 agent 使用 `auto-model-routing-report` skill(仅按需调用,运行只读的 `lib/usage-report.js`);它是观察统计,不衡量节省;新数据结构与去重口径见[feedback-evaluation.md](docs/feedback-evaluation.md)。
120
+
121
+ 继续在主仓开发,本仓库仅作发布镜像。插件使用自身声明的依赖、包内 skill 和官方 DSH 服务即可独立构建与加载,不要求检出主仓,也不要求安装主仓环境指令。外部设计链接仅供背景阅读,不是运行输入。
89
122
 
90
123
  [当前规范](https://github.com/prgrmrwy/ohmydsh/blob/main/openspec/specs/auto-model-routing/spec.md)在源码 monorepo 中维护。包内[委派 skill](skills/subagent-model-routing/SKILL.md)提供指引,执行保障来自官方宿主钩子,而不是提示词。暂无完整任务质量或 token 节省的量化结论。
91
124
 
@@ -0,0 +1,26 @@
1
+ {
2
+ "schema_version":1,"diagram_type":"architecture",
3
+ "meta":{"title":"AUTO resource allocation","output":".archify/architecture-auto-routing-20261026-014646/auto-routing.html","locale":"en","quality_profile":"showcase","repository":{"url":"git@github.com:prgrmrwy/ohmydsh.git","revision":"79f9eab467047e054a2d66f8bce060834a261a2a","link_mode":"local-only"}},
4
+ "components":[
5
+ {"id":"turn","type":"frontend","label":"AUTO user turn","sublabel":"Main model stays fixed","pos":[40,80],"size":[190,68],"sources":[{"path":"packages/auto-model-routing/src/policy-host.ts","line":68,"end_line":88}]},
6
+ {"id":"judge","type":"cloud","label":"Selected Jev service","sublabel":"Depth / capability independently","pos":[360,80],"size":[220,68],"sources":[{"path":"packages/auto-model-routing/src/decision-service.ts","line":1,"end_line":23},{"path":"packages/auto-model-routing/src/policy-host.ts","line":81,"end_line":88}]},
7
+ {"id":"route","type":"backend","label":"Validated allocation","sublabel":"Catalog / allowlist / effort cap","pos":[710,80],"size":[220,68],"sources":[{"path":"packages/auto-model-routing/src/policy-host.ts","line":122,"end_line":150}]},
8
+ {"id":"child","type":"backend","label":"Fresh child binding","sublabel":"Exact child identity; explicit wins","pos":[360,270],"size":[220,68],"sources":[{"path":"packages/auto-model-routing/src/policy-host.ts","line":94,"end_line":132}]},
9
+ {"id":"request","type":"backend","label":"Official model request","sublabel":"Main effort / child full route","pos":[710,270],"size":[220,68],"sources":[{"path":"packages/auto-model-routing/src/policy-host.ts","line":138,"end_line":160}]},
10
+ {"id":"persist","type":"database","label":"Persisted child route","sublabel":"Resume keeps initial allocation","pos":[40,270],"size":[220,68],"sources":[{"path":"packages/auto-model-routing/src/policy-host.ts","line":132,"end_line":160}]},
11
+ {"id":"evidence","type":"backend","label":"Request match evidence","sublabel":"Applied only when config matches","pos":[710,460],"size":[220,68],"sources":[{"path":"packages/auto-model-routing/src/policy-host.ts","line":178,"end_line":201}]},
12
+ {"id":"feedback","type":"frontend","label":"Decision and reply feedback","sublabel":"Observe allocation; never auto-train","pos":[360,460],"size":[220,68],"sources":[{"path":"packages/auto-model-routing/src/policy-host.ts","line":162,"end_line":174}]},
13
+ {"id":"snapshot","type":"database","label":"Bound decision snapshot","sublabel":"Metadata / IDs; no task text","pos":[40,460],"size":[220,68],"sources":[{"path":"packages/auto-model-routing/src/policy-host.ts","line":167,"end_line":172}]}
14
+ ],
15
+ "connections":[
16
+ {"id":"main-judge","from":"turn","to":"judge","label":"depth"},
17
+ {"id":"judge-route","from":"judge","to":"route","label":"decision"},
18
+ {"id":"child-judge","from":"child","to":"judge","label":"task","fromSide":"top","toSide":"bottom"},
19
+ {"id":"child-store","from":"child","to":"persist","label":"bind"},
20
+ {"id":"route-request","from":"route","to":"request","label":"apply"},
21
+ {"id":"request-match","from":"request","to":"evidence","label":"header"},
22
+ {"id":"match-feedback","from":"evidence","to":"feedback","label":"matched"},
23
+ {"id":"feedback-snapshot","from":"feedback","to":"snapshot","label":"bind reply"}
24
+ ],
25
+ "cards":[{"dot":"cyan","title":"Decision services","items":["OpenRouter / TypeSafe / Concentrate / custom System One","No automatic service fallback or retry"]},{"dot":"amber","title":"Boundaries","items":["MANUAL: no new judgments; explicit constraints preserved","Fork unsupported; applied is not task success"]}]
26
+ }