dsh-github-copilot 0.4.2-alpha.11 → 0.4.2-alpha.12
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/AGENTS.md +6 -5
- package/CHANGELOG.md +12 -1
- package/README.md +12 -11
- package/README.zh.md +11 -10
- package/deployment-baseline.json +5 -2
- package/docs/auto-high-cost.md +27 -17
- package/docs/auto-iteration-review.json +6 -6
- package/docs/auto-task-routing.md +5 -4
- package/docs/automatic-model-routing.md +2 -2
- package/lib/client.js +9 -4
- package/lib/client.js.map +1 -1
- package/lib/diagnostics-analysis.js +1 -1
- package/lib/{diagnostics-types-qvtuvM5E.js → diagnostics-types-DEo3UrOO.js} +13 -11
- package/lib/index.js +4 -4
- package/lib/manual-compaction-recovery.js +1 -1
- package/lib/remote.js +7 -2
- package/lib/types/auto-allocation-evidence.d.ts +1 -0
- package/lib/types/auto-allocation.d.ts +3 -2
- package/lib/types/auto-model-routing.d.ts +1 -1
- package/lib/types/turn-selection-host.d.ts +1 -1
- package/lib/types/turn-selection.d.ts +1 -0
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -368,11 +368,12 @@ Completed-turn Usage diagnostics (#259) are read-only plugin conversation data a
|
|
|
368
368
|
Auto task routing (#258) uses current `model_picker_category` facts, never model
|
|
369
369
|
names, effort or context capacity as a quality category. Hard eligibility/input
|
|
370
370
|
fit precede task/preference policy; unknown category and uncertain task evidence
|
|
371
|
-
remain explicit. Within the first fitting category, high-cost-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
371
|
+
remain explicit. Within the first fitting category, high-cost-v3 retains every
|
|
372
|
+
fitting candidate with positive weight. Ordinary weight 1 receives finite
|
|
373
|
+
previous-model multiplier 1.5; marked base 0.2 decays to 0.02 only for the previous
|
|
374
|
+
model. One-turn recency resets after a different model, not a hidden streak
|
|
375
|
+
counter or task-failure inference. Preserve v1/v2 historical codecs/cohorts and
|
|
376
|
+
their original explanation. Fit is not task
|
|
376
377
|
success; never switch categories for cost, infer incapability or add escalation.
|
|
377
378
|
Capture actual reasons once
|
|
378
379
|
per turn without durable decision events or changing Usage.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.4.2-alpha.
|
|
3
|
+
## 0.4.2-alpha.12 (prepared)
|
|
4
|
+
|
|
5
|
+
- Restore positive opportunity for all fitting same-category candidates instead
|
|
6
|
+
of v2's hard high-cost deferral. Marked base weight remains 0.2; the previous
|
|
7
|
+
marked model decays tenfold to 0.02, with ordinary continuity unchanged.
|
|
8
|
+
No hidden streak counter, permanent penalty, automatic escalation or task
|
|
9
|
+
success inference. Single/all-marked pools and admitted turns stay usable.
|
|
10
|
+
- Explain high-cost-v3 one-turn recency decay and preserve original v1/v2
|
|
11
|
+
evidence, summaries and diagnostic cohorts. Sequential synthetic simulations
|
|
12
|
+
show fewer repeat selections, not measured production quality or savings.
|
|
13
|
+
|
|
14
|
+
## 0.4.2-alpha.11 (published)
|
|
4
15
|
|
|
5
16
|
- Prefer fitting unmarked models inside the selected supplier category and defer
|
|
6
17
|
high-cost peers. Marked-only fallback stays usable without a continuity bonus.
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
GitHub Copilot account discovery, contextual Auto routing and hosted search for DSH. The plugin reuses DSH's published native adapter, retaining a profile-wide account default with independent Session next-turn choices; it does not patch Core or maintain a second model catalog.
|
|
10
10
|
|
|
11
|
-
**Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared prerelease: `0.4.2-alpha.
|
|
11
|
+
**Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared prerelease: `0.4.2-alpha.12`.** `0.4.2-alpha.1` was not published: its release preflight failed, and its immutable tag will not be reused. Supported host: official DSH / Windows Desktop `0.2.0-rc.2`. The stable version is also published on npm's `latest` dist-tag; prereleases remain on their channel tags. Stability-channel promotion does not expand the qualified host baseline or prove live account, model, search or Desktop health. Earlier DSH pins are historical evidence, not supported installation targets. Published, installed in a profile and loaded by a running Host are separate states.
|
|
12
12
|
|
|
13
13
|
**Upgrade from 0.4.0:** that first stable release can interrupt concurrent managed requests with `COPILOT_PREVIEW_CREDENTIAL_CHANGED` during normal same-account native OAuth renewal. In 0.4.1, a proven plugin-owned refresh with unchanged account, endpoint and entitlements preserves already-dispatched HTTP streams; subsequent requests use freshly validated auth and metadata. Unknown/external credential notifications, revocation, cancellation and provider rejections remain explicit—not a promise of invisible recovery or automatic retry. See [the refresh boundary](./docs/copilot-accounts.md#native-oauth-refresh-and-dispatched-requests-385).
|
|
14
14
|
|
|
@@ -16,10 +16,11 @@ GitHub Copilot account discovery, contextual Auto routing and hosted search for
|
|
|
16
16
|
|
|
17
17
|
**High-cost Auto:** in **Manage → Model preferences**, mark costly models with
|
|
18
18
|
**High cost**. Cost and task difficulty are independent: within the first
|
|
19
|
-
fitting category,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
fitting category, every fitting candidate retains a nonzero chance. Ordinary
|
|
20
|
+
weight `1` gets a finite continuity bonus (`1.5×` for the previous model).
|
|
21
|
+
High-cost base weight is `0.2`; if that model was used in the previous turn,
|
|
22
|
+
its weight decays tenfold to `0.02` instead of receiving a bonus.
|
|
23
|
+
This one-turn recency penalty is a declared trial, not calibrated quality.
|
|
23
24
|
Marking does not change fixed choices or admitted turns. This is a declared
|
|
24
25
|
policy, not a price/quality ranking or proven savings.
|
|
25
26
|
|
|
@@ -128,10 +129,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
|
|
|
128
129
|
For a **standalone named profile**:
|
|
129
130
|
|
|
130
131
|
```sh
|
|
131
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
132
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.12/dsh-github-copilot-0.4.2-alpha.12.tgz
|
|
132
133
|
```
|
|
133
134
|
|
|
134
|
-
For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.
|
|
135
|
+
For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.12`; stable versions publish on npm's `latest` dist-tag and prereleases on their channel tags. The official rc.2 **Desktop-bundled CLI** also supports reserved-profile plugin management; a global/generic `dsh` shim is not equivalent. Qualify the installed entry before use. See [Desktop CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) and the distinct [standalone offline procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles). Neither path authorizes registry-policy bypass, peer patches or configuration deletion.
|
|
135
136
|
|
|
136
137
|
After an approved reload/restart:
|
|
137
138
|
|
|
@@ -164,7 +165,7 @@ All three Auto preferences use the same account-verified, non-excluded eligible
|
|
|
164
165
|
| Complex | Powerful | Powerful | Powerful |
|
|
165
166
|
| Unknown | Versatile | Versatile | Powerful |
|
|
166
167
|
|
|
167
|
-
Categories come from authenticated supplier metadata, not model names, context capacity or measured quality rankings. Within the first fitting category,
|
|
168
|
+
Categories come from authenticated supplier metadata, not model names, context capacity or measured quality rankings. Within the first fitting category, positive cost weights and marked recency decay choose the model. The penalty applies to the previous high-cost model, not other marked peers, and resets to base weight after a different model's turn. Fit does not prove task success, and Auto does not add escalation or choose a weaker category for cost. Category fallback is explained explicitly. One real answer model stays fixed throughout each admitted turn's steps and retries; compaction preserves its independently resolved native summary route.
|
|
168
169
|
|
|
169
170
|
Semantic assessment is **enabled by default only for locally unknown tasks**. It makes at most one bounded auxiliary call with a **30-second default end-to-end deadline** and **128-token output budget**. Set `github-copilot.autoSemanticAssessment: false` to opt out. The native plugin configuration exposes `autoSemanticAssessmentTimeoutMs` (1000–120000 ms; `8000` restores the old budget) and `autoSemanticAssessmentModel` (empty for automatic selection, or an exact current-account model ID). They apply to subsequent assessments, not admitted retries. An unavailable/excluded/unsuitable explicit classifier reports unavailable, never silently switches. Automatic selection is metadata-driven, not measured optimal; the new default is a trial, not proof of past timeout causes. See [assessment settings](./docs/auto-task-routing.md#using-auto).
|
|
170
171
|
|
|
@@ -321,14 +322,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
321
322
|
GitHub Releases and npm distribute the same original verified tarball. Pin a version; verify Release SHA-256 or npm `dist.integrity`. Never repack an immutable release or move/reuse its tag.
|
|
322
323
|
|
|
323
324
|
```sh
|
|
324
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
325
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
325
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.12/dsh-github-copilot-0.4.2-alpha.12.tgz
|
|
326
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.12/SHA256SUMS
|
|
326
327
|
sha256sum --check SHA256SUMS
|
|
327
328
|
```
|
|
328
329
|
|
|
329
330
|
```powershell
|
|
330
331
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
331
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
332
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.12.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
332
333
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
333
334
|
```
|
|
334
335
|
|
package/README.zh.md
CHANGED
|
@@ -8,16 +8,17 @@
|
|
|
8
8
|
|
|
9
9
|
为 DSH 提供 GitHub Copilot 账号模型发现、上下文 Auto 选模和 hosted search。插件复用 DSH 公开的原生适配器,保留 profile 全局默认账号,并支持 Session 后续 turn 指定独立账号;不修改 Core,也不维护第二套模型目录。
|
|
10
10
|
|
|
11
|
-
**稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布预览版:`0.4.2-alpha.
|
|
11
|
+
**稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布预览版:`0.4.2-alpha.12`。** `0.4.2-alpha.1` 的发布预检失败,因此未发布;其不可变 tag 不会复用。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。稳定版也发布到 npm 的 `latest` dist-tag;预发布版本仍使用各自渠道 tag。稳定渠道不扩大已验证的宿主基线,也不证明实时账号、模型、搜索或 Desktop 健康状态。较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。
|
|
12
12
|
|
|
13
13
|
**从 0.4.0 升级:**首个正式版在同账号正常原生 OAuth 刷新时,可能以 `COPILOT_PREVIEW_CREDENTIAL_CHANGED` 中止并行托管请求。0.4.1 仅在插件拥有的原生刷新被精确验证,且账号、端点与权限连续时,保留已发出的 HTTP 流;后续请求重新验证认证与模型元数据。未知/外部凭据通知、撤销、取消与供应商拒绝仍明确报错,不承诺所有刷新无感,也不自动重试。参见[刷新边界](./docs/copilot-accounts.md#native-oauth-refresh-and-dispatched-requests-385)。
|
|
14
14
|
|
|
15
15
|
## 你可以做什么
|
|
16
16
|
|
|
17
17
|
**高成本 Auto:**在 **Manage → Model preferences** 中用 **High cost** 标记
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
模型。成本与任务难度正交:第一个可容纳输入的分类内,所有可容纳候选保留非零机会。
|
|
19
|
+
普通权重 `1` 可获得上一轮 `1.5×` 有限加权;高成本基础权重 `0.2`,
|
|
20
|
+
若上一轮用了该模型,本轮权重十倍衰减到 `0.02`,而不是获得连续性奖励。
|
|
21
|
+
这是一轮近期惩罚的声明试行参数,不是经过校准的质量判断;
|
|
21
22
|
标记不改变手动选择或已接纳的 turn。这是路由政策,不是价格/质量排名,也不证明节省费用。
|
|
22
23
|
|
|
23
24
|
现有 turn 选择说明内提供 **Auto allocation observations**,显示当前 Session
|
|
@@ -107,10 +108,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
107
108
|
**独立具名 profile**:
|
|
108
109
|
|
|
109
110
|
```sh
|
|
110
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
111
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.12/dsh-github-copilot-0.4.2-alpha.12.tgz
|
|
111
112
|
```
|
|
112
113
|
|
|
113
|
-
**Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.
|
|
114
|
+
**Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.12`;稳定版发布到 npm `latest` dist-tag,预发布版使用对应渠道 tag。官方 rc.2 **Desktop 随附的专属 CLI**也支持管理保留 profile;全局/普通 `dsh` shim 不等价。使用前核验实际安装入口,参见[Desktop CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及独立的[具名 profile 离线流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)。两种路径都不授权绕过包源政策、修改 peer 或删除配置。
|
|
114
115
|
|
|
115
116
|
经批准 reload/restart 后:
|
|
116
117
|
|
|
@@ -143,7 +144,7 @@ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/release
|
|
|
143
144
|
| 复杂 | Powerful | Powerful | Powerful |
|
|
144
145
|
| 未知 | Versatile | Versatile | Powerful |
|
|
145
146
|
|
|
146
|
-
|
|
147
|
+
分类来自认证后的供应方元数据,不按模型名、上下文容量或臆测质量排名。在第一个可容纳输入的分类内,按正成本权重和高成本近期衰减选择。惩罚只针对上一轮高成本模型,不影响其它已标记模型;换用其它模型一轮后恢复基础权重。可容纳不证明能解决任务,不自动升级求助,也不为成本降低分类。分类回退明确说明。同一已准入 turn 的工具步骤和重试保持同一真实回答模型;压缩保留独立解析的原生摘要路由。
|
|
147
148
|
|
|
148
149
|
语义判断**默认开启,仅用于本地需求未知的任务**。最多一次辅助请求,**默认 30 秒端到端期限、128 tokens 输出预算**。可用 `github-copilot.autoSemanticAssessment: false` 关闭。原生插件配置提供 `autoSemanticAssessmentTimeoutMs`(1000–120000 毫秒,`8000` 恢复旧预算)和 `autoSemanticAssessmentModel`(空字符串自动选择,或当前账号的精确模型 ID)。只影响后续评估,不改变已准入 turn 的重试。指定分类模型不存在/被排除/不合适时明确报告 unavailable,不偷偷换模型。自动选择依据元数据,不代表实测最优;30 秒是试验默认值,不证明过去主要因超时。参见[评估配置](./docs/auto-task-routing.md#using-auto)。
|
|
149
150
|
|
|
@@ -297,14 +298,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
297
298
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
298
299
|
|
|
299
300
|
```sh
|
|
300
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
301
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
301
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.12/dsh-github-copilot-0.4.2-alpha.12.tgz
|
|
302
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.12/SHA256SUMS
|
|
302
303
|
sha256sum --check SHA256SUMS
|
|
303
304
|
```
|
|
304
305
|
|
|
305
306
|
```powershell
|
|
306
307
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
307
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
308
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.12.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
308
309
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
309
310
|
```
|
|
310
311
|
|
package/deployment-baseline.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"package": {
|
|
10
10
|
"name": "dsh-github-copilot",
|
|
11
|
-
"version": "0.4.2-alpha.
|
|
11
|
+
"version": "0.4.2-alpha.12"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -1342,6 +1342,7 @@
|
|
|
1342
1342
|
"sourceMarkers": [
|
|
1343
1343
|
{"file": "src/auto-allocation.ts", "marker": "high-cost-v1"},
|
|
1344
1344
|
{"file": "src/auto-allocation.ts", "marker": "high-cost-v2"},
|
|
1345
|
+
{"file": "src/auto-allocation.ts", "marker": "high-cost-v3"},
|
|
1345
1346
|
{"file": "src/auto-allocation.ts", "marker": "deferredHighCostCount"},
|
|
1346
1347
|
{"file": "src/config.ts", "marker": "highCostModelIds"},
|
|
1347
1348
|
{"file": "src/model-preferences-card.ts", "marker": "High cost"},
|
|
@@ -1351,7 +1352,9 @@
|
|
|
1351
1352
|
{"file": "docs/auto-high-cost.md", "marker": "separate acceptance"}
|
|
1352
1353
|
],
|
|
1353
1354
|
"tests": [
|
|
1354
|
-
{"file": "tests/auto-allocation.spec.ts", "name": "simulates 20000 turns per previous state
|
|
1355
|
+
{"file": "tests/auto-allocation.spec.ts", "name": "simulates 20000 turns per previous state with positive cost-decayed opportunity"},
|
|
1356
|
+
{"file": "tests/auto-allocation.spec.ts", "name": "decays a marked previous model tenfold without eliminating its opportunity"},
|
|
1357
|
+
{"file": "tests/auto-allocation.spec.ts", "name": "keeps v2 hard-deferral evidence readable without relabeling it as v3"},
|
|
1355
1358
|
{"file": "tests/auto-allocation.spec.ts", "name": "keeps v1 historical weights readable without relabeling them as v2"},
|
|
1356
1359
|
{"file": "tests/auto-allocation-evidence.spec.ts", "name": "keeps legacy-only summaries v1 and separates mixed-policy decisions explicitly"},
|
|
1357
1360
|
{"file": "tests/auto-allocation-evidence.spec.ts", "name": "counts each turn once, bounds retention and never recovers missing evidence after removal"},
|
package/docs/auto-high-cost.md
CHANGED
|
@@ -42,35 +42,43 @@ unchanged official Core fixture, not that the affected live Host read the mark
|
|
|
42
42
|
before the historical Astra decision. Do not hardcode a model, change live
|
|
43
43
|
preferences or rewrite a frozen explanation to manufacture a repair.
|
|
44
44
|
|
|
45
|
-
## Routing policy
|
|
45
|
+
## Routing policy v3 (#412)
|
|
46
46
|
|
|
47
47
|
1. Account ownership, metadata validity, exclusion, input modality and input
|
|
48
48
|
headroom are hard requirements.
|
|
49
49
|
2. Assess each new turn using existing contextual local/semantic evidence.
|
|
50
50
|
Preserve existing demand categories and supplier-category fallback.
|
|
51
|
-
3. Inside the first fitting category only,
|
|
52
|
-
Defer fitting marked candidates; otherwise use the marked-only fallback tier.
|
|
51
|
+
3. Inside the first fitting category only, retain all fitting candidates.
|
|
53
52
|
Ordinary candidates have weight 1 and an eligible previous ordinary model
|
|
54
|
-
receives multiplier 1.5. Marked candidates have weight 0.2
|
|
53
|
+
receives multiplier 1.5. Marked candidates have base weight 0.2; the previous
|
|
54
|
+
marked model decays tenfold to 0.02 instead of receiving a continuity bonus.
|
|
55
55
|
4. Select from cumulative positive weights using a stable Agent/turn seed.
|
|
56
56
|
Capture the selected ID, candidate weights and conditional expected shares.
|
|
57
57
|
No additional model calls are made to give candidates a chance.
|
|
58
58
|
5. When no model fits, retain the largest-input-budget native recovery path.
|
|
59
59
|
Cost cannot justify choosing a model that cannot fit.
|
|
60
60
|
|
|
61
|
-
This
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
This corrects v2's over-strong hard deferral after the user clarified that high
|
|
62
|
+
cost should have rare opportunity and strongly decay after selection, not become
|
|
63
|
+
permanently unavailable. The 10x repeat penalty is a declared trial, not a
|
|
64
|
+
calibrated optimum. It uses existing previous-route evidence only; there is no
|
|
65
|
+
hidden multi-turn counter, persistent penalty, time cooldown or failed-task guess.
|
|
66
|
+
If the same marked model repeats, it remains at 0.02 rather than recursively
|
|
67
|
+
shrinking. A different model's turn resets it to 0.2. Other marked models retain
|
|
68
|
+
base weight. A lone fitting marked model is selected and an all-marked pool
|
|
69
|
+
remains usable. Fit and supplier
|
|
66
70
|
category cannot prove peers can solve the task; no automatic escalation, extra
|
|
67
71
|
calls, in-turn switch or lower-category substitution is introduced.
|
|
68
|
-
Every
|
|
69
|
-
marked
|
|
70
|
-
|
|
72
|
+
Every fitting final-pool candidate has positive opportunity. With one ordinary
|
|
73
|
+
peer, a marked model has share 2/17 (11.8%) when the ordinary model was previous,
|
|
74
|
+
then 1/51 (2.0%) when it was itself previous. The independent-draw approximation
|
|
75
|
+
for a predeclared pair is 2/867 (0.23%), not the probability of any streak in a
|
|
76
|
+
long Session or a guarantee against repeats. Stable seeds do not prove
|
|
77
|
+
independent random trials. Conditional shares are not observed billing.
|
|
71
78
|
|
|
72
|
-
Historical v1
|
|
73
|
-
|
|
79
|
+
Historical v1 retains mixed-pool weights and marked continuity; v2 retains hard
|
|
80
|
+
cost-tier deferral and its deferred count. Both remain readable unchanged.
|
|
81
|
+
Persistent cohorts retain original policy versions.
|
|
74
82
|
The Session summary separates incompatible policy cohorts and reports omitted
|
|
75
83
|
decisions instead of relabeling them or merging different opportunities.
|
|
76
84
|
|
|
@@ -81,7 +89,9 @@ five Sol turns followed by two Astra turns; its last 178 messages belonged to
|
|
|
81
89
|
one frozen turn. This does not establish a distribution violation. A conditional
|
|
82
90
|
two-peer seeded reproduction matches the two Astra choices, but the exact
|
|
83
91
|
historical pool was not retained. V2 implements the user's stricter preference,
|
|
84
|
-
not a claimed repair to a proven random-number defect.
|
|
92
|
+
not a claimed repair to a proven random-number defect. V3 supersedes v2's hard
|
|
93
|
+
exclusion with positive recency-decayed opportunity, without a live performance
|
|
94
|
+
claim.
|
|
85
95
|
|
|
86
96
|
The auxiliary semantic classifier is a separate call, not another main-turn
|
|
87
97
|
allocation. It prefers an unmarked eligible Lightweight classifier; if only
|
|
@@ -98,8 +108,8 @@ Synthetic acceptance covers ordinary/marked/all-marked/single pools, every
|
|
|
98
108
|
supplier category, exclusions, capacity, category changes, stable seeds,
|
|
99
109
|
preference changes and admitted-turn freezing. Distribution checks use large
|
|
100
110
|
declared seed sets and compare actual allocation with conditional expected
|
|
101
|
-
shares, including
|
|
102
|
-
|
|
111
|
+
shares, including marked previous models, all-marked/single pools, sequential
|
|
112
|
+
previous-route updates and backward-compatible v1/v2 evidence.
|
|
103
113
|
|
|
104
114
|
Runtime evidence must distinguish a selected decision from native attempted,
|
|
105
115
|
delivered, finished, failed and cancelled calls. Count a decision once per
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"feature": "autorouting",
|
|
4
4
|
"status": "insufficient-sample",
|
|
5
|
-
"policyVersion": "high-cost-
|
|
5
|
+
"policyVersion": "high-cost-v3",
|
|
6
6
|
"observation": {
|
|
7
7
|
"start": "2026-10-08T00:00:00Z",
|
|
8
8
|
"end": "2026-10-09T23:59:59Z",
|
|
9
9
|
"sampleCount": 63,
|
|
10
10
|
"limitations": "The declared 63-sample window is the prior alpha.2 review, not the newer cohort. Separate alpha.10 read-only profile aggregates on October 11 show Astra 3 selections across 18 conditional opportunities, summed expected selections 2.868. No Session IDs or sequence in aggregates. Bounded native metadata from the requested local Session shows five Sol turns followed by two Astra turns; the last has 178 steps under one frozen allocation. Tail scan is limited, not full history. Actual per-turn pool/weights are not durably retained. Two user-reported valid unknown classifier results are not a population unknown rate. No content, credentials or raw export uploaded."
|
|
11
11
|
},
|
|
12
|
-
"previousReview": "Prior
|
|
12
|
+
"previousReview": "Prior #332/#333/#334 and alpha.11 review delivered in #411. User clarified on October 11 that v2 hard deferral is too strong and requested rare opportunity with recency decay (#412).",
|
|
13
13
|
"findings": "Prior 63 decisions cannot attribute later incidents. Valid unknown is not a timeout. Projection regressions establish avoidable anchor loss/incidental-omission downgrade, not the actual task root cause. The reported Astra streak is two allocations, not 178 independent choices. Under an explicitly assumed two-model category pool, production Session/turn seeds reproduce both Astra choices at conditional shares 11.8% then 23.1%; this is conditional reproduction, not recovered decision evidence. A 20000-turn synthetic fixed-previous v1 scan yields 4563 Astra hits and 1014 adjacent pairs, showing runs are possible, not proving actual distribution conformity. No observed aggregate inflation is established. V1 intentionally grants marked continuity; the user now requests a stricter cost preference, not a statistically proven RNG repair.",
|
|
14
|
-
"decision": "
|
|
15
|
-
"validation": "
|
|
14
|
+
"decision": "Supersede v2 hard deferral with high-cost-v3 positive mixed-pool weights in the first fitting supplier category. Ordinary weight 1 retains previous multiplier 1.5; marked base 0.2 becomes 0.02 only when that exact model is previous. This 10x one-turn penalty is a declared uncalibrated trial; it resets after a different model and never compounds or adds hidden streak/cooldown state. Lone/all-marked pools remain usable. Preserve v1/v2 strict decoding, historical explanations and separate cohorts; no relabeling. Fit is not task success; no automatic escalation, retry, category weakening or in-turn switch. Retain alpha.11 classifier projection and all native guards. No new persistent population or measured quality/cost claim.",
|
|
15
|
+
"validation": "Five regression-first cost-decay tests failed before implementation. Full pnpm verify passed: 2779 Vitest tests, 2 expected skips, 340 tooling tests, source/test types, build and package smoke. Identical synthetic Session/turn seeds for 100000 sequential draws, updating previous selection each turn: v1 13371 marked selections and 3041 adjacent pairs; v3 10822 selections and 210 pairs. Conditional expected selections were 13277.26 and 10703.73 respectively. This declared two-model synthetic pool proves behavior, not independent production draws or task quality. Fixed-previous 20000-seed sets preserve opportunity/shares; legacy v1/v2 codecs/cohorts remain. Native saved-mark/restart fixture covers base and previous-header decay, executed by required CI. Pack/tarball verification passed; final archive must be rechecked after this review update. Required CI pending before merge. No real model calls, credential reads, profile changes or Desktop restart.",
|
|
16
16
|
"followUp": {
|
|
17
17
|
"owner": "Maintainer or Agent assigned to post-delivery review issue #334",
|
|
18
18
|
"trigger": "Review 200 new decisions with recorded reasons, or any further classifier capability/context/policy change; first inspect a successful unknown turn's projection and decoded-demand fields.",
|
|
19
|
-
"metric": "
|
|
20
|
-
"action": "Review
|
|
19
|
+
"metric": "By producer/policy, compare selected/no-fit and candidate opportunities versus conditional expected selections, splitting marked previous/base weights. Adjacent-turn rates require observed sequence, never infer them from daily aggregates. Retain valid unknown/projection limitations separately. Legacy absence is unknown; task quality and cost require independent evidence.",
|
|
20
|
+
"action": "Review whether positive high-cost opportunity and 10x repeat decay avoid over-strong exclusion without unwanted repeated selection; keep candidate changes and v1/v2/v3 separate. Check labeled task outcomes before interpreting lower high-cost usage as success or savings. Retain genuine uncertainty and linked #334. No automatic upload or live benchmark."
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -285,10 +285,11 @@ explicit fallback only, not fabricated categories. Unknown/new category values
|
|
|
285
285
|
remain unclassified with a bounded catalog diagnostic.
|
|
286
286
|
|
|
287
287
|
Within the first fitting category, use stable positive weighted Session/turn
|
|
288
|
-
allocation
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
288
|
+
allocation across all fitting candidates. Ordinary weight 1 has finite
|
|
289
|
+
previous-model multiplier 1.5; high-cost base weight 0.2 decays tenfold to 0.02
|
|
290
|
+
only for the previous model. Every candidate keeps positive opportunity; a lone
|
|
291
|
+
candidate still has share 1. A different model's turn resets the penalty, without
|
|
292
|
+
extra streak state. Cost is independent of task difficulty and supplier
|
|
292
293
|
category; input fit does not prove task success. Never weaken category or
|
|
293
294
|
automatically escalate to establish whether another model can solve the task.
|
|
294
295
|
These are reviewed policy parameters, not measured quality or prices. Once
|
|
@@ -58,8 +58,8 @@ remains authoritative after final framing/attachment projection.
|
|
|
58
58
|
Task preference uses supplier `model_picker_category`, not capacity, model
|
|
59
59
|
names or reasoning effort as quality rankings. [Task policy](./auto-task-routing.md)
|
|
60
60
|
owns the demand matrix, default semantic assessment, category fallback,
|
|
61
|
-
cost-
|
|
62
|
-
same-category
|
|
61
|
+
high-cost one-turn recency decay, ordinary finite continuity and stable
|
|
62
|
+
positive-weight same-category allocation.
|
|
63
63
|
User-marked high cost is orthogonal to demand and category; see
|
|
64
64
|
[high-cost requirements](./auto-high-cost.md). Future policy changes must read
|
|
65
65
|
the [latest review](./auto-iteration-review.json) before implementation.
|
package/lib/client.js
CHANGED
|
@@ -6331,7 +6331,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6331
6331
|
}
|
|
6332
6332
|
//#endregion
|
|
6333
6333
|
//#region lib/types/auto-allocation.js
|
|
6334
|
-
const AUTO_ALLOCATION_POLICIES = [
|
|
6334
|
+
const AUTO_ALLOCATION_POLICIES = [
|
|
6335
|
+
"high-cost-v1",
|
|
6336
|
+
"high-cost-v2",
|
|
6337
|
+
"high-cost-v3"
|
|
6338
|
+
];
|
|
6335
6339
|
const AutoAllocationSchema = object({
|
|
6336
6340
|
policyVersion: _enum(AUTO_ALLOCATION_POLICIES),
|
|
6337
6341
|
deferredHighCostCount: number().int().min(0).max(511).optional(),
|
|
@@ -6346,7 +6350,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6346
6350
|
}).strict().refine((value) => {
|
|
6347
6351
|
const total = value.candidates.reduce((sum, row) => sum + row.weight, 0);
|
|
6348
6352
|
const legacy = value.policyVersion === "high-cost-v1";
|
|
6349
|
-
|
|
6353
|
+
const decay = value.policyVersion === "high-cost-v3";
|
|
6354
|
+
return (legacy || decay ? value.deferredHighCostCount === void 0 : value.deferredHighCostCount !== void 0 && value.candidates.length + value.deferredHighCostCount <= 512 && value.candidates.every((row) => row.highCost === value.candidates[0].highCost) && (!value.candidates[0].highCost || value.deferredHighCostCount === 0)) && new Set(value.candidates.map((row) => row.modelId)).size === value.candidates.length && value.candidates.some((row) => row.modelId === value.selectedModelId) && value.candidates.filter((row) => row.previous).length <= 1 && value.candidates.every((row) => row.weight === (decay && row.highCost && row.previous ? 2 : (row.highCost ? 20 : 100) * (row.previous && (legacy || !row.highCost) ? 1.5 : 1)) / 100 && Math.abs(row.expectedShare - row.weight / total) <= 1e-12);
|
|
6350
6355
|
}, { message: "Invalid allocation policy evidence" });
|
|
6351
6356
|
//#endregion
|
|
6352
6357
|
//#region lib/types/auto-allocation-evidence.js
|
|
@@ -7509,7 +7514,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7509
7514
|
};
|
|
7510
7515
|
//#endregion
|
|
7511
7516
|
//#region package.json
|
|
7512
|
-
var version = "0.4.2-alpha.
|
|
7517
|
+
var version = "0.4.2-alpha.12";
|
|
7513
7518
|
//#endregion
|
|
7514
7519
|
//#region lib/types/diagnostics-client.js
|
|
7515
7520
|
let owner;
|
|
@@ -8416,7 +8421,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8416
8421
|
const conclusion = explanation.method === "no-fit" ? zh ? "没有候选能直接容纳估算输入;选中输入预算最大的模型,保留原生压缩或失败处理。" : "No candidate fits the estimated input. Selected the largest input budget for native recovery or failure." : explanation.fallback ? zh ? `目标分类 ${category[explanation.targetCategory]} 没有合格的可容纳候选,回退到 ${category[explanation.selectedCategory]}。` : `No eligible fitting ${category[explanation.targetCategory]} candidate; fell back to ${category[explanation.selectedCategory]}.` : explanation.assessment.diagnostic === "timeout" && explanation.assessment.demand === "unknown" ? zh ? `任务难度判断超时,需求仍不确定;按当前偏好兜底选择 ${category[explanation.selectedCategory]}。` : `Task assessment timed out; demand remains uncertain. The preference policy selected ${category[explanation.selectedCategory]} as a fallback.` : zh ? `本轮判断为${demand[explanation.assessment.demand]};按当前偏好选择 ${category[explanation.selectedCategory]} 类模型。` : `This task was assessed as ${demand[explanation.assessment.demand]}; the preference policy selected ${category[explanation.selectedCategory]}.`;
|
|
8417
8422
|
const allocation = explanation.allocation;
|
|
8418
8423
|
const selected = allocation?.candidates.find((row) => row.modelId === allocation.selectedModelId);
|
|
8419
|
-
const tier = allocation?.policyVersion !== "high-cost-v2" ? "" : (allocation.deferredHighCostCount ?? 0) > 0 ? zh ? `本轮成本层有未标记候选,暂缓 ${allocation.deferredHighCostCount} 个同类高成本候选。` : `The unmarked cost tier deferred ${allocation.deferredHighCostCount} fitting high-cost category candidates.` : selected?.highCost ? zh ? "该分类无可容纳的未标记候选,使用高成本兜底层;高成本模型不享受连续性加权。" : "No fitting unmarked candidate exists in this category; the high-cost fallback tier has no continuity bonus." : "";
|
|
8424
|
+
const tier = allocation?.policyVersion === "high-cost-v3" ? zh ? "所有可容纳的同类候选保留正机会;高成本基础权重 0.2,上一轮高成本模型衰减至 0.02,普通上一轮模型加权至 1.5。这是一轮近期惩罚,不是能力或实际费用判断。" : "All fitting category candidates retain positive opportunity. High-cost base weight is 0.2; a previous high-cost model decays to 0.02, while an ordinary previous model has weight 1.5. This is one-turn recency decay, not capability or actual cost evidence." : allocation?.policyVersion !== "high-cost-v2" ? "" : (allocation.deferredHighCostCount ?? 0) > 0 ? zh ? `本轮成本层有未标记候选,暂缓 ${allocation.deferredHighCostCount} 个同类高成本候选。` : `The unmarked cost tier deferred ${allocation.deferredHighCostCount} fitting high-cost category candidates.` : selected?.highCost ? zh ? "该分类无可容纳的未标记候选,使用高成本兜底层;高成本模型不享受连续性加权。" : "No fitting unmarked candidate exists in this category; the high-cost fallback tier has no continuity bonus." : "";
|
|
8420
8425
|
const weightedChoice = explanation.method === "weighted-distribution" ? selected === void 0 ? zh ? "按同类正权重政策分配;本轮候选观察未保留,不从当前设置推断。连续性仅为有限加权。" : "Allocated by positive within-category weights. Candidate observations were not retained; current settings cannot reconstruct them. Continuity is a finite bonus." : zh ? `在 ${explanation.categoryCandidateCount} 个同类可容纳候选中按正权重分配;选中模型${selected.highCost ? "已标记高成本" : "未标记高成本"},有效权重 ${selected.weight},本轮条件份额 ${(selected.expectedShare * 100).toFixed(1)}%。连续性仅为有限加权,不保证保留;这不是质量排名或实际费用。` : `Positive weighted allocation among ${explanation.categoryCandidateCount} fitting category candidates. Selected model is ${selected.highCost ? "marked high cost" : "unmarked"}, effective weight ${selected.weight}, conditional share ${(selected.expectedShare * 100).toFixed(1)}%. Continuity is a finite bonus, not a lock; this is not quality ranking or actual cost.` : explanation.method === "continuity" ? zh ? `该分类有 ${explanation.categoryCandidateCount} 个可容纳候选;上一轮模型仍合格,因此按连续性策略保留。这不是语义排名,也不证明它最适合任务。` : `This category has ${explanation.categoryCandidateCount} fitting candidates. Kept the previous model because it remains eligible, prioritizing continuity; this is not a semantic ranking or proof it is best for the task.` : explanation.method === "only-candidate" ? zh ? "该分类只有一个可容纳的合格候选。" : "Only one eligible fitting candidate remains in this category." : explanation.method === "equal-distribution" ? zh ? `该分类有 ${explanation.categoryCandidateCount} 个可容纳候选;按本轮稳定等权规则选中,不代表质量排名。` : `Selected among ${explanation.categoryCandidateCount} fitting category candidates by stable equal-weight allocation, not a quality ranking.` : zh ? "所有候选均不适配;这不是成功的偏好匹配。" : "All candidates are oversized; this is not a successful preference match.";
|
|
8421
8426
|
const choice = tier === "" ? weightedChoice : `${tier} ${weightedChoice}`;
|
|
8422
8427
|
const diagnostic = explanation.assessment.diagnostic === void 0 ? void 0 : explanation.assessment.diagnostic === "disabled" ? zh ? "语义判断实验未开启;这是本地规则的判断边界,不代表会话没有上下文。" : "Semantic assessment is disabled; this is a limit of local rules, not proof that the conversation lacks context." : explanation.assessment.diagnostic === "timeout" ? zh ? "辅助判断未在等待预算内完成,不代表正式回答超时或任务简单;本轮保留需求不确定,再按偏好策略选模。" : "The auxiliary assessment did not complete within its waiting budget. This is not a timeout of the main answer or evidence of simplicity; selection used the unknown-demand preference policy." : zh ? `语义判断未提供完整可用依据(${{
|