dsh-github-copilot 0.4.0-alpha.79 → 0.4.0-alpha.81
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 +13 -0
- package/CHANGELOG.md +14 -0
- package/README.md +17 -8
- package/README.zh.md +17 -8
- package/deployment-baseline.json +23 -2
- package/docs/auto-task-routing.md +114 -0
- package/docs/automatic-model-routing.md +28 -21
- package/docs/copilot-compaction.md +4 -0
- package/docs/model-compatibility-acceptance.md +1 -0
- package/lib/client.js +97 -9
- package/lib/client.js.map +1 -1
- package/lib/index.js +609 -163
- package/lib/remote.js +53 -1
- package/lib/types/account-model-catalog.d.ts +3 -0
- package/lib/types/auto-model-host.d.ts +4 -0
- package/lib/types/auto-model-routing.d.ts +15 -3
- package/lib/types/auto-selection-explanation.d.ts +8 -0
- package/lib/types/auto-task-assessment.d.ts +45 -0
- package/lib/types/auto-task-classifier.d.ts +7 -0
- package/lib/types/config.d.ts +11 -4
- package/lib/types/copilot-stream-liveness.d.ts +23 -0
- package/lib/types/preview-provider.d.ts +5 -0
- package/lib/types/preview-route.d.ts +3 -1
- package/lib/types/remote.d.ts +1 -1
- package/lib/types/turn-selection.d.ts +52 -0
- package/package.json +2 -1
package/AGENTS.md
CHANGED
|
@@ -73,6 +73,7 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
|
|
|
73
73
|
- `src/traditional-search.ts`: `github-copilot-hosted` `ctx.web` provider.
|
|
74
74
|
- `src/serialize.ts`, `src/sse.ts`, `src/failure.ts`: protocol conversion and bounded error handling.
|
|
75
75
|
- `src/response-error-body.ts`, `src/request-body-timeout.ts`: bounded clone-only HTTP error evidence and safe managed upload-timeout guidance. Exact verified `408/user_request_timeout` preserves native failure classification/retry metadata; final JSON bytes are not tokens or a payload limit. Never infer overflow, auto-compact, trim history, switch models or add retries from a 408.
|
|
76
|
+
- `src/copilot-stream-liveness.ts`: request-local HTTP/SSE byte-idle observation, paired with the public native adapter's bounded assistant-chunk deadline. Default five-minute byte idle and ten-minute semantic silence; no fake assistant output, private watchdog access, new retry or Core patch. Consumer think time is excluded; explicit WebSocket/auto stays native-only. `chatStreamLiveness: false` restores native-only timing. `chatMaxRequestImageBytes` retains Core's 20 MiB default; smaller explicit settings authorize only native image offload, not hidden history trimming or a guessed supplier limit. Synthetic heartbeat evidence is not production heartbeat proof.
|
|
76
77
|
- `tests/`: unit and integration evidence; mirror the source area being changed.
|
|
77
78
|
- `deployment-baseline.json`: declared machine-readable compatibility and capability evidence inventory.
|
|
78
79
|
- `scripts/verify-deployment-baseline.mjs`: invariant drift gate.
|
|
@@ -239,6 +240,18 @@ Never say GPT-6/search works merely because settings, typecheck or a package imp
|
|
|
239
240
|
|
|
240
241
|
## Changing capabilities
|
|
241
242
|
|
|
243
|
+
Auto task routing (#258) uses current `model_picker_category` facts, never model
|
|
244
|
+
names, effort or context capacity as a quality category. Hard eligibility/input
|
|
245
|
+
fit precede task/preference policy; unknown category and uncertain task evidence
|
|
246
|
+
remain explicit. Keep suitable previous-model continuity and equal-weight
|
|
247
|
+
tie-breaking within the first available category. Capture actual reasons once
|
|
248
|
+
per turn without durable decision events or changing Usage. The optional
|
|
249
|
+
`autoSemanticAssessment` experiment is off by default: one bounded concrete
|
|
250
|
+
native-adapter request, no tools/Auto recursion/new retry, explicit failures and
|
|
251
|
+
omitted-context conservatism. Extra supplier charges are separate from Chat
|
|
252
|
+
Usage. Require labeled-corpus calibration before enabling by default; synthetic
|
|
253
|
+
tests do not prove GitHub-private routing equivalence. See `docs/auto-task-routing.md`.
|
|
254
|
+
|
|
242
255
|
The turn selection Host endpoint must use `TurnSelectionController`, extending
|
|
243
256
|
public `TypertRemoteService` with `@Remote get`. A plain `ctx.provide` object
|
|
244
257
|
cannot supply the native gateway binding or source method discovery. Test both
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0-alpha.81 (prepared)
|
|
4
|
+
|
|
5
|
+
- Route Auto through current supplier Powerful/Versatile/Lightweight categories and contextual task evidence instead of advertised-capacity bands (#258). Preserve hard input/image/exclusion/account admission and native no-fit recovery.
|
|
6
|
+
- Use Lightweight for isolated greetings even with Intelligence, retain capable targets for short hard work, prefer suitable previous-model continuity, and distribute only equal-category candidates.
|
|
7
|
+
- Explain the actual captured turn choice, category fallback and continuity/tie-break in the footer; old records explicitly lack detailed reasons rather than displaying generic reconstructed text.
|
|
8
|
+
- Add an off-by-default bounded semantic-assessment experiment through the existing native adapter. Strict output, omitted-context conservatism, cancellation and diagnostic fallback remain; extra calls add latency and supplier charges outside native Chat Usage. Synthetic tests do not establish calibrated accuracy or GitHub-private parity.
|
|
9
|
+
|
|
10
|
+
## 0.4.0-alpha.80 (prepared)
|
|
11
|
+
|
|
12
|
+
- Observe real HTTP/SSE byte progress on managed requests, retaining the original five-minute byte-idle bound while allowing at most ten minutes without a native assistant chunk (#253).
|
|
13
|
+
- Preserve native SDK parsing, exact stream bytes, caller cancellation and retry ownership; endless heartbeats remain bounded and explicit WebSocket/auto transport keeps native behavior.
|
|
14
|
+
- Add separate managed-chat timeout/opt-out settings and a configurable native image-request budget with the unchanged 20 MiB default. No hidden history trimming, automatic model switch, extra retry or claim to cure HTTP 408.
|
|
15
|
+
- Reproduce heartbeat-only semantic timeouts and verify real late output, actual byte stalls and cleanup through unchanged native adapters.
|
|
16
|
+
|
|
3
17
|
## 0.4.0-alpha.79 (prepared)
|
|
4
18
|
|
|
5
19
|
- Bind retained turn selection reads through the public `TypertRemoteService` and `@Remote get`, fixing the Host registration missing from the alpha.76 Client-only correction (#254).
|
package/README.md
CHANGED
|
@@ -32,6 +32,8 @@ On official rc.2, routing is exposed through native live `Config` fields, not a
|
|
|
32
32
|
|
|
33
33
|
Managed Copilot HTTP `408 / user_request_timeout` with the verified request-body timeout message now reports `COPILOT_REQUEST_BODY_TIMEOUT` and the final JSON request's UTF-8 byte count when observable. Bytes are not context tokens, and a request-body timeout does not prove context overflow. Native retries and failure classification remain unchanged. If retries exhaust, explicitly compact the conversation or reduce attachments/tool output before retrying, and check network/proxy health and [GitHub service status](https://www.githubstatus.com/). Compaction is not guaranteed to succeed or cure network/service faults; increasing a client timeout cannot change the server timeout. No automatic history trimming, model switch, compaction or new retry loop is introduced. Unknown errors retain native behavior.
|
|
34
34
|
|
|
35
|
+
Managed HTTP/SSE chat now distinguishes **byte idle** from **assistant-output silence**. Native Core ignores SSE heartbeats when timing assistant chunks; synthetic unchanged-adapter tests reproduce a timeout despite incoming bytes. By default, five minutes without response headers/nonempty body bytes still fails, but real byte progress permits up to ten minutes without an assistant chunk. Endless heartbeats cannot postpone failure indefinitely, and consumer think time is excluded. `chatStreamLiveness: false` restores native-only timing; explicit WebSocket/`auto` transport remains native-only. This fixes the reproduced false-idle mechanism, not every retry or upstream HTTP 408, and does not establish heartbeat activity in a production incident.
|
|
36
|
+
|
|
35
37
|
| DSH surface | Exact source pin | Models UI seam |
|
|
36
38
|
|---|---|---|
|
|
37
39
|
| Controlled Desktop `0.1.1-rc.2` baseline | Controlled Core commit [`a772dbb`](https://github.com/cloga/deepseek-harness/commit/a772dbbde82780bff2b9394427e9f0a24cafa1d5) on `cloga-pi-ai-model-api` | Dedicated **Settings → GitHub Copilot** section |
|
|
@@ -106,7 +108,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
|
|
|
106
108
|
|
|
107
109
|
## Install and sign in
|
|
108
110
|
|
|
109
|
-
The commands below target the package version `0.4.0-alpha.
|
|
111
|
+
The commands below target the package version `0.4.0-alpha.81`. Versioned URLs describe the intended release artifacts, not proof that publication or local activation has completed; use them only once that Release and its checksums are available. Install into the profile you use (replace `web` when targeting another profile):
|
|
110
112
|
|
|
111
113
|
Before installing/updating, unpack the **checksum-verified** archive into a temporary directory and run its read-only composition preflight (replace all paths with absolute paths for the intended profile):
|
|
112
114
|
|
|
@@ -119,10 +121,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
|
|
|
119
121
|
For a standalone named profile only, the supported CLI command is:
|
|
120
122
|
|
|
121
123
|
```sh
|
|
122
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
124
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.81/dsh-github-copilot-0.4.0-alpha.81.tgz
|
|
123
125
|
```
|
|
124
126
|
|
|
125
|
-
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.
|
|
127
|
+
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.81` after the same preflight and only when registry access is permitted. Desktop reserves its `desktop` profile from CLI management. If registry access is blocked or unavailable, stop; the documented [controlled offline CLI procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles) is not a Desktop workaround.
|
|
126
128
|
|
|
127
129
|
Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in**, and complete the GitHub device-code flow. Plugin installation changes the selected profile; activation follows that profile's normal reload/restart policy.
|
|
128
130
|
|
|
@@ -140,10 +142,14 @@ If preferences cannot be read, available account rows remain visible but read-on
|
|
|
140
142
|
|
|
141
143
|
**One setting for subagents:** in the plugin configuration page, turn on **Subagent models → Follow parent model** and Save. It applies to existing and new supported Copilot subagents and Team mates, without Session IDs or per-child setup. A fixed parent model takes effect on each child's next turn; Auto inherits the same preference but chooses using each child's own context. Running turns stay unchanged and child-owned manual selections still win. Default Off (`github-copilot.followParentModel: false`). Enabling replaces creation-time model choices; it never clears explicit child selection history. Legacy `parentModelFollow` bindings remain active independently and are not migrated. See [requirements, mockup and boundaries](./docs/parent-model-follow.md). Native Team creation labels are not rewritten.
|
|
142
144
|
|
|
143
|
-
The managed GitHub Copilot group includes **Auto · Balance**, **Auto · Efficiency**, and **Auto · Intelligence** as flat virtual picker rows. They share one account-verified eligible pool after applying exact model exclusions
|
|
145
|
+
The managed GitHub Copilot group includes **Auto · Balance**, **Auto · Efficiency**, and **Auto · Intelligence** as flat virtual picker rows. They share one account-verified eligible pool after applying exact model exclusions and input-fit filtering. Routing now uses the account's **Powerful / Versatile / Lightweight** classification and conservative contextual task assessment, not reasoning effort or context capacity as a quality ranking. Even Intelligence uses Lightweight for an isolated greeting; short difficult reasoning stays Powerful. Unknown tasks prefer Versatile with Balance/Efficiency and Powerful with Intelligence. Suitable previous-model continuity wins before stable equal-weight category tie-breaking. Missing categories and fallback remain explicit. If no candidate fits, Auto preserves largest-input-budget native recovery; if none is eligible, it fails closed. One decision stays fixed across the turn's tool steps, retries and compaction. Images retain their independent verified admission. Search, actual model/Usage and histories remain native-owned. See the [task policy and limits](./docs/auto-task-routing.md) and [parent-inheritance boundary](./docs/automatic-model-routing.md#requested-parent-to-child-selection-inheritance). Core's picker remains flat.
|
|
146
|
+
|
|
147
|
+
The optional `github-copilot.autoSemanticAssessment: true` experiment recognizes contextual tasks with one bounded auxiliary model call; it is **off by default** until calibrated. It adds latency and supplier charges not included in native chat Usage. Failure or omitted assessment context never means the task is simple; it retains conservative local evidence. This is a local routing approximation, not GitHub's private Auto service.
|
|
144
148
|
|
|
145
149
|
Completed Copilot replies show **Auto (preference)** and an expandable recorded reason after native Usage/time, or **Manual** only with captured explicit fixed-selection evidence. A successful read with no retained evidence shows **Selection unknown**, never a guess from today's picker. Failed reads instead show **Selection unavailable → Retry**; retry only reads the same turn's record, not another model request. Explicit Session/turn arguments remain stable inside a session-bound Chat, avoiding the former native gateway argument-count failure on fresh master/lead replies. There is no repeated model name or separate Model details button: actual model display stays in native Usage, whose missing-route behavior is unchanged. New selection records are bounded and Host-local; restart, disposal or eviction loses them. Compatible historical Auto records remain readable. The public assistant-actions slot supports internal wrapping only, not changing the native fixed-height row.
|
|
146
150
|
|
|
151
|
+
The information button explains this turn's captured task/category choice, fallback and continuity/tie-breaking. Supporting assessment facts sit in a disclosure; older records without details explicitly say that the reason was not retained.
|
|
152
|
+
|
|
147
153
|
The selection footer mounts independently of optional conversation projections. Native completed-turn evidence lets retained Auto/Manual records remain visible if those projections are unavailable; incomplete attribution stays explicit in the information disclosure. This does not restore lost selection records or prove that an installed update is loaded in Desktop.
|
|
148
154
|
|
|
149
155
|
Alpha.79 also fixes the Host half of selection reads: the retained decision store is now exposed through the public Remote service binding and method marker, not a plain provided object rejected by the native gateway. Actual Client-to-Host roundtrips cover both source discovery and strict descriptors. This complements alpha.76's Client argument fix; it does not recover lost records or change Auto model selection.
|
|
@@ -177,7 +183,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
|
|
|
177
183
|
5. Confirm **Signed in** and inspect the automatic discovery result before asking the user to choose a model. Already-signed-in Models opening ensures missing/stale metadata automatically; fresh ready cache makes no request. Use visible **Retry** for errors or **Manage → Refresh models** for an intentional forced update, not routine setup. Status alone does not discover, and login, metadata and successful model calls remain separate evidence.
|
|
178
184
|
6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
|
|
179
185
|
|
|
180
|
-
GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.
|
|
186
|
+
GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.81`, not a URL or file. Controlled offline CLI maintenance is documented for standalone named profiles only, never Desktop-managed profiles. Follow the mandatory search-composition preflight, backup, single-writer and post-install checks; do not bypass a corporate registry ban, disable TLS verification or restart without separate approval. See [distribution and publication requirements](./docs/npm-distribution.md).
|
|
181
187
|
|
|
182
188
|
**Desktop package-update and Web-lifecycle boundaries:** the native manager's `restart-required` result for an in-place installed-package upgrade is authoritative and distinct from plugin-bundle removal/re-add behavior. Any disable, removal, or upgrade involving service recomposition (`cordis.patch.yml`, such as the isolated routed web search layer) may leave dependent entries pending until Desktop is fully exited and cold-restarted. If the native manager reports only entries such as `pending (waiting for service: web)` while this plugin already shows **Off**, the requested disabled state has been persisted; cold-restart Desktop instead of repeatedly toggling or reinstalling the plugin. Other errors are not covered by this guidance and must still be investigated.
|
|
183
189
|
|
|
@@ -363,6 +369,9 @@ The plugin details page exposes only **Search provider** and **Fallback provider
|
|
|
363
369
|
|---|---:|---|
|
|
364
370
|
| `accountModelTtlMs` | `86400000` | Maximum account-metadata reuse window in milliseconds (24h); does not extend credentials or proof validity. |
|
|
365
371
|
| `accountModelFailureCooldownMs` | `300000` | Failure cooldown in milliseconds (5min) for non-forcing discovery; no periodic retries. |
|
|
372
|
+
| `chatStreamIdleTimeoutMs` | `300000` | Managed chat byte-idle interval; native assistant-chunk silence is bounded to twice this interval when liveness is enabled (maximum 2147483647 ms). Separate from hosted search. |
|
|
373
|
+
| `chatStreamLiveness` | `true` | Observe actual HTTP/SSE bytes without synthetic assistant output; `false` restores native-only timing. Explicit WebSocket/`auto` transport is unchanged. |
|
|
374
|
+
| `chatMaxRequestImageBytes` | `20971520` | Native outgoing image budget (20 MiB), not a total JSON/supplier limit. A smaller explicit value lets Core offload older images to mapped read-only paths; original history stays intact, but outgoing image visibility changes. |
|
|
366
375
|
| `requestBudgetSafetyTokens` | `4096` | Non-negative safe-integer estimated input allowance; larger values reduce available input. |
|
|
367
376
|
| `requestBudgetPressureRatio` | `0.9` | Fraction (0.01–1, step 0.01) for early local pressure, only with supported enabled stock recovery. |
|
|
368
377
|
| `compactionReasoning` | `prefer-low` | Choose supported minimal/low only when summary effort is absent; `preserve` keeps native defaults. |
|
|
@@ -456,8 +465,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
|
|
|
456
465
|
`package.json` declares public npm distribution. A release tag must equal `v${package.json.version}`. Versions use standard SemVer prerelease labels (`alpha`, `beta`, or `rc`), each with its matching npm dist-tag; only stable versions use `latest`. The Release workflow performs the frozen install and complete verification gate, packs once (or recovers the original archive on retry), verifies `SHA256SUMS`, publishes the immutable GitHub Release and then publishes those same bytes to npm through OIDC. Either channel failing means delivery is incomplete. First package creation needs an authorized maintainer; staging requires an existing package and is not a first-package bootstrap. Historical releases are not republished.
|
|
457
466
|
|
|
458
467
|
```sh
|
|
459
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
460
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
468
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.81/dsh-github-copilot-0.4.0-alpha.81.tgz
|
|
469
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.81/SHA256SUMS
|
|
461
470
|
sha256sum --check SHA256SUMS
|
|
462
471
|
```
|
|
463
472
|
|
|
@@ -465,7 +474,7 @@ PowerShell can verify the same two downloaded files with:
|
|
|
465
474
|
|
|
466
475
|
```powershell
|
|
467
476
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
468
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
477
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.81.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
469
478
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
470
479
|
```
|
|
471
480
|
|
package/README.zh.md
CHANGED
|
@@ -26,7 +26,7 @@ Core 管理。详见[图片兼容性与限制](./docs/image-input-compatibility.
|
|
|
26
26
|
|
|
27
27
|
截图来自当前构建 Client 的隔离浏览器 fixture,使用合成 Provider。它只证明已发布配置界面的形态,不证明真实凭据、账号权限、搜索成功或当前 Desktop 已加载。
|
|
28
28
|
|
|
29
|
-
> 当前文档与安装命令对应版本 `0.4.0-alpha.
|
|
29
|
+
> 当前文档与安装命令对应版本 `0.4.0-alpha.81`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
|
|
30
30
|
|
|
31
31
|
Web search 路由现在优先显示在插件详情页;宿主不支持详情页插槽时才回退到 **设置 → 模型**或独立 Web search section。搜索子 Fiber 仍独立等待 Remote,不影响账号控件和既有搜索安全检查。
|
|
32
32
|
|
|
@@ -36,6 +36,8 @@ Web search 路由现在优先显示在插件详情页;宿主不支持详情页
|
|
|
36
36
|
|
|
37
37
|
托管 Copilot 返回 `408 / user_request_timeout` 且确认是读取请求体超时时,现会显示 `COPILOT_REQUEST_BODY_TIMEOUT`,并在可观测时给出最终 JSON 请求的 UTF-8 字节数。字节不是上下文 token,上传超时也不证明上下文超限。原生重试与失败分类保持不变。重试耗尽后,可显式压缩会话或减少附件/工具输出再试,并检查网络/代理及 [GitHub 服务状态](https://www.githubstatus.com/)。压缩不保证成功,也无法修复网络或服务故障;调大客户端超时不会改变服务端超时。插件不会自动裁剪历史、切换模型、压缩或新增重试循环,未识别错误仍由原生流程处理。
|
|
38
38
|
|
|
39
|
+
托管 HTTP/SSE 聊天现区分**字节空闲**与**助手输出静默**。Core 原生计时只看助手 chunk,忽略 SSE 心跳;未修改原生适配器的合成测试已复现“仍有字节却超时”。默认连续五分钟无响应头/非空响应体字节仍失败;实际字节进展只允许助手输出静默延长到十分钟,持续心跳也不能无限等待,消费者处理输出的时间不计入空闲。`chatStreamLiveness: false` 恢复纯原生计时;显式 WebSocket/`auto` transport 保持原生行为。这修复已复现的误判机制,不保证消除所有重试或服务端 HTTP 408,也不证明某次生产故障中实际存在心跳。
|
|
40
|
+
|
|
39
41
|
| DSH 表面 | 精确源码 pin | Models UI 接口 |
|
|
40
42
|
|---|---|---|
|
|
41
43
|
| 受控 Desktop `0.1.1-rc.2` 基线 | `cloga-pi-ai-model-api` 上的受控 Core commit [`a772dbb`](https://github.com/cloga/deepseek-harness/commit/a772dbbde82780bff2b9394427e9f0a24cafa1d5) | 独立的 **Settings → GitHub Copilot** section |
|
|
@@ -121,10 +123,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
121
123
|
仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
|
|
122
124
|
|
|
123
125
|
```sh
|
|
124
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
126
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.81/dsh-github-copilot-0.4.0-alpha.81.tgz
|
|
125
127
|
```
|
|
126
128
|
|
|
127
|
-
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.
|
|
129
|
+
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.81`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
|
|
128
130
|
|
|
129
131
|
随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
|
|
130
132
|
|
|
@@ -142,10 +144,14 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
|
|
|
142
144
|
|
|
143
145
|
**子代理只需设置一次:** 在插件配置页打开 **Subagent models → Follow parent model** 并保存,即应用于已有和新创建的受支持 Copilot 子代理及 Team mate,无需填写 Session ID 或逐个登记。父会话为固定模型时,子会话从下一轮跟随;父会话为 Auto 时,继承相同偏好并按各自上下文独立选模。正在执行的轮次不变,子会话自己的手动选择仍优先。默认关闭(`github-copilot.followParentModel: false`)。开启意味着接管创建时保存的模型选择,但不清除子会话的显式选择历史。旧 `parentModelFollow` 绑定独立保留,不自动迁移。参见[需求、mockup 与边界](./docs/parent-model-follow.md)。原生 Team 的创建时模型标签不会被改写。
|
|
144
146
|
|
|
145
|
-
托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence
|
|
147
|
+
托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence**(智能)。三档共用精确排除与输入适配后的账号合格模型池。现在依据账号返回的 **Powerful / Versatile / Lightweight** 分类和保守的上下文任务判断选择,不再把推理档位或上下文容量当作品质排名。即使 Intelligence,独立问候也用 Lightweight;简短但困难的推理仍用 Powerful。无法判断的任务,Balance/Efficiency 优先 Versatile,Intelligence 优先 Powerful。上一轮模型仍符合目标分类与输入要求时优先保持它,否则仅在同类候选间稳定等权选择。分类缺失、分类回退均明确说明。没有可容纳候选时保留最大输入预算的原生恢复;没有合格候选则明确失败。同轮工具步骤、重试和自动压缩保持同一决策。图片验证独立保留;搜索、真实模型/Usage 和历史仍由原有服务所有。参见[任务策略与边界](./docs/auto-task-routing.md)及[父子继承边界](./docs/automatic-model-routing.md#requested-parent-to-child-selection-inheritance)。Core picker 仍保持平铺。
|
|
148
|
+
|
|
149
|
+
可选实验 `github-copilot.autoSemanticAssessment: true` 通过一次有界的辅助模型请求判断上下文任务;校准前**默认关闭**。它会增加延迟和供应方费用,不计入原生 Chat Usage。失败或判断上下文不完整不会被当作简单任务,而是保留保守本地依据。这是插件本地近似策略,不是 GitHub 的私有 Auto 服务。
|
|
146
150
|
|
|
147
151
|
已完成的 Copilot 回复在原生 Usage/时间后显示 **Auto(偏好)**,点信息按钮查看本轮记录的选择原因;只有捕获到明确固定选择才显示**手动**。成功读取但没有保留记录时显示**选择方式未知**,不借当前 picker 推断历史。读取失败则显示**选择记录读取失败 → 重试**;重试只重新读取同一轮记录,不重新调用模型。显式会话 ID/轮次参数不再被 Chat 的自动会话绑定缩减,修复新 master/lead 回复遭遇原生网关参数数量错误的问题。不重复模型名、不另设 Model details 按钮:实际模型仍由原生 Usage 显示,其缺失归属行为未改变。新选择记录仅限当前 Host 内存且有容量上限,重启、释放 Agent 或淘汰后会丢失;兼容历史 Auto 记录仍可读取。公开 assistant-actions slot 只允许插件内部换行,不能改变原生固定高度尾栏。
|
|
148
152
|
|
|
153
|
+
信息按钮展示本轮实际捕获的任务/分类依据、回退和保持原模型/同类分配原因;辅助判断信息收纳在折叠区。旧记录没有详细依据时明确说明未保留原因,不用今天的设置反推。
|
|
154
|
+
|
|
149
155
|
选择标记独立于可选会话投影挂载。投影不可用时,原生已完成回合证据仍允许显示保留的 Auto/手动记录;归属证据不完整会在信息弹层中明确说明。这不会恢复丢失的选择记录,也不证明已安装的更新已在 Desktop 加载。
|
|
150
156
|
|
|
151
157
|
Alpha.79 进一步修复选模读取的 Host 端:通过官方 Remote 服务绑定与方法标记暴露现有决策存储,不再使用会被原生网关拒绝的普通对象。实际 Client→Host 连通回归覆盖源码发现和严格描述符两种方式。这补齐 alpha.76 的 Client 参数修复,不恢复已丢失记录,也不改变 Auto 的选模逻辑。
|
|
@@ -179,7 +185,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
|
|
|
179
185
|
5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
|
|
180
186
|
6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
|
|
181
187
|
|
|
182
|
-
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.
|
|
188
|
+
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.81`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
|
|
183
189
|
|
|
184
190
|
**Desktop package 更新与 Web 生命周期边界:**原生 manager 对已安装 package 原位升级返回的 `restart-required` 是权威结果,与移除/重加 plugin bundle 的行为是两个不同问题。涉及服务重编排补丁(`cordis.patch.yml`,如本插件所采用的隔离路由 Web 搜索层)的停用、移除或升级,可能让依赖条目保持 pending,直到完全退出并冷重启 Desktop。若原生 manager 只报告类似 `pending (waiting for service: web)` 的条目,同时本插件已经显示 **Off**,说明请求的停用状态已经落盘;请冷重启 Desktop,不要反复切换或重装插件。其它错误不属于此提示范围,仍需单独排查。
|
|
185
191
|
|
|
@@ -366,6 +372,9 @@ Copilot Session 如需更宽的文件或命令权限,必须在调用前选择
|
|
|
366
372
|
|---|---:|---|
|
|
367
373
|
| `accountModelTtlMs` | `86400000` | 最大账号元数据复用窗口,毫秒(24 小时);不延长凭据或 proof 有效期。 |
|
|
368
374
|
| `accountModelFailureCooldownMs` | `300000` | 非强制发现的失败冷却,毫秒(5 分钟);不设周期重试。 |
|
|
375
|
+
| `chatStreamIdleTimeoutMs` | `300000` | 托管聊天字节空闲间隔;启用 liveness 时,原生助手 chunk 静默上限为此间隔的两倍(最高 2147483647 毫秒)。与 hosted search 分开。 |
|
|
376
|
+
| `chatStreamLiveness` | `true` | 观察实际 HTTP/SSE 字节,不伪造助手输出;`false` 恢复纯原生计时。显式 WebSocket/`auto` transport 不变。 |
|
|
377
|
+
| `chatMaxRequestImageBytes` | `20971520` | 原生出站图片预算(20 MiB),不是总 JSON/供应方上限。显式减小后由 Core 将较旧图片 offload 到映射的只读路径;原始历史保留,但出站图片可见性会改变。 |
|
|
369
378
|
| `requestBudgetSafetyTokens` | `4096` | 非负安全整数的估算输入余量;增加会减少可用输入空间。 |
|
|
370
379
|
| `requestBudgetPressureRatio` | `0.9` | 提前压力比例,0.01–1、步长 0.01;仅在官方自动恢复已启用且接口可用时使用。 |
|
|
371
380
|
| `compactionReasoning` | `prefer-low` | 摘要等级缺省时选择已支持的 minimal/low;`preserve` 保留原生默认。 |
|
|
@@ -467,8 +476,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
|
|
|
467
476
|
`package.json` 声明公开 npm 分发。Release tag 必须严格等于 `v${package.json.version}`。预发布使用 `alpha`、`beta` 或 `rc` 及对应 npm dist-tag,只有稳定版使用 `latest`。Release workflow 执行 frozen install 和完整门禁,只打包一次(重试恢复原始归档),验证 `SHA256SUMS`,发布不可变 GitHub Release,再通过 OIDC 将同一份字节发布到 npm。任一渠道失败都表示交付未完成。首次建包须由获准环境中的维护者完成;staging 要求包已存在,不能代替首次建包。不会批量补发历史版本。
|
|
468
477
|
|
|
469
478
|
```sh
|
|
470
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
471
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
479
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.81/dsh-github-copilot-0.4.0-alpha.81.tgz
|
|
480
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.81/SHA256SUMS
|
|
472
481
|
sha256sum --check SHA256SUMS
|
|
473
482
|
```
|
|
474
483
|
|
|
@@ -476,7 +485,7 @@ PowerShell 可以对已下载的同一组文件执行:
|
|
|
476
485
|
|
|
477
486
|
```powershell
|
|
478
487
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
479
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
488
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.81.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
480
489
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
481
490
|
```
|
|
482
491
|
|
package/deployment-baseline.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"package": {
|
|
10
10
|
"name": "dsh-github-copilot",
|
|
11
|
-
"version": "0.4.0-alpha.
|
|
11
|
+
"version": "0.4.0-alpha.81"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -553,6 +553,8 @@
|
|
|
553
553
|
{"file": "src/remote.ts", "marker": "githubCopilot.setModelExcluded"},
|
|
554
554
|
{"file": "src/preview-provider.ts", "marker": "native.streamSimple"},
|
|
555
555
|
{"file": "src/request-body-timeout.ts", "marker": "COPILOT_REQUEST_BODY_TIMEOUT"},
|
|
556
|
+
{"file": "src/copilot-stream-liveness.ts", "marker": "COPILOT_STREAM_IDLE_TIMEOUT"},
|
|
557
|
+
{"file": "src/preview-route.ts", "marker": "Math.min(idle * 2, 2_147_483_647)"},
|
|
556
558
|
{"file": "src/response-error-body.ts", "marker": "readResponseErrorJson"},
|
|
557
559
|
{"file": "src/pi-provider-bridge.ts", "marker": "PiStreamPublicCompatibility"}
|
|
558
560
|
],
|
|
@@ -570,6 +572,12 @@
|
|
|
570
572
|
{"file": "tests/preview-route.spec.ts", "name": "enriches only a verified 408 while preserving native failure classification and retry ownership"},
|
|
571
573
|
{"file": "tests/preview-provider.spec.ts", "name": "observes verified %s timeout without changing bytes, Response, native retries or credential ownership"},
|
|
572
574
|
{"file": "tests/request-body-timeout.spec.ts", "name": "bounds stalled response observation and gives cancellation priority"},
|
|
575
|
+
{"file": "tests/copilot-stream-liveness.spec.ts", "name": "does not count consumer think time as provider idle"},
|
|
576
|
+
{"file": "tests/copilot-stream-adapter.spec.ts", "name": "reproduces native semantic timeout despite ongoing SSE bytes"},
|
|
577
|
+
{"file": "tests/copilot-stream-adapter.spec.ts", "name": "allows real late output after the original semantic-idle boundary"},
|
|
578
|
+
{"file": "tests/copilot-stream-adapter.spec.ts", "name": "retains a native hard semantic deadline for an endless heartbeat stream"},
|
|
579
|
+
{"file": "tests/preview-route.spec.ts", "name": "restores byte-idle failures as TIMEOUT without adding a native wire attempt"},
|
|
580
|
+
{"file": "tests/preview-route.spec.ts", "name": "excludes actual Core consumer think time despite eager SDK event forwarding"},
|
|
573
581
|
{"file": "tests/pi-provider-bridge.spec.ts", "name": "preserves the stream object rather than copying or replacing its private queue"},
|
|
574
582
|
{"file": "tests/pi-provider-bridge.spec.ts", "name": "passes the checked simple input through and rejects unsupported advanced entry without I/O"}
|
|
575
583
|
]
|
|
@@ -1053,6 +1061,12 @@
|
|
|
1053
1061
|
"id": "managed-copilot-auto-model-routing",
|
|
1054
1062
|
"required": true,
|
|
1055
1063
|
"sourceMarkers": [
|
|
1064
|
+
{"file": "src/account-model-catalog.ts", "marker": "model_picker_category"},
|
|
1065
|
+
{"file": "src/auto-task-assessment.ts", "marker": "COPILOT_AUTO_ASSESSMENT_CONTEXT_OMITTED"},
|
|
1066
|
+
{"file": "src/auto-task-classifier.ts", "marker": "classifyTaskWithAdapter"},
|
|
1067
|
+
{"file": "src/auto-model-routing.ts", "marker": "targetCategory"},
|
|
1068
|
+
{"file": "src/config.ts", "marker": "autoSemanticAssessment"},
|
|
1069
|
+
{"file": "src/auto-selection-explanation.ts", "marker": "No candidate fits"},
|
|
1056
1070
|
{"file": "src/preview-route.ts", "marker": "GITHUB_COPILOT_AUTO_MODEL_ID"},
|
|
1057
1071
|
{"file": "src/auto-model-host.ts", "marker": "keep attribution out of the log"},
|
|
1058
1072
|
{"file": "src/parent-model-follow.ts", "marker": "resolveParentModel"},
|
|
@@ -1073,7 +1087,14 @@
|
|
|
1073
1087
|
"tests": [
|
|
1074
1088
|
{"file": "tests/auto-model-host.spec.ts", "name": "follows fixed and Auto parents using %s without writing child selections"},
|
|
1075
1089
|
{"file": "tests/scripts/parent-model-follow.test.mjs", "name": "explicit same-model and different-model child selections both win"},
|
|
1076
|
-
{"file": "tests/auto-model-routing.spec.ts", "name": "
|
|
1090
|
+
{"file": "tests/auto-model-routing.spec.ts", "name": "retains legacy length evidence but does not use it as task or supplier category evidence"},
|
|
1091
|
+
{"file": "tests/auto-model-routing.spec.ts", "name": "uses the task/category policy with one hard-eligible pool for all preferences"},
|
|
1092
|
+
{"file": "tests/auto-model-routing.spec.ts", "name": "preserves suitable continuity but never lets it override task category or input fit"},
|
|
1093
|
+
{"file": "tests/auto-model-routing.spec.ts", "name": "discloses category fallbacks and never guesses missing category from ID or capacity"},
|
|
1094
|
+
{"file": "tests/auto-task-assessment.spec.ts", "name": "bounds context, never reads attachment/reasoning bodies, and does not downshift omitted context"},
|
|
1095
|
+
{"file": "tests/auto-task-assessment.spec.ts", "name": "preserves caller cancellation instead of using a success-shaped fallback"},
|
|
1096
|
+
{"file": "tests/preview-route.spec.ts", "name": "assesses Auto through one concrete public native adapter call and freezes the captured reason across retries"},
|
|
1097
|
+
{"file": "tests/turn-selection-card.spec.ts", "name": "explains a captured task/category decision with progressive details (%s)"},
|
|
1077
1098
|
{"file": "tests/auto-model-routing.spec.ts", "name": "does not discard a complete Core assistant message when it contains reasoning"},
|
|
1078
1099
|
{"file": "tests/auto-model-routing.spec.ts", "name": "retains the native current-surface and tool-envelope measurement as an input floor"},
|
|
1079
1100
|
{"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "prices Core assistant text and reasoning with the unchanged native token meter"},
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Contextual Auto routing and captured selection reasons
|
|
2
|
+
|
|
3
|
+
Tracking: [#258](https://github.com/cloga/dsh-github-copilot/issues/258).
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
Auto must explain why the initiating turn chose its actual route, not display a
|
|
8
|
+
generic description of prompt length. Intelligence prioritizes response quality
|
|
9
|
+
but can use a lightweight model for demonstrably simple work. Efficiency favors
|
|
10
|
+
economical capability without knowingly underpowering difficult work. Balance
|
|
11
|
+
trades those priorities. All preferences share the same account model pool.
|
|
12
|
+
|
|
13
|
+
The authenticated account `/models` response supplies `model_picker_category`.
|
|
14
|
+
The October 3, 2026 bounded live probe observed `powerful`, `versatile` and
|
|
15
|
+
`lightweight`; some records lacked the field. This is supplier classification,
|
|
16
|
+
not measured latency, quality, price or health. Official documentation's
|
|
17
|
+
`category` is a different source and must not override live account facts.
|
|
18
|
+
Do not derive category from IDs, names, reasoning effort or context capacity.
|
|
19
|
+
|
|
20
|
+
Hard constraints remain first: entitlement, exclusions, current proof, text/image
|
|
21
|
+
capability and actual image format, estimated input headroom and final native
|
|
22
|
+
admission. No preference overrides these. No new Core owner, adapter, credential
|
|
23
|
+
record, general transport, global model mutation or durable decision event.
|
|
24
|
+
|
|
25
|
+
## Task assessment
|
|
26
|
+
|
|
27
|
+
Assessment concerns the task in context, not the last sentence's length.
|
|
28
|
+
An isolated greeting may be low demand. A short request to prove a theorem or
|
|
29
|
+
continue an unresolved investigation is not evidence of low demand. Long input
|
|
30
|
+
can be mechanical. Prior assistant/tool work prevents a greeting/continuation
|
|
31
|
+
shortcut from claiming an isolated simple task.
|
|
32
|
+
|
|
33
|
+
Use a conservative local assessment as the default. Unknown is an explicit
|
|
34
|
+
outcome, never silently translated into simple. Optional semantic assessment is
|
|
35
|
+
an experiment until evaluated against annotated tasks; it must not claim
|
|
36
|
+
equivalence to GitHub's private router or calibrated confidence.
|
|
37
|
+
|
|
38
|
+
The semantic experiment uses one fixed concrete account candidate through the
|
|
39
|
+
existing managed native adapter, never an Auto ID and never `ctx.llm` routing
|
|
40
|
+
recursion. It has no tools, bounded text-only assessment context, bounded JSON
|
|
41
|
+
output, one deadline, cancellation and no new retry loop. Text from messages is
|
|
42
|
+
untrusted data, not router instructions. Files/images/reasoning/replay bodies
|
|
43
|
+
are not read; omitted context makes classification uncertain and cannot justify
|
|
44
|
+
downshifting. Assessment input is a separate projection: the actual chat
|
|
45
|
+
messages, system prompt, tools, attachments and history stay untouched.
|
|
46
|
+
|
|
47
|
+
The strict result contains demand (`simple`, `routine`, `complex`, `unknown`)
|
|
48
|
+
and finite evidence signals, not a model ID, raw reasoning or an uncalibrated
|
|
49
|
+
confidence percentage. Invalid/truncated/failed results retain the local
|
|
50
|
+
assessment with an explicit diagnostic. Caller cancellation aborts the turn
|
|
51
|
+
instead of falling back. Credential, metadata and account revocation remain
|
|
52
|
+
fatal through existing lease/admission guards. Extra calls incur supplier
|
|
53
|
+
charges and latency, separate from native chat Usage and without inferred cost.
|
|
54
|
+
|
|
55
|
+
## Category policy and continuity
|
|
56
|
+
|
|
57
|
+
| Task demand | Efficiency | Balance | Intelligence |
|
|
58
|
+
| --- | --- | --- | --- |
|
|
59
|
+
| Proven simple | Lightweight | Lightweight | Lightweight |
|
|
60
|
+
| Routine | Lightweight | Versatile | Powerful |
|
|
61
|
+
| Complex | Powerful | Powerful | Powerful |
|
|
62
|
+
| Unknown | Versatile | Versatile | Powerful |
|
|
63
|
+
|
|
64
|
+
These are declared routing policies, not benchmark rankings. Efficiency's
|
|
65
|
+
routine lightweight selection is an economical approximation, not proof of
|
|
66
|
+
equal output quality. Intelligence never treats short length alone as simple.
|
|
67
|
+
|
|
68
|
+
When the target has no fitting candidates, use the disclosed category fallback:
|
|
69
|
+
powerful -> versatile -> lightweight; versatile -> powerful -> lightweight;
|
|
70
|
+
lightweight -> versatile -> powerful. Unclassified candidates are a final
|
|
71
|
+
explicit fallback only, not fabricated categories. Unknown/new category values
|
|
72
|
+
remain unclassified with a bounded catalog diagnostic.
|
|
73
|
+
|
|
74
|
+
Within the first available category, retain the previous managed model only
|
|
75
|
+
when it remains eligible and suitable. Otherwise use stable equal-weight
|
|
76
|
+
Session/turn selection with deterministic ID ordering as a tie breaker. Do not
|
|
77
|
+
infer quality from that ordering or assign fabricated weights. Once admitted,
|
|
78
|
+
all steps/retries share the turn decision. Continuity reduces unnecessary
|
|
79
|
+
switches but is not a claim of supplier cache savings.
|
|
80
|
+
|
|
81
|
+
If no model fits, preserve the existing largest-admissible-input recovery
|
|
82
|
+
branch and its native compaction diagnostics. Explain that no candidate fits;
|
|
83
|
+
never label this as a successful preference match or silently trim history.
|
|
84
|
+
|
|
85
|
+
## Explanation contract
|
|
86
|
+
|
|
87
|
+
Capture task source/demand/signals, assessment diagnostic, target/selected
|
|
88
|
+
category, fitting category count, category fallback and continuity/tie-break or
|
|
89
|
+
no-fit selection at decision time. Client reads the explicit viewed Session and
|
|
90
|
+
turn through the existing strict Remote. It does not rerun classification or
|
|
91
|
+
consult today's picker. Show a decisive first sentence, bounded supporting
|
|
92
|
+
facts and optional policy detail. Do not repeat the model name or change Usage.
|
|
93
|
+
|
|
94
|
+
Legacy records without detailed evidence show that the reason was not retained.
|
|
95
|
+
Host-lifetime evidence may be lost on restart; do not invent durable history or
|
|
96
|
+
promise cold-history reconstruction.
|
|
97
|
+
|
|
98
|
+
## Acceptance and rollout
|
|
99
|
+
|
|
100
|
+
Regress category normalization (missing/new/invalid values), short difficult
|
|
101
|
+
tasks, isolated greetings, contextual continuation, long mechanical input,
|
|
102
|
+
category fallback, previous-model eligibility, deterministic tie breaking,
|
|
103
|
+
no-fit recovery, one-call semantic success/invalid/failure/timeout/cancellation,
|
|
104
|
+
omitted context, strict Remote and footer English/Chinese explanations.
|
|
105
|
+
|
|
106
|
+
Retain native gateway, parent following, manual selection, exclusion admission,
|
|
107
|
+
account proof, image admission and compaction fixture coverage. Full protected
|
|
108
|
+
Windows/Linux CI remains mandatory before merge/release. No live inference
|
|
109
|
+
calls are needed for synthetic acceptance.
|
|
110
|
+
|
|
111
|
+
Before making semantic assessment the default, evaluate a reviewed labeled
|
|
112
|
+
corpus for complex-to-simple errors, extra latency, token use and stability
|
|
113
|
+
across languages and prompt injection. Synthetic passing tests are not this
|
|
114
|
+
evaluation. Publication does not authorize profile installation or restart.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# GitHub Copilot Auto model routing MVP
|
|
2
2
|
|
|
3
|
-
**Tracking:** [#174](https://github.com/cloga/dsh-github-copilot/issues/174), [#192](https://github.com/cloga/dsh-github-copilot/issues/192), [#199](https://github.com/cloga/dsh-github-copilot/issues/199)
|
|
3
|
+
**Tracking:** [#174](https://github.com/cloga/dsh-github-copilot/issues/174), [#192](https://github.com/cloga/dsh-github-copilot/issues/192), [#199](https://github.com/cloga/dsh-github-copilot/issues/199), [#258](https://github.com/cloga/dsh-github-copilot/issues/258)
|
|
4
4
|
|
|
5
5
|
**Target:** official DSH and Windows Desktop `0.2.0-rc.2`
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ MIME are not wire-format proof. See [image compatibility and limits](./image-inp
|
|
|
31
31
|
|
|
32
32
|
The account `/models` catalog is authoritative for entitlement and hard capabilities: protocol, context and output limits, image input, tool support, reasoning efforts, and server policy. Unknown or incomplete capability metadata fails closed.
|
|
33
33
|
|
|
34
|
-
The catalog
|
|
34
|
+
The catalog supplies `model_picker_category` (`powerful`, `versatile`, `lightweight`), but not trustworthy measured quality, latency, price, or global-health rankings. Missing, invalid and new category values remain unclassified with diagnostics. The routing policy does **not** infer category from a marketing name, model-ID prefix, reasoning effort, context capacity or token price. It does not claim to reproduce GitHub's private Auto algorithm.
|
|
35
35
|
|
|
36
36
|
### Hard input fit check before preference
|
|
37
37
|
|
|
@@ -49,28 +49,35 @@ Before applying soft preferences, routing checks whether each candidate can acco
|
|
|
49
49
|
- `compaction-eligible`: prior history is compressible and downstream dispatch will trigger compaction pressure.
|
|
50
50
|
5. **Final framing limitation:** The fresh entered-message estimate and current native envelope floor are not the final candidate-specific serialized request. Later framing, changed tools and native attachment projection can still exceed a candidate's budget. The native provider guard (`inspectRequest`) remains authoritative and truthfully rejects such a request with `COPILOT_CONTEXT_BUDGET_EXCEEDED` without bypassing safety boundaries.
|
|
51
51
|
|
|
52
|
-
###
|
|
52
|
+
### Task-aware supplier category preferences
|
|
53
53
|
|
|
54
|
-
All three
|
|
54
|
+
All three preferences use the *same* hard-eligible account pool. The default local
|
|
55
|
+
assessment recognizes isolated greetings and explicit difficult reasoning or
|
|
56
|
+
investigation; other tasks remain uncertain rather than guessing from length.
|
|
57
|
+
An optional `github-copilot.autoSemanticAssessment: true` experiment makes one
|
|
58
|
+
bounded auxiliary native-adapter call to a concrete, non-excluded supplier
|
|
59
|
+
Lightweight model. It adds latency and supplier charges not included in native
|
|
60
|
+
chat Usage. It is off by default pending labeled-corpus calibration.
|
|
55
61
|
|
|
56
|
-
|
|
57
|
-
- **Efficiency:** Biased toward lower advertised capacity across the lower candidate band, though demanding tasks allow higher capacity.
|
|
58
|
-
- **Balance:** Central candidate band.
|
|
59
|
-
|
|
60
|
-
To avoid monopolizing a single top candidate (such as Grok 4.7) across all turns and Sessions, band selection uses an in-memory deterministic seed derived from `${sessionId}:${turn}` (or turn content when Session context is absent). This guarantees:
|
|
61
|
-
|
|
62
|
-
- Selection is **100% frozen** across all steps and retries within the same turn.
|
|
63
|
-
- Unrelated Sessions or turns sample across the candidate band rather than concentrating on one model.
|
|
64
|
-
- No sensitive prompt text or seed hashes are persisted or sent over the network.
|
|
65
|
-
- When only a single candidate is eligible or fitting, it is returned unchanged.
|
|
66
|
-
|
|
67
|
-
| Latest-turn class | Efficiency | Balance (`auto`) | Intelligence |
|
|
62
|
+
| Task demand | Efficiency | Balance (`auto`) | Intelligence |
|
|
68
63
|
| --- | --- | --- | --- |
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
73
|
-
|
|
64
|
+
| Proven simple | Lightweight | Lightweight | Lightweight |
|
|
65
|
+
| Routine | Lightweight | Versatile | Powerful |
|
|
66
|
+
| Complex | Powerful | Powerful | Powerful |
|
|
67
|
+
| Unknown | Versatile | Versatile | Powerful |
|
|
68
|
+
|
|
69
|
+
If the target category has no fitting model, follow the documented category
|
|
70
|
+
fallback order, using unclassified models only last. Keep the previous managed
|
|
71
|
+
model if it remains in the first available category and fits this turn.
|
|
72
|
+
Otherwise use stable equal-weight Session/turn allocation within that category;
|
|
73
|
+
ID ordering breaks ties, not quality rankings. Capacity and reasoning-effort
|
|
74
|
+
bands no longer determine task quality. All steps/retries retain the decision.
|
|
75
|
+
|
|
76
|
+
These are declared policies, not measured quality, speed or cost guarantees.
|
|
77
|
+
Captured footer reasons show task evidence, selected/target category, fallback,
|
|
78
|
+
continuity or equal tie-breaking, and no-fit recovery. Legacy records without
|
|
79
|
+
details say the reasons were not retained; they never reconstruct history from
|
|
80
|
+
today's settings. See [requirements, assessment limits and rollout](./auto-task-routing.md).
|
|
74
81
|
|
|
75
82
|
The exact virtual preference stays in the Session's pending selection across turns, while each real request header and transport record the chosen account model. Switching to a real model ends automatic routing for subsequent turns. New turns no longer write a separate decision event; compatible historical events without a preference field remain Balance for display.
|
|
76
83
|
|
|
@@ -91,6 +91,10 @@ Current scoped-recovery evidence additionally targets unchanged official `639ed0
|
|
|
91
91
|
|
|
92
92
|
## Verification boundary
|
|
93
93
|
|
|
94
|
+
Managed HTTP/SSE liveness is separate from compaction and HTTP 408. Core's idle watchdog measures translated assistant chunks, not heartbeat bytes. The plugin observes actual nonempty bytes without parsing or fabricating output: the default byte-idle limit stays five minutes, while native semantic silence is bounded to ten minutes. Consumer think time does not count; endless heartbeats still fail. Caller cancellation and native retry ownership remain unchanged. Explicit WebSocket/auto transport and `chatStreamLiveness: false` retain native-only timing.
|
|
95
|
+
|
|
96
|
+
`github-copilot.chatMaxRequestImageBytes` exposes the existing native image projection budget with its unchanged 20971520-byte default. An explicit smaller budget can reduce outgoing image payloads by offloading older images into mapped read-only paths; original history is retained, but outgoing image visibility changes. This is not a total request cap, automatic compaction, or a supplier size limit. No live budget reduction is performed by installation or by a 408. Fixed text/tool prefixes and network/service faults may still cause upload timeouts.
|
|
97
|
+
|
|
94
98
|
Pure arithmetic and policy tests, public-middleware fixtures, and the real published native adapter/SDK with synthetic transport cover separate layers. Required cases include independent/combined bounds, changed prefixes, explicit/default output and effort, metadata/credential invalidation, direct/prepared parity, concurrent calls, cancellation, output truncation and oversized manual input. Existing full plugin gates and exact-Core compatibility fixtures remain required; source inventory is not their execution result.
|
|
95
99
|
|
|
96
100
|
No live model inference, local Desktop installation, activation or restart is implied by unit tests or publication. Preserve immutable GitHub/npm byte identity and coordinate Desktop/Ops pins separately after release verification.
|
|
@@ -21,6 +21,7 @@ Follow the [plugin-only boundary](../AGENTS.md#plugin-only-implementation-bounda
|
|
|
21
21
|
- Cover missing/conflicting endpoints, missing/invalid limits, duplicate conflicting IDs, explicit denial, stale account snapshots, unsupported reasoning labels, unknown fields and hostile extra getters.
|
|
22
22
|
- Exercise real published adapter/SDK code against local synthetic HTTP for all supported protocols, including tools, public summaries, two-turn opaque replay, images and interruption/retry paths. Synthetic results are not claims of live account availability.
|
|
23
23
|
- Verify managed request-body timeout guidance only for the observed HTTP `408`, exact `user_request_timeout` code and request-body message. Bound clone reads to 8 KiB/250 ms, retain the original native response, and expose only fixed guidance plus final string-body UTF-8 bytes. Preserve failure code, retry metadata, cancellation, unchanged retry payloads and independent dispatches. Do not reclassify 408 as overflow, invent a safe byte threshold, change client timeouts, refresh OAuth, compact automatically or promise elimination of upstream failures.
|
|
24
|
+
- Verify byte-aware managed HTTP/SSE liveness through unchanged published and tagged adapters: heartbeat bytes may cross the original semantic deadline before actual output, but endless heartbeat-only output must hit the bounded native deadline. Real header/body stalls retain the original interval and a dispatch-local TIMEOUT; consumer think time, caller/credential cancellation, exact bytes, parser ownership and one native wire attempt remain unchanged. Explicit WebSocket/auto and opt-out retain native-only behavior. Preserve the 20 MiB native image budget by default; explicit smaller budgets must use native offload and retain mapped read-only paths/history, never hidden trimming or a claimed supplier threshold. These synthetic cases do not attest production heartbeat activity or cure HTTP 408.
|
|
24
25
|
- Run source/test typechecks, complete repository tests, built Host/Client/Remote smoke, archive verification, and relevant unchanged-Core compatibility fixtures. Do not suppress type or test failures to bridge incompatible SDK versions.
|
|
25
26
|
|
|
26
27
|
## Explicit public-interface limits
|