dsh-github-copilot 0.4.2-alpha.12 → 0.4.2-alpha.13
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 +9 -4
- package/CHANGELOG.md +12 -1
- package/README.md +9 -9
- package/README.zh.md +11 -8
- package/deployment-baseline.json +5 -3
- package/docs/auto-high-cost.md +68 -8
- package/docs/auto-iteration-review.json +6 -6
- package/docs/auto-task-routing.md +14 -9
- package/docs/automatic-model-routing.md +3 -1
- package/lib/client.js +46 -7
- package/lib/client.js.map +1 -1
- package/lib/diagnostics-analysis.js +1 -1
- package/lib/{diagnostics-types-DEo3UrOO.js → diagnostics-types-D5T4fto9.js} +54 -11
- package/lib/index.js +13 -28
- package/lib/manual-compaction-recovery.js +1 -1
- package/lib/remote.js +41 -3
- package/lib/types/auto-allocation-evidence.d.ts +1 -0
- package/lib/types/auto-allocation.d.ts +20 -3
- package/lib/types/auto-model-routing.d.ts +2 -1
- package/lib/types/turn-selection-host.d.ts +1 -1
- package/lib/types/turn-selection.d.ts +14 -0
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -368,13 +368,18 @@ 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.
|
|
372
|
-
|
|
371
|
+
remain explicit. High-cost-v4 retains every eligible fitting model across
|
|
372
|
+
categories with positive weight. Task/preference sets the favored target, not
|
|
373
|
+
hard category exclusion. Per-model category factors are target 1, second 0.25,
|
|
374
|
+
third 0.05, unknown 0.02 in the existing order, then multiplied by cost/recency.
|
|
375
|
+
These are uncalibrated trial factors, not fixed category probability quotas;
|
|
376
|
+
candidate populations affect shares. Ordinary weight 1 receives finite
|
|
373
377
|
previous-model multiplier 1.5; marked base 0.2 decays to 0.02 only for the previous
|
|
374
378
|
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
|
|
379
|
+
counter or task-failure inference. Preserve v1/v2/v3 historical codecs/cohorts and
|
|
376
380
|
their original explanation. Fit is not task
|
|
377
|
-
success;
|
|
381
|
+
success; non-target draws are intentional opportunity, not absence/failure of
|
|
382
|
+
target candidates. Never infer incapability or add task-failure escalation.
|
|
378
383
|
Capture actual reasons once
|
|
379
384
|
per turn without durable decision events or changing Usage.
|
|
380
385
|
`autoSemanticAssessment` is default-on by explicit user rollout request (#267),
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.4.2-alpha.
|
|
3
|
+
## 0.4.2-alpha.13 (prepared)
|
|
4
|
+
|
|
5
|
+
- Give every hard-eligible fitting model positive opportunity across supplier
|
|
6
|
+
categories. Replace hard category filtering with per-model target/second/third
|
|
7
|
+
factors 1/0.25/0.05 and explicit unknown 0.02, multiplied by existing cost and
|
|
8
|
+
one-turn recency weights. These are uncalibrated trial coefficients.
|
|
9
|
+
- Explain intentional non-target draws separately from target absence, record
|
|
10
|
+
each candidate's actual category, and preserve unchanged v1/v2/v3 evidence.
|
|
11
|
+
Keep exclusions, capability/account proof, input fit, native no-fit recovery,
|
|
12
|
+
frozen turns and auxiliary classifier ownership unchanged.
|
|
13
|
+
|
|
14
|
+
## 0.4.2-alpha.12 (published)
|
|
4
15
|
|
|
5
16
|
- Restore positive opportunity for all fitting same-category candidates instead
|
|
6
17
|
of v2's hard high-cost deferral. Marked base weight remains 0.2; the previous
|
package/README.md
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
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.13`.** `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
|
|
|
15
15
|
## What you can do
|
|
16
16
|
|
|
17
17
|
**High-cost Auto:** in **Manage → Model preferences**, mark costly models with
|
|
18
|
-
**High cost**. Cost and task difficulty are independent:
|
|
19
|
-
|
|
18
|
+
**High cost**. Cost and task difficulty are independent: across every category,
|
|
19
|
+
all eligible fitting candidates retain a nonzero chance. Ordinary
|
|
20
20
|
weight `1` gets a finite continuity bonus (`1.5×` for the previous model).
|
|
21
21
|
High-cost base weight is `0.2`; if that model was used in the previous turn,
|
|
22
22
|
its weight decays tenfold to `0.02` instead of receiving a bonus.
|
|
@@ -129,10 +129,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
|
|
|
129
129
|
For a **standalone named profile**:
|
|
130
130
|
|
|
131
131
|
```sh
|
|
132
|
-
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.13/dsh-github-copilot-0.4.2-alpha.13.tgz
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
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.13`; 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.
|
|
136
136
|
|
|
137
137
|
After an approved reload/restart:
|
|
138
138
|
|
|
@@ -165,7 +165,7 @@ All three Auto preferences use the same account-verified, non-excluded eligible
|
|
|
165
165
|
| Complex | Powerful | Powerful | Powerful |
|
|
166
166
|
| Unknown | Versatile | Versatile | Powerful |
|
|
167
167
|
|
|
168
|
-
Categories come from authenticated supplier metadata, not model names, context capacity or measured quality rankings.
|
|
168
|
+
Categories come from authenticated supplier metadata, not model names, context capacity or measured quality rankings. Every eligible fitting model retains positive opportunity across categories. The table above is the preferred target, not a hard filter: category factors are target `1`, second `0.25`, third `0.05`, unknown `0.02`, multiplied by cost/recency weights. These are uncalibrated trial coefficients, not fixed category probability quotas; candidate counts also affect shares. The penalty applies to the previous high-cost model, not other marked peers, and resets after a different model's turn. Fit does not prove task success; non-target selection is intentional opportunity, not task-failure escalation. One real answer model stays fixed throughout each admitted turn's steps and retries; compaction preserves its independently resolved native summary route.
|
|
169
169
|
|
|
170
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).
|
|
171
171
|
|
|
@@ -322,14 +322,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
322
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.
|
|
323
323
|
|
|
324
324
|
```sh
|
|
325
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
326
|
-
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.13/dsh-github-copilot-0.4.2-alpha.13.tgz
|
|
326
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.13/SHA256SUMS
|
|
327
327
|
sha256sum --check SHA256SUMS
|
|
328
328
|
```
|
|
329
329
|
|
|
330
330
|
```powershell
|
|
331
331
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
332
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
332
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.13.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
333
333
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
334
334
|
```
|
|
335
335
|
|
package/README.zh.md
CHANGED
|
@@ -8,14 +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.13`。** `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
|
-
|
|
18
|
+
模型。成本与任务难度正交:所有分类中合格且可容纳输入的候选保留非零机会。
|
|
19
|
+
任务分类只影响权重,不再硬筛选分类:目标、第二、第三分类分别乘 `1 / 0.25 / 0.05`,
|
|
20
|
+
分类未知明确使用 `0.02`,再乘成本与近期权重。这些系数是未校准试验,不是固定分类概率配额;
|
|
21
|
+
各分类模型数量也影响份额。非目标分类抽中不表示目标模型不存在或已经失败。
|
|
19
22
|
普通权重 `1` 可获得上一轮 `1.5×` 有限加权;高成本基础权重 `0.2`,
|
|
20
23
|
若上一轮用了该模型,本轮权重十倍衰减到 `0.02`,而不是获得连续性奖励。
|
|
21
24
|
这是一轮近期惩罚的声明试行参数,不是经过校准的质量判断;
|
|
@@ -108,10 +111,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
108
111
|
**独立具名 profile**:
|
|
109
112
|
|
|
110
113
|
```sh
|
|
111
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
114
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.13/dsh-github-copilot-0.4.2-alpha.13.tgz
|
|
112
115
|
```
|
|
113
116
|
|
|
114
|
-
**Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.
|
|
117
|
+
**Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.13`;稳定版发布到 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 或删除配置。
|
|
115
118
|
|
|
116
119
|
经批准 reload/restart 后:
|
|
117
120
|
|
|
@@ -144,7 +147,7 @@ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/release
|
|
|
144
147
|
| 复杂 | Powerful | Powerful | Powerful |
|
|
145
148
|
| 未知 | Versatile | Versatile | Powerful |
|
|
146
149
|
|
|
147
|
-
|
|
150
|
+
分类来自认证后的供应方元数据,不按模型名、上下文容量或臆测质量排名。上表是偏向的目标分类,不是硬筛选;所有分类中合格且可容纳的模型均按正权重抽选。惩罚只针对上一轮高成本模型,不影响其它已标记模型;换用其它模型一轮后恢复基础权重。可容纳不证明能解决任务,非目标分类抽中不表示目标模型已经失败,不自动升级求助。目标分类实际缺少可容纳候选时明确说明。同一已准入 turn 的工具步骤和重试保持同一真实回答模型;压缩保留独立解析的原生摘要路由。
|
|
148
151
|
|
|
149
152
|
语义判断**默认开启,仅用于本地需求未知的任务**。最多一次辅助请求,**默认 30 秒端到端期限、128 tokens 输出预算**。可用 `github-copilot.autoSemanticAssessment: false` 关闭。原生插件配置提供 `autoSemanticAssessmentTimeoutMs`(1000–120000 毫秒,`8000` 恢复旧预算)和 `autoSemanticAssessmentModel`(空字符串自动选择,或当前账号的精确模型 ID)。只影响后续评估,不改变已准入 turn 的重试。指定分类模型不存在/被排除/不合适时明确报告 unavailable,不偷偷换模型。自动选择依据元数据,不代表实测最优;30 秒是试验默认值,不证明过去主要因超时。参见[评估配置](./docs/auto-task-routing.md#using-auto)。
|
|
150
153
|
|
|
@@ -298,14 +301,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
298
301
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
299
302
|
|
|
300
303
|
```sh
|
|
301
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
302
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
304
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.13/dsh-github-copilot-0.4.2-alpha.13.tgz
|
|
305
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.13/SHA256SUMS
|
|
303
306
|
sha256sum --check SHA256SUMS
|
|
304
307
|
```
|
|
305
308
|
|
|
306
309
|
```powershell
|
|
307
310
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
308
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
311
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.13.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
309
312
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
310
313
|
```
|
|
311
314
|
|
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.13"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -1342,7 +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-
|
|
1345
|
+
{"file": "src/auto-allocation.ts", "marker": "high-cost-v4"},
|
|
1346
1346
|
{"file": "src/auto-allocation.ts", "marker": "deferredHighCostCount"},
|
|
1347
1347
|
{"file": "src/config.ts", "marker": "highCostModelIds"},
|
|
1348
1348
|
{"file": "src/model-preferences-card.ts", "marker": "High cost"},
|
|
@@ -1420,7 +1420,9 @@
|
|
|
1420
1420
|
{"file": "tests/scripts/parent-model-follow.test.mjs", "name": "explicit same-model and different-model child selections both win"},
|
|
1421
1421
|
{"file": "tests/auto-model-routing.spec.ts", "name": "retains legacy length evidence but does not use it as task or supplier category evidence"},
|
|
1422
1422
|
{"file": "tests/auto-model-routing.spec.ts", "name": "uses the task/category policy with one hard-eligible pool for all preferences"},
|
|
1423
|
-
{"file": "tests/auto-model-routing.spec.ts", "name": "uses finite continuity
|
|
1423
|
+
{"file": "tests/auto-model-routing.spec.ts", "name": "uses finite continuity as a multiplier and never lets it override input fit"},
|
|
1424
|
+
{"file": "tests/auto-category-distribution.spec.ts", "name": "retains positive opportunity for every fitting model for %s demand"},
|
|
1425
|
+
{"file": "tests/auto-category-distribution.spec.ts", "name": "attributes each candidate to its own category in bounded summaries and persistent cohorts"},
|
|
1424
1426
|
{"file": "tests/auto-model-routing.spec.ts", "name": "discloses category fallbacks and never guesses missing category from ID or capacity"},
|
|
1425
1427
|
{"file": "tests/auto-task-assessment.spec.ts", "name": "bounds context, never reads attachment/reasoning bodies, and does not downshift omitted context"},
|
|
1426
1428
|
{"file": "tests/auto-task-assessment.spec.ts", "name": "inherits difficult-task evidence only through explicit bounded continuations"},
|
package/docs/auto-high-cost.md
CHANGED
|
@@ -42,23 +42,38 @@ 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 v4 (#414)
|
|
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
|
-
Preserve existing demand categories
|
|
51
|
-
3.
|
|
50
|
+
Preserve existing demand categories as the target, not a hard pool filter.
|
|
51
|
+
3. Retain every eligible fitting candidate across categories. Multiply each
|
|
52
|
+
model's cost/recency weight by its category factor: target 1, second 0.25,
|
|
53
|
+
third 0.05, unknown 0.02. The order is Powerful/Versatile/Lightweight for a
|
|
54
|
+
Powerful target, Lightweight/Versatile/Powerful for Lightweight, and
|
|
55
|
+
Versatile/Powerful/Lightweight for Versatile. Unknown stays explicit, never
|
|
56
|
+
inferred from names or capacities. Missing protocol/capability proof remains
|
|
57
|
+
a hard admission failure, not an unknown-category opportunity.
|
|
52
58
|
Ordinary candidates have weight 1 and an eligible previous ordinary model
|
|
53
59
|
receives multiplier 1.5. Marked candidates have base weight 0.2; the previous
|
|
54
60
|
marked model decays tenfold to 0.02 instead of receiving a continuity bonus.
|
|
55
61
|
4. Select from cumulative positive weights using a stable Agent/turn seed.
|
|
56
|
-
Capture the selected ID, candidate
|
|
62
|
+
Capture the selected ID, each candidate's actual category and category factor,
|
|
63
|
+
final weights and conditional expected shares.
|
|
57
64
|
No additional model calls are made to give candidates a chance.
|
|
58
65
|
5. When no model fits, retain the largest-input-budget native recovery path.
|
|
59
66
|
Cost cannot justify choosing a model that cannot fit.
|
|
60
67
|
|
|
61
|
-
|
|
68
|
+
V4 corrects v3's hard category exclusion: a fitting non-target category now has
|
|
69
|
+
positive opportunity, even while the target has fitting models. Category factors
|
|
70
|
+
are deliberately biased but uncalibrated trial coefficients; task-quality,
|
|
71
|
+
switching-cost and real workload acceptance remain unverified. More models in
|
|
72
|
+
a category increase its total opportunity; these are per-model factors, not
|
|
73
|
+
fixed category probability quotas. A category with only high-cost models can
|
|
74
|
+
have lower total probability than an ordinary non-target category.
|
|
75
|
+
|
|
76
|
+
V3 corrected v2's over-strong hard deferral after the user clarified that high
|
|
62
77
|
cost should have rare opportunity and strongly decay after selection, not become
|
|
63
78
|
permanently unavailable. The 10x repeat penalty is a declared trial, not a
|
|
64
79
|
calibrated optimum. It uses existing previous-route evidence only; there is no
|
|
@@ -68,8 +83,10 @@ shrinking. A different model's turn resets it to 0.2. Other marked models retain
|
|
|
68
83
|
base weight. A lone fitting marked model is selected and an all-marked pool
|
|
69
84
|
remains usable. Fit and supplier
|
|
70
85
|
category cannot prove peers can solve the task; no automatic escalation, extra
|
|
71
|
-
calls
|
|
72
|
-
|
|
86
|
+
calls or in-turn switch is introduced. V4 intentionally permits non-target
|
|
87
|
+
categories; it does not infer they can solve the task.
|
|
88
|
+
Every fitting candidate has positive opportunity. In an isolated same-category
|
|
89
|
+
two-model pool, with one ordinary
|
|
73
90
|
peer, a marked model has share 2/17 (11.8%) when the ordinary model was previous,
|
|
74
91
|
then 1/51 (2.0%) when it was itself previous. The independent-draw approximation
|
|
75
92
|
for a predeclared pair is 2/867 (0.23%), not the probability of any streak in a
|
|
@@ -77,7 +94,8 @@ long Session or a guarantee against repeats. Stable seeds do not prove
|
|
|
77
94
|
independent random trials. Conditional shares are not observed billing.
|
|
78
95
|
|
|
79
96
|
Historical v1 retains mixed-pool weights and marked continuity; v2 retains hard
|
|
80
|
-
cost-tier deferral and its deferred count
|
|
97
|
+
cost-tier deferral and its deferred count; v3 retains hard category filtering
|
|
98
|
+
with positive cost/recency weights. All remain readable unchanged.
|
|
81
99
|
Persistent cohorts retain original policy versions.
|
|
82
100
|
The Session summary separates incompatible policy cohorts and reports omitted
|
|
83
101
|
decisions instead of relabeling them or merging different opportunities.
|
|
@@ -102,6 +120,48 @@ never count it as an ordinary Auto decision or hide auxiliary costs in Chat
|
|
|
102
120
|
Usage.
|
|
103
121
|
|
|
104
122
|
## Measurements and acceptance
|
|
123
|
+
|
|
124
|
+
### Reproducible v4 distribution trial
|
|
125
|
+
|
|
126
|
+
From a source checkout with dependencies installed and Node 24:
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
node --experimental-transform-types scripts/simulate-auto-distribution.mjs
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
This calls the real selector for 19 scenarios, 100000 draws each, using one
|
|
133
|
+
synthetic Session and ascending turns. Six synthetic models have two per
|
|
134
|
+
category; only Powerful A is marked. All capacities are 128000 with 8000 output
|
|
135
|
+
unless a scenario explicitly changes fit. IDs are fixtures, not an account
|
|
136
|
+
catalog. No credentials, discovery, model calls or profile mutation occur.
|
|
137
|
+
Rows report counts, averaged conditional expected share and observed frequency;
|
|
138
|
+
every positive-share row must be observed and differ by less than 0.5 percentage
|
|
139
|
+
points. Seed determinism does not establish independent random trials.
|
|
140
|
+
|
|
141
|
+
With no previous model, the twelve task/preference combinations collapse to
|
|
142
|
+
these three distinct pools. Observed percentages for 100000 draws each:
|
|
143
|
+
|
|
144
|
+
| Preferred target | Powerful A marked | Powerful B ordinary | Versatile A | Versatile B | Lightweight A | Lightweight B |
|
|
145
|
+
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
|
146
|
+
| Lightweight | 0.355 | 1.985 | 9.793 | 9.619 | 39.001 | 39.247 |
|
|
147
|
+
| Versatile | 2.157 | 10.346 | 41.589 | 41.725 | 2.058 | 2.125 |
|
|
148
|
+
| Powerful | 11.080 | 55.708 | 13.830 | 13.776 | 2.750 | 2.856 |
|
|
149
|
+
|
|
150
|
+
The respective theoretical percentages are:
|
|
151
|
+
Lightweight 0.390625/1.953125/9.765625/9.765625/39.0625/39.0625;
|
|
152
|
+
Versatile 2.083333/10.416667/41.666667/41.666667/2.083333/2.083333;
|
|
153
|
+
Powerful 11.111111/55.555556/13.888889/13.888889/2.777778/2.777778.
|
|
154
|
+
The task/preference target matrix still applies; it biases these probabilities.
|
|
155
|
+
|
|
156
|
+
For a Powerful target, fixed previous ordinary gives the marked model theoretical
|
|
157
|
+
8.6957%, observed 8.663%; fixed previous marked gives 1.2346%, observed 1.296%.
|
|
158
|
+
The sequential simulation updates previous after every draw: marked 8.577%,
|
|
159
|
+
ordinary Powerful 61.215%, Versatile 12.705%/12.632%, Lightweight 2.410%/2.461%,
|
|
160
|
+
with 93 adjacent marked pairs. These are fixture frequencies, not predictions
|
|
161
|
+
for current account pools. The script also covers both Powerful models marked,
|
|
162
|
+
one/both Powerful models failing input fit and mixed image support.
|
|
163
|
+
Hard-ineligible rows retain zero opportunity; there is no guaranteed finite
|
|
164
|
+
waiting time for any model.
|
|
105
165
|
|
|
106
166
|
Review the previous policy report before changing weights or continuity.
|
|
107
167
|
Synthetic acceptance covers ordinary/marked/all-marked/single pools, every
|
|
@@ -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-v4",
|
|
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 #332/#333/#334
|
|
12
|
+
"previousReview": "Prior #332/#333/#334, alpha.11 #411 and alpha.12 #413. User clarified on October 11 that every eligible fitting model should retain positive opportunity across categories, not just within one category (#414). No newer live v3 outcome sample is available; retain #334.",
|
|
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": "Five regression-first
|
|
14
|
+
"decision": "High-cost-v4 replaces hard category filtering with positive per-model category factors: target 1, second 0.25, third 0.05 in the existing category order, unknown explicitly 0.02. Multiply by v3 ordinary/previous/high-cost/previous-high-cost weights 1/1.5/0.2/0.02. All hard-eligible fitting models participate; exact exclusions, current account/capability proof, input modality and headroom remain hard guards. These are uncalibrated biased trial coefficients, not optimal probabilities, quality evidence or fixed category quotas. Candidate population affects category totals. Intentionally permit non-target draws without task-failure inference, extra calls or in-turn switches. No-fit native recovery and auxiliary classifier policy remain unchanged. Capture candidate category/factor; preserve strict v1/v2/v3 historical explanations/cohorts and no-evidence opt-out. No new persistent population or measured quality/cost claim.",
|
|
15
|
+
"validation": "Five regression-first cross-category tests failed under v3. V3 and v4 actual selectors each ran 19 synthetic scenarios with 100000 Session/turn seeds per scenario. V4 retained positive observed opportunity for all fitting candidates; every expected/observed share differed by less than 0.5 percentage points. The six-model sequential v4 fixture selected marked Powerful 8577 times and recorded 93 adjacent marked pairs; ordinary Powerful 61215, Versatile 12705/12632, Lightweight 2410/2461. This is implementation evidence, not independent production probability or quality. Checked-in scripts/simulate-auto-distribution.mjs reproduces the matrix. Full pnpm verify passed: 2788 Vitest tests, 2 expected skips, 340 tooling tests, types/build/package smoke. Final exact-weight codec refinement passed 21 focused tests. Correct candidate-category aggregation, strict factor validation, legacy v1/v2/v3 codecs and evidence opt-out are covered. Native gateways and saved-mark/restart run in required CI, pending before merge. Local pack/tarball passed; recheck the final candidate after this review update. No real model calls, credentials, live metadata 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": "By producer/policy, compare selected/no-fit
|
|
20
|
-
"action": "Review
|
|
19
|
+
"metric": "By producer/policy and target/actual candidate category, compare selected/no-fit counts, opportunities and conditional expected selections. Split marked previous/base weights and population changes. Adjacent-turn rates require observed sequence, never daily aggregates. Track labeled outcomes of non-target selections before interpreting selection diversity as success, quality or savings. Legacy absence remains unknown.",
|
|
20
|
+
"action": "Review cross-category opportunity and task-quality regressions before retaining or tuning the declared factors; keep v1/v2/v3/v4 separate. No automatic parameter tuning, upload or live benchmark. Revert soft-category policy if reviewed outcomes reject the trial; retain genuine uncertainty and linked #334."
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -275,23 +275,28 @@ same-turn single-flight, eligibility and category policy remain unchanged.
|
|
|
275
275
|
| Unknown | Versatile | Versatile | Powerful |
|
|
276
276
|
|
|
277
277
|
These are declared routing policies, not benchmark rankings. Efficiency's
|
|
278
|
-
routine lightweight
|
|
278
|
+
routine lightweight target is an economical approximation, not proof of
|
|
279
279
|
equal output quality. Intelligence never treats short length alone as simple.
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
The target and remaining categories have this declared weight order:
|
|
282
282
|
powerful -> versatile -> lightweight; versatile -> powerful -> lightweight;
|
|
283
|
-
lightweight -> versatile -> powerful. Unclassified candidates
|
|
284
|
-
explicit
|
|
283
|
+
lightweight -> versatile -> powerful. Unclassified candidates retain a small
|
|
284
|
+
explicit opportunity, not fabricated categories. Unknown/new category values
|
|
285
285
|
remain unclassified with a bounded catalog diagnostic.
|
|
286
286
|
|
|
287
|
-
|
|
288
|
-
allocation
|
|
287
|
+
Across every eligible fitting category, use stable positive weighted Session/turn
|
|
288
|
+
allocation. The task/preference matrix is a preferred target, not exclusion.
|
|
289
|
+
Multiply per-model cost/recency weights by category factors 1 / 0.25 / 0.05
|
|
290
|
+
in the existing target/second/third order; unknown category uses 0.02 explicitly.
|
|
291
|
+
These factors are an uncalibrated trial. Ordinary weight 1 has finite
|
|
289
292
|
previous-model multiplier 1.5; high-cost base weight 0.2 decays tenfold to 0.02
|
|
290
293
|
only for the previous model. Every candidate keeps positive opportunity; a lone
|
|
291
294
|
candidate still has share 1. A different model's turn resets the penalty, without
|
|
292
295
|
extra streak state. Cost is independent of task difficulty and supplier
|
|
293
|
-
category; input fit does not prove task success.
|
|
294
|
-
|
|
296
|
+
category; input fit does not prove task success. Non-target selection is
|
|
297
|
+
intentional weighted opportunity, not absence of a target candidate or proof
|
|
298
|
+
of task suitability. Never automatically escalate to establish whether
|
|
299
|
+
another model can solve the task.
|
|
295
300
|
These are reviewed policy parameters, not measured quality or prices. Once
|
|
296
301
|
admitted, all steps/retries share the decision. No supplier cache savings are
|
|
297
302
|
claimed. See [high-cost requirements](./auto-high-cost.md) and
|
|
@@ -304,7 +309,7 @@ never label this as a successful preference match or silently trim history.
|
|
|
304
309
|
## Explanation contract
|
|
305
310
|
|
|
306
311
|
Capture task source/demand/signals, assessment diagnostic, target/selected
|
|
307
|
-
category, fitting category count,
|
|
312
|
+
category, fitting cross-category count, target absence and continuity/tie-break or
|
|
308
313
|
no-fit selection at decision time. Client reads the explicit viewed Session and
|
|
309
314
|
turn through the existing strict Remote. It does not rerun classification or
|
|
310
315
|
consult today's picker. Show a decisive first sentence, bounded supporting
|
|
@@ -59,7 +59,9 @@ 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
61
|
high-cost one-turn recency decay, ordinary finite continuity and stable
|
|
62
|
-
positive-weight
|
|
62
|
+
positive-weight cross-category allocation. Every eligible fitting model has
|
|
63
|
+
positive opportunity; the task target biases per-model weights instead of
|
|
64
|
+
hard-filtering other categories. Unknown category stays explicit.
|
|
63
65
|
User-marked high cost is orthogonal to demand and category; see
|
|
64
66
|
[high-cost requirements](./auto-high-cost.md). Future policy changes must read
|
|
65
67
|
the [latest review](./auto-iteration-review.json) before implementation.
|
package/lib/client.js
CHANGED
|
@@ -6334,14 +6334,48 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6334
6334
|
const AUTO_ALLOCATION_POLICIES = [
|
|
6335
6335
|
"high-cost-v1",
|
|
6336
6336
|
"high-cost-v2",
|
|
6337
|
-
"high-cost-v3"
|
|
6337
|
+
"high-cost-v3",
|
|
6338
|
+
"high-cost-v4"
|
|
6338
6339
|
];
|
|
6340
|
+
const categories = [
|
|
6341
|
+
"powerful",
|
|
6342
|
+
"versatile",
|
|
6343
|
+
"lightweight",
|
|
6344
|
+
"unknown"
|
|
6345
|
+
];
|
|
6346
|
+
function autoCategoryWeight(category, target) {
|
|
6347
|
+
if (category === "unknown") return .02;
|
|
6348
|
+
return [
|
|
6349
|
+
1,
|
|
6350
|
+
.25,
|
|
6351
|
+
.05
|
|
6352
|
+
][(target === "powerful" ? [
|
|
6353
|
+
"powerful",
|
|
6354
|
+
"versatile",
|
|
6355
|
+
"lightweight"
|
|
6356
|
+
] : target === "lightweight" ? [
|
|
6357
|
+
"lightweight",
|
|
6358
|
+
"versatile",
|
|
6359
|
+
"powerful"
|
|
6360
|
+
] : [
|
|
6361
|
+
"versatile",
|
|
6362
|
+
"powerful",
|
|
6363
|
+
"lightweight"
|
|
6364
|
+
]).indexOf(category)];
|
|
6365
|
+
}
|
|
6339
6366
|
const AutoAllocationSchema = object({
|
|
6340
6367
|
policyVersion: _enum(AUTO_ALLOCATION_POLICIES),
|
|
6368
|
+
targetCategory: _enum([
|
|
6369
|
+
"powerful",
|
|
6370
|
+
"versatile",
|
|
6371
|
+
"lightweight"
|
|
6372
|
+
]).optional(),
|
|
6341
6373
|
deferredHighCostCount: number().int().min(0).max(511).optional(),
|
|
6342
6374
|
selectedModelId: string().min(1).max(512),
|
|
6343
6375
|
candidates: array(object({
|
|
6344
6376
|
modelId: string().min(1).max(512),
|
|
6377
|
+
category: _enum(categories).optional(),
|
|
6378
|
+
categoryWeight: number().positive().max(1).optional(),
|
|
6345
6379
|
highCost: boolean(),
|
|
6346
6380
|
previous: boolean(),
|
|
6347
6381
|
weight: number().positive().max(1.5),
|
|
@@ -6350,8 +6384,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6350
6384
|
}).strict().refine((value) => {
|
|
6351
6385
|
const total = value.candidates.reduce((sum, row) => sum + row.weight, 0);
|
|
6352
6386
|
const legacy = value.policyVersion === "high-cost-v1";
|
|
6353
|
-
const
|
|
6354
|
-
|
|
6387
|
+
const soft = value.policyVersion === "high-cost-v4";
|
|
6388
|
+
const decay = value.policyVersion === "high-cost-v3" || soft;
|
|
6389
|
+
const categoryValid = soft ? value.targetCategory !== void 0 && value.candidates.every((row) => row.category !== void 0 && row.categoryWeight === autoCategoryWeight(row.category, value.targetCategory)) : value.targetCategory === void 0 && value.candidates.every((row) => row.category === void 0 && row.categoryWeight === void 0);
|
|
6390
|
+
const tierValid = 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);
|
|
6391
|
+
return categoryValid && tierValid && 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)) * (soft ? Math.round(row.categoryWeight * 100) : 100) / 1e4 && Math.abs(row.expectedShare - row.weight / total) <= 1e-12);
|
|
6355
6392
|
}, { message: "Invalid allocation policy evidence" });
|
|
6356
6393
|
//#endregion
|
|
6357
6394
|
//#region lib/types/auto-allocation-evidence.js
|
|
@@ -6385,6 +6422,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6385
6422
|
//#endregion
|
|
6386
6423
|
//#region lib/types/turn-selection.js
|
|
6387
6424
|
const ExplanationSchema = object({
|
|
6425
|
+
allocationPolicy: literal("high-cost-v4").optional(),
|
|
6388
6426
|
assessment: TaskAssessmentSchema.extend({
|
|
6389
6427
|
source: _enum(["local", "semantic"]),
|
|
6390
6428
|
diagnostic: _enum([
|
|
@@ -7514,7 +7552,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7514
7552
|
};
|
|
7515
7553
|
//#endregion
|
|
7516
7554
|
//#region package.json
|
|
7517
|
-
var version = "0.4.2-alpha.
|
|
7555
|
+
var version = "0.4.2-alpha.13";
|
|
7518
7556
|
//#endregion
|
|
7519
7557
|
//#region lib/types/diagnostics-client.js
|
|
7520
7558
|
let owner;
|
|
@@ -8418,11 +8456,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8418
8456
|
"context-omitted": zh ? "判断上下文不完整" : "incomplete assessment context",
|
|
8419
8457
|
"insufficient-evidence": zh ? "本地规则尚不能确定任务需求" : "local rules cannot establish task demand"
|
|
8420
8458
|
};
|
|
8421
|
-
const
|
|
8459
|
+
const soft = explanation.allocationPolicy === "high-cost-v4" || explanation.allocation?.policyVersion === "high-cost-v4";
|
|
8460
|
+
const conclusion = explanation.method === "no-fit" ? zh ? "没有候选能直接容纳估算输入;选中输入预算最大的模型,保留原生压缩或失败处理。" : "No candidate fits the estimated input. Selected the largest input budget for native recovery or failure." : soft ? zh ? `本轮判断为${demand[explanation.assessment.demand]};偏向 ${category[explanation.targetCategory]},本轮抽中 ${category[explanation.selectedCategory]}。${explanation.fallback ? "目标分类没有可容纳的合格候选。" : ""}` : `This task was assessed as ${demand[explanation.assessment.demand]}; weights favor ${category[explanation.targetCategory]}, and this draw selected ${category[explanation.selectedCategory]}.${explanation.fallback ? " No eligible fitting target-category candidate remains." : ""}` : 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]}.`;
|
|
8422
8461
|
const allocation = explanation.allocation;
|
|
8423
8462
|
const selected = allocation?.candidates.find((row) => row.modelId === allocation.selectedModelId);
|
|
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." : "";
|
|
8425
|
-
const weightedChoice = explanation.method === "weighted-distribution" ? selected === void 0 ? zh ? "
|
|
8463
|
+
const tier = soft ? zh ? "所有合格且可容纳输入的模型保留正机会;目标、第二、第三分类权重为 1 / 0.25 / 0.05,分类未知为 0.02。再乘成本与近期因素:普通 1,普通上一轮 1.5,高成本 0.2,高成本上一轮 0.02。系数是未校准试验,不是能力或实际费用判断。" : "Every eligible fitting model retains positive opportunity. Target/second/third category factors are 1 / 0.25 / 0.05; unclassified is 0.02. Multiply by cost/recency factors: ordinary 1, previous ordinary 1.5, high cost 0.2, previous high cost 0.02. These are uncalibrated trial coefficients, not capability or actual cost evidence." : 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." : "";
|
|
8464
|
+
const weightedChoice = explanation.method === "weighted-distribution" ? selected === void 0 ? zh ? `按${soft ? "跨分类" : "同类"}正权重政策分配;本轮候选观察未保留,不从当前设置推断。连续性仅为有限加权。` : `Allocated by positive ${soft ? "cross-category" : "within-category"} weights. Candidate observations were not retained; current settings cannot reconstruct them. Continuity is a finite bonus.` : zh ? `在 ${explanation.categoryCandidateCount} 个${soft ? "跨分类" : "同类"}可容纳候选中按正权重分配;选中模型${selected.highCost ? "已标记高成本" : "未标记高成本"},有效权重 ${selected.weight},本轮条件份额 ${(selected.expectedShare * 100).toFixed(1)}%。连续性仅为有限加权,不保证保留;这不是质量排名或实际费用。` : `Positive weighted allocation among ${explanation.categoryCandidateCount} fitting ${soft ? "cross-category" : "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 ? `${soft ? "所有分类中" : "该分类"}只有一个可容纳的合格候选。` : `Only one eligible fitting candidate remains ${soft ? "across all categories" : "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.";
|
|
8426
8465
|
const choice = tier === "" ? weightedChoice : `${tier} ${weightedChoice}`;
|
|
8427
8466
|
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 ? `语义判断未提供完整可用依据(${{
|
|
8428
8467
|
unavailable: "没有可用分类模型",
|