dsh-github-copilot 0.1.0-alpha.20.dsh.0.2.2.rc.3 → 0.1.0-alpha.22.dsh.0.2.2.rc.3

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 CHANGED
@@ -107,15 +107,21 @@ live installation and restarts are separate from synthetic CI acceptance.
107
107
 
108
108
  The user-authorized native model sync (#466, #479) is a narrow exception to the
109
109
  no-settings-rewrite rule: after a visible preview and one explicit confirmation, one
110
- revision-checked write may replace only
111
- `llm-pi-ai.providers.github-copilot.models` in an existing canonical profile.
110
+ revision-checked write may replace
111
+ `llm-pi-ai.providers.github-copilot.models` in an existing canonical profile and,
112
+ only under the #510 condition below, set its route-wide `api`.
112
113
  Prove current canonical-account metadata and the native adapter-owned catalog.
113
114
  The explicit #508 direction changes this operation to ID-only account model
114
115
  submission, not capability qualification: submit all enabled account IDs as
115
116
  `{ id }` references without intersecting them with the native catalog. Do not copy,
116
117
  correct or certify account capacity, input, image or reasoning facts here.
117
- Unknown native IDs are advisory only, not skipped; do not invent definitions
118
- or rewrite route defaults. Native validation may reject the entire update.
118
+ Unknown native IDs are advisory only, not skipped; do not invent definitions.
119
+ The user-authorized #510 exception may set a missing provider-wide `api` only
120
+ when every enabled account model has the same verified supported protocol and
121
+ every matching native catalog entry agrees. Disclose that route-wide change in
122
+ the preview; preserve an existing route API and block on missing, mixed or
123
+ conflicting evidence. Never set per-model protocols or guess a route default.
124
+ Native validation may reject the entire update.
119
125
  The native adapter owns inherited definitions, validation,
120
126
  requests and their limitations. This does not weaken account capability proof
121
127
  for search or other plugin-owned request paths. Disclose additions, updates,
@@ -126,8 +132,19 @@ Prepare the preview without forced discovery from existing verified evidence.
126
132
  An existing `compat.supportsStrictMode: false` may be preserved only when at
127
133
  least one synced Responses or Completions model supports it; block other unproven
128
134
  compatibility overrides. Recheck account/catalog/preferences and Settings evidence
129
- before the one-shot write, then read back both user and effective values. Never create a profile,
130
- change other paths or perform this sync automatically.
135
+ before the one-shot write, then atomically CAS the model list and any authorized
136
+ route API together and read back both user and effective values. Never create a
137
+ profile, change other paths or perform this sync automatically.
138
+
139
+ Native ID-only request headers (#512) use only the public synchronous
140
+ `llm-pi-ai/request-headers` waterfall. Fill missing Editor-Version,
141
+ Editor-Plugin-Version and Copilot-Integration-Id from the published Copilot
142
+ provider on its declared default endpoints and exact native route only.
143
+ Preserve explicit headers and DSH attribution; never read credentials, copy
144
+ capabilities, mutate catalogs/settings, replace transport or retry messages.
145
+ Disposal removes the listener, not saved IDs; model-list persistence does not
146
+ promise working inference after unload. Keep synthetic header delivery separate
147
+ from live supplier acceptance.
131
148
 
132
149
  The user-confirmed direction on 2026-11-14 supersedes conflicting legacy feature
133
150
  requirements below: this plugin is a lightweight GitHub Copilot model integration
@@ -209,7 +226,7 @@ which runtime registrations, UI, and settings remain active:
209
226
  1. A conditional authorization-service bootstrap plus Host controller that joins DSH authorization, credentials, and settings.
210
227
  2. A Client Models provider-card contribution with one shared account-state owner, Client-safe Remote descriptors and a nested plugin-owned model-preferences disclosure; embed in an existing configured canonical row, suppress its separate footer controller, and retain footer/old-Core section fallback when no such row is mounted.
211
228
  3. Strict JSON normalization of pi-ai's provider-owned Copilot OAuth grant.
212
- 4. Preserve intentional absence of `llm-pi-ai.providers.github-copilot`; reconcile only existing legacy profiles and verified ownership journals. The confirmed #466 models-only sync is the narrow explicit exception above; never create or remove a native profile automatically.
229
+ 4. Preserve intentional absence of `llm-pi-ai.providers.github-copilot`; reconcile only existing legacy profiles and verified ownership journals. The explicitly confirmed native model sync is the narrow exception above; never create or remove a native profile automatically.
213
230
  5. Direct provider-hosted search using the same Host-side credential lifecycle.
214
231
  6. Provider-scoped tool-schema compatibility for Copilot payload behaviors; Core remains the tool and execution owner.
215
232
  7. A bounded account-discovery route that supplies validated endpoint/capability metadata to the published native adapter, including explicit managed Responses sampling compatibility, plus exact plugin-owned model exclusions enforced across its directory, Auto pools and direct admission, without maintaining model-ID routing rules or changing Core's catalog.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ release tags do not update this file after publication. Check the exact
5
5
  [GitHub Release](https://github.com/cloga/dsh-github-copilot/releases) and npm
6
6
  version separately rather than treating an old `prepared` label as current status.
7
7
 
8
+ ## 0.1.0-alpha.22.dsh.0.2.2.rc.3 (prepared)
9
+
10
+ - Fill missing native Copilot IDE request headers for ID-only models through the public header hook, using published provider values rather than a static model list (#512).
11
+ - Preserve native authentication, explicit headers, attribution and retry ownership. No settings migration, Core patch or automatic message replay; unloading removes the runtime contribution.
12
+
13
+ ## 0.1.0-alpha.21.dsh.0.2.2.rc.3 (prepared)
14
+
15
+ - Include a conditionally verified provider-wide API in confirmed native model sync when enabled account models share one protocol and matching native catalog entries agree (#510).
16
+ - Disclose the route-wide effect before confirmation; preserve existing route APIs and block mixed, missing or conflicting protocol evidence.
17
+
8
18
  ## 0.1.0-alpha.20.dsh.0.2.2.rc.3 (prepared)
9
19
 
10
20
  - Record native turn-account evidence for valid explicitly configured Copilot model IDs even when absent from the native built-in catalog (#488).
package/README.md CHANGED
@@ -73,15 +73,15 @@ After the exact compatible release is available and verified, download its
73
73
  original asset and checksum in an empty directory:
74
74
 
75
75
  ```sh
76
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.20.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.20.dsh.0.2.2.rc.3.tgz
77
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.20.dsh.0.2.2.rc.3/SHA256SUMS
76
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.22.dsh.0.2.2.rc.3.tgz
77
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/SHA256SUMS
78
78
  sha256sum --check SHA256SUMS
79
79
  ```
80
80
 
81
81
  For the `web` profile, install the same Release asset:
82
82
 
83
83
  ```sh
84
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.20.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.20.dsh.0.2.2.rc.3.tgz
84
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.22.dsh.0.2.2.rc.3.tgz
85
85
  ```
86
86
 
87
87
  Choose the intended profile explicitly. Then:
@@ -106,8 +106,9 @@ native provider, open **Manage → Model preferences**, review the displayed
106
106
  additions, updates, removals and any IDs absent from the native catalog,
107
107
  then choose **Sync models**. Preparing the display uses the current verified
108
108
  account snapshot without forcing discovery; if it is unavailable, use
109
- **Refresh models**. This one-time snapshot replaces only
110
- `llm-pi-ai.providers.github-copilot.models` with Settings CAS and readback.
109
+ **Refresh models**. This one-time snapshot writes
110
+ `llm-pi-ai.providers.github-copilot.models` with Settings CAS and readback. It
111
+ may also set a missing route-wide API only under the verified conditions below.
111
112
  The submitted list contains all enabled account model IDs as `{ id }` references;
112
113
  it is not intersected with the installed native catalog. A successfully saved
113
114
  list remains after the plugin is unloaded or uninstalled. Capacities, protocols,
@@ -115,15 +116,28 @@ image support and reasoning controls are resolved by the native adapter,
115
116
  not copied or certified from account metadata. Differences
116
117
  in account input limits, image formats or reasoning metadata no longer exclude
117
118
  a model from this submission. IDs absent from the native catalog are advisory,
118
- not skipped. The native settings validator may reject the entire update when
119
- it cannot resolve a model's protocol; the plugin does not guess a protocol or
120
- change the route API to force it through. A rejected write is not reported as
121
- successful; check the saved settings before trying again.
119
+ not skipped. If an enabled ID is absent and no route API is configured, the
120
+ preview may propose a provider-wide API only when all enabled account models
121
+ share the same verified protocol and every matching native catalog entry agrees.
122
+ The preview explains that this API applies to the whole route, not just missing
123
+ IDs. Existing route APIs are never overwritten; mixed, incomplete or conflicting
124
+ evidence blocks the sync. The model list and an authorized API change are written
125
+ together with Settings CAS and read back. Native validation remains authoritative;
126
+ a rejected or uncertain write is not reported as successful. Check the saved
127
+ settings before trying again.
122
128
  **Sync replaces existing per-model customizations, including configured output
123
129
  request defaults, with native definitions.** Review updated and removed entries
124
- before confirming. Route-wide settings remain unchanged. This selects a model
125
- list; it does not prove supplier compatibility or enforce account-specific
130
+ before confirming. Other route-wide settings remain unchanged. This selects a
131
+ model list; it does not prove supplier compatibility or enforce account-specific
126
132
  limits. Native requests retain DSH's transport, validation and error behavior.
133
+ While loaded, the plugin fills missing `Editor-Version`, `Editor-Plugin-Version`
134
+ and `Copilot-Integration-Id` request headers from the published pi-ai Copilot
135
+ provider through DSH's public request-header hook. This covers ID-only models
136
+ without inherited catalog headers. It preserves explicit headers, DSH
137
+ attribution and native authentication, and does not apply to custom endpoints
138
+ or other providers. No settings are written or failed messages retried.
139
+ Unloading the plugin removes this contribution: the saved model list remains,
140
+ but affected models can again fail with `missing Editor-Version header for IDE auth`.
127
141
  Custom native authentication,
128
142
  endpoints, headers, nonempty model overrides, or unproven route compatibility
129
143
  overrides block sync rather than changing those settings. An existing
package/README.zh.md CHANGED
@@ -61,15 +61,15 @@ node scripts/select-core-release.mjs 0.2.2-rc.3
61
61
  精确兼容版本发布且通过验证后,在空目录下载原始制品并校验:
62
62
 
63
63
  ```sh
64
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.20.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.20.dsh.0.2.2.rc.3.tgz
65
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.20.dsh.0.2.2.rc.3/SHA256SUMS
64
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.22.dsh.0.2.2.rc.3.tgz
65
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/SHA256SUMS
66
66
  sha256sum --check SHA256SUMS
67
67
  ```
68
68
 
69
69
  例如安装到 `web` profile:
70
70
 
71
71
  ```sh
72
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.20.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.20.dsh.0.2.2.rc.3.tgz
72
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.22.dsh.0.2.2.rc.3.tgz
73
73
  ```
74
74
 
75
75
  请明确选择目标 profile,然后:
@@ -90,17 +90,28 @@ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/release
90
90
  **Manage → Model preferences**,查看显示的新增、更新、移除以及原生目录未收录的 ID,
91
91
  然后选择 **Sync models**。页面使用当前已验证的账号快照准备这些信息,不强制
92
92
  重新发现;如果快照不可用,请使用 **Refresh models**。此显式单次快照只通过
93
- Settings CAS 和回读替换 `llm-pi-ai.providers.github-copilot.models`。
93
+ 通过 Settings CAS 和回读写入 `llm-pi-ai.providers.github-copilot.models`;
94
+ 只有满足下述验证条件时,才会同时设置缺失的 route API。
94
95
  提交的列表包含账号中所有启用模型的 `{ id }` 引用,不再与原生内置目录取交集。
95
96
  成功保存的列表在卸载或停用插件后仍然保留。容量、协议、图像能力和推理控制
96
97
  交由原生解析,不再复制或认证账号元数据中的能力。
97
98
  账号输入上限、图像格式或推理元数据的差异不再成为排除模型的条件。
98
99
  原生目录未收录的 ID 只做提示,不会跳过;如果原生无法解析某个模型的协议,
99
- 原生设置校验可能拒绝整次更新。插件不会猜测协议或自动更改路线 API 来绕过拒绝。
100
- 失败写入不会显示为成功,请检查已保存设置后再重试。
100
+ 原生设置校验可能拒绝整次更新。如果启用 ID 不在原生目录且尚未配置 route API,
101
+ 只有所有启用账号模型都具有相同且已验证的协议、并且目录中匹配的原生模型协议一致时,
102
+ 预览才会建议设置 provider 级 API。预览会说明它影响整条路由,而非仅影响缺失 ID。
103
+ 已有 route API 不会被覆盖;协议混合、证据缺失或冲突时会阻止同步。模型列表及获准的
104
+ API 变更会在同一次 Settings CAS 中写入并分别读回。原生校验仍是最终依据;失败或结果
105
+ 不确定时不会报告成功,请检查已保存设置后再重试。
101
106
  **同步会用原生定义替换已有的模型自定义参数,包括单次请求输出默认值。**
102
- 确认前请检查更新和移除项。路线级设置保持不变。这只是模型列表选择,不代表供应商
107
+ 确认前请检查更新和移除项。其他路线级设置保持不变。这只是模型列表选择,不代表供应商
103
108
  兼容性已经验证,也不会强制执行账号特有的限制;传输、校验和错误处理仍由原生拥有。
109
+ 插件加载时,通过 DSH 公开请求头钩子,从已发布 pi-ai Copilot provider 补齐缺失的
110
+ `Editor-Version`、`Editor-Plugin-Version` 和 `Copilot-Integration-Id`。
111
+ 这覆盖仅含 ID、无法继承目录请求头的模型;保留显式请求头、DSH 标识和原生认证,
112
+ 不影响自定义端点或其他 provider,不写设置,也不自动重试失败消息。
113
+ 停用插件会移除此请求头补充:模型列表仍保留,但受影响模型可能再次出现
114
+ `missing Editor-Version header for IDE auth`。
104
115
  原生 provider 存在自定义认证、端点、请求头、非空模型覆盖或无法验证的
105
116
  路线兼容性覆盖时,同步会停止,不会修改这些设置。已有的 `compat.supportsStrictMode: false`
106
117
  会保留,但至少一个同步模型必须使用支持该设置的 Responses 或 Completions 协议。已有的
@@ -8,14 +8,14 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.1.0-alpha.20.dsh.0.2.2.rc.3"
11
+ "version": "0.1.0-alpha.22.dsh.0.2.2.rc.3"
12
12
  },
13
13
  "releaseLines": [
14
14
  { "core": "0.2.0-rc.2", "version": "0.4.2-alpha.15", "status": "published" },
15
15
  { "core": "0.2.1-alpha.4", "version": "0.4.2-alpha.16", "status": "published" },
16
16
  { "core": "0.2.1-alpha.5", "version": "0.1.0-alpha.2.dsh.0.2.1.alpha.5", "status": "published" },
17
17
  { "core": "0.2.1-rc.3", "version": "0.1.0-alpha.5.dsh.0.2.1.rc.3", "status": "published" },
18
- { "core": "0.2.2-rc.3", "version": "0.1.0-alpha.20.dsh.0.2.2.rc.3", "status": "pending" }
18
+ { "core": "0.2.2-rc.3", "version": "0.1.0-alpha.22.dsh.0.2.2.rc.3", "status": "pending" }
19
19
  ],
20
20
  "evidence": {
21
21
  "kind": "source-and-synthetic-test-inventory",
@@ -741,6 +741,23 @@
741
741
  {"file": "tests/preview-route.spec.ts", "name": "binds explicit summary capacity proof to its Agent rather than the current default"}
742
742
  ]
743
743
  },
744
+ {
745
+ "id": "native-copilot-ide-headers",
746
+ "required": true,
747
+ "activation": "request-local-native-header-waterfall",
748
+ "evidenceScope": "synthetic-native-stream-not-live-supplier",
749
+ "sourceMarkers": [
750
+ {"file": "src/native-copilot-headers.ts", "marker": "llm-pi-ai/request-headers"},
751
+ {"file": "src/index.ts", "marker": "installNativeCopilotHeaders"},
752
+ {"file": "src/native-copilot-headers.ts", "marker": "endpoints.has(endpoint.href)"}
753
+ ],
754
+ "tests": [
755
+ {"file": "tests/native-copilot-headers.spec.ts", "name": "fills only missing public IDE headers and removes its contribution on disposal"},
756
+ {"file": "tests/native-copilot-headers.spec.ts", "name": "does not contribute to other routes or custom endpoints"},
757
+ {"file": "tests/native-copilot-headers.spec.ts", "name": "composes with other contributors without retaining per-request headers"},
758
+ {"file": "tests/fixtures/auto-review-copilot-core.fixture.ts", "name": "records %s through real Loader qualification and synthetic stream delivery"}
759
+ ]
760
+ },
744
761
  {
745
762
  "id": "confirmed-native-model-sync",
746
763
  "required": true,
@@ -748,14 +765,22 @@
748
765
  "evidenceScope": "tagged-native-settings-and-resolution-with-synthetic-catalog-proof-plus-separate-adapter-ownership-tests-not-live-provider",
749
766
  "sourceMarkers": [
750
767
  {"file": "src/native-model-sync.ts", "marker": "nativeCatalogMissingIds"},
768
+ {"file": "src/native-model-sync.ts", "marker": "planNativeModelSyncRouteApi"},
751
769
  {"file": "src/native-copilot-access.ts", "marker": "captureNativeCopilotCatalog"},
752
770
  {"file": "src/authorization-controller.ts", "marker": "path: ['providers', GITHUB_COPILOT_PROVIDER_ID, 'models']"},
771
+ {"file": "src/authorization-controller.ts", "marker": "path: ['providers', GITHUB_COPILOT_PROVIDER_ID, 'api']"},
753
772
  {"file": "src/model-preferences-card.ts", "marker": "Sync models"},
773
+ {"file": "src/model-preferences-card.ts", "marker": "data-dsh-github-copilot-native-model-sync-route-api"},
754
774
  {"file": "src/authorization-controller.ts", "marker": "nativeSyncSupportsRouteCompatibility"},
755
- {"file": "src/remote.ts", "marker": "GitHubCopilotNativeModelSyncPreviewSchema"}
775
+ {"file": "src/remote.ts", "marker": "GitHubCopilotNativeModelSyncPreviewSchema"},
776
+ {"file": "src/remote.ts", "marker": "routeApiChange"}
756
777
  ],
757
778
  "tests": [
758
779
  {"file": "tests/native-model-sync.spec.ts", "name": "submits all enabled account IDs without copying or qualifying capabilities"},
780
+ {"file": "tests/native-model-sync.spec.ts", "name": "sets one route API for missing catalog IDs only when account and existing native APIs agree"},
781
+ {"file": "tests/native-model-sync.spec.ts", "name": "does not set a route API for a fully native mixed-protocol list"},
782
+ {"file": "tests/native-model-sync.spec.ts", "name": "blocks missing IDs when account protocols are mixed or existing native APIs conflict"},
783
+ {"file": "tests/native-model-sync.spec.ts", "name": "preserves a matching configured route API and blocks a conflicting one"},
759
784
  {"file": "tests/native-model-sync.spec.ts", "name": "does not reject native entries for narrower input, image formats or unavailable account reasoning controls"},
760
785
  {"file": "tests/native-model-sync.spec.ts", "name": "leaves mixed-protocol model definitions with the native catalog instead of rewriting them"},
761
786
  {"file": "tests/native-model-sync.spec.ts", "name": "includes unknown native IDs with an advisory instead of filtering them or inventing defaults"},
@@ -765,6 +790,8 @@
765
790
  {"file": "tests/native-copilot-access.spec.ts", "name": "exposes the proven unfiltered adapter catalog independently of the configured model list"},
766
791
  {"file": "tests/native-copilot-access.spec.ts", "name": "revokes a catalog snapshot when its native Loader entry is removed"},
767
792
  {"file": "tests/authorization-controller.spec.ts", "name": "previews enabled canonical models and applies only the confirmed native models path with CAS/readback"},
793
+ {"file": "tests/authorization-controller.spec.ts", "name": "previews and writes a provider-wide API with the IDs only when metadata and native entries agree"},
794
+ {"file": "tests/authorization-controller.spec.ts", "name": "blocks route API updates for mixed or conflicting protocols without changing settings"},
768
795
  {"file": "tests/authorization-controller.spec.ts", "name": "prepares from existing account proof without discovery or credential reads"},
769
796
  {"file": "tests/authorization-controller.spec.ts", "name": "preserves the native disabled strict-mode override while syncing supported protocols"},
770
797
  {"file": "tests/authorization-controller.spec.ts", "name": "blocks disabled strict-mode compatibility if no synced model has a supporting protocol"},
@@ -772,11 +799,12 @@
772
799
  {"file": "tests/authorization-controller.spec.ts", "name": "rejects a plan that expires while checking the native credential before writing"},
773
800
  {"file": "tests/authorization-controller.spec.ts", "name": "reports an uncertain commit if the proven native catalog changes during the write"},
774
801
  {"file": "tests/model-preferences-card.spec.ts", "name": "shows sync changes beside the model list and applies them with one explicit action"},
802
+ {"file": "tests/remote-codec.spec.ts", "name": "accepts only known route APIs in a native model sync preview"},
775
803
  {"file": "tests/model-preferences-card.spec.ts", "name": "does not dispatch duplicate sync actions before React renders the busy state"},
776
804
  {"file": "tests/model-preferences-card.spec.ts", "name": "allows model edits while preparing and ignores the superseded plan"},
777
805
  {"file": "tests/remote-codec.spec.ts", "name": "accepts named native-sync safety diagnostics without accepting extra fields"},
778
806
  {"file": "tests/fixtures/remote-core.fixture.ts", "name": "binds native model sync through actual Client and %s Host gateways"},
779
- {"file": "tests/fixtures/native-model-sync-core.fixture.ts", "name": "syncs a confirmed snapshot through real native Settings and model resolution across restart using synthetic catalog proof"}
807
+ {"file": "tests/fixtures/native-model-sync-core.fixture.ts", "name": "syncs a confirmed snapshot and conditional route API through real native Settings and model resolution across restart using synthetic catalog proof"}
780
808
  ]
781
809
  },
782
810
  {
@@ -4,18 +4,19 @@ Current source target: official DSH `0.2.2-rc.3`. Image projection, offload,
4
4
  the native adapter and supplier errors remain Core-owned. DSH owns model
5
5
  selection and Auto; the old plugin Auto picker and its filtering are retired.
6
6
 
7
- Neither the native nor the managed route compares projected image MIME against
8
- the account model's advertised formats before dispatch. Core may re-encode an
9
- image, so a filename or durable attachment format does not establish the
10
- outgoing format. A supplier may reject a format; native error handling applies
7
+ Native request admission does not compare projected image MIME against the
8
+ account model's advertised formats before dispatch. Core may re-encode an image,
9
+ so a filename or durable attachment format does not establish the outgoing
10
+ format. A supplier may reject a format; native error handling applies
11
11
  without an automatic retry, conversion, model switch or history mutation by this
12
12
  plugin. The former plugin `COPILOT_IMAGE_MEDIA_TYPE_UNSUPPORTED` and related
13
13
  preflight diagnostics are no longer produced.
14
14
 
15
- The explicit native model-sync operation still skips image models unless the
16
- account advertises all four native request formats. This conservative model
17
- filter is separate from per-request admission and does not prove supplier
18
- acceptance. An explicit smaller [native image budget](./copilot-compaction.md)
15
+ The explicit native model-sync operation submits enabled IDs without filtering
16
+ on account image-format claims or copying capability metadata. Its optional
17
+ provider-wide API update is gated only on verified protocol metadata and
18
+ matching native catalog entries; it does not prove image compatibility or
19
+ supplier acceptance. An explicit smaller [native image budget](./copilot-compaction.md)
19
20
  can change what Core offloads; it is not a supplier JSON threshold.
20
21
 
21
22
  `tests/preview-route.spec.ts` exercises native projection and synthetic dispatch
@@ -34,22 +34,42 @@ account-advertised metadata through public APIs. Native Copilot OAuth and
34
34
  ordinary model calls remain owned by DSH's canonical `github-copilot` provider.
35
35
  An account switch is a separate, explicit operation and does not imply a model
36
36
  catalog sync. The optional native model sync is separately previewed and
37
- confirmed, writes only the existing native model-list path, and never creates a
37
+ confirmed, writes the existing native model-list path, and never creates a
38
38
  provider profile.
39
39
 
40
40
  Model sync submits all enabled account IDs as `{ id }` entries, without a
41
41
  second capability filter or a native-catalog intersection (#508). Missing
42
42
  native IDs are advisory only. Native configuration resolves definitions from
43
43
  its own catalog and existing route settings; it may reject an unresolved ID and
44
- therefore the entire write. The plugin does not force an API, suppress native
45
- validation or claim model-call compatibility from a matching name.
44
+ therefore the entire write. For missing IDs only, if no route API is configured,
45
+ the preview may propose a provider-wide API when every enabled account model
46
+ has the same verified protocol and every matching native catalog entry agrees.
47
+ This applies to the whole route and must be disclosed before confirmation.
48
+ Existing route APIs are preserved; mixed, incomplete or conflicting evidence
49
+ blocks the sync. The model list and authorized route API are written together.
50
+ Native validation remains authoritative; the plugin never guesses a protocol
51
+ or claims model-call compatibility from a matching name.
46
52
 
47
53
  Confirming sync replaces per-model customizations, including explicit output
48
54
  request defaults. The preview discloses updated and removed entries, and the
49
55
  saved list is checked against both user and effective Settings. Failures and
50
56
  uncertain outcomes remain errors, with no automatic retry. Successful ID-only
51
- lists remain usable by the native adapter after plugin unload; that persistence
52
- does not prove supplier capability or successful inference.
57
+ lists remain saved after plugin unload; that persistence does not prove supplier
58
+ capability or successful inference.
59
+
60
+ On the pinned native adapter, ID-only models absent from the installed catalog
61
+ do not inherit its per-model IDE headers. A route-wide API selects a generic
62
+ protocol provider, not an alternative Copilot wire. The plugin supplements
63
+ missing `Editor-Version`, `Editor-Plugin-Version` and `Copilot-Integration-Id`
64
+ through the public `llm-pi-ai/request-headers` waterfall, taking values and
65
+ eligible default endpoints from the published pi-ai Copilot provider. It does
66
+ not copy capabilities, mutate the catalog, replace credentials or implement
67
+ another transport. Explicit request headers and native User-Agent attribution
68
+ remain unchanged; other providers and custom endpoints receive no contribution.
69
+ The listener is removed on disposal, without deleting the saved model list.
70
+ Consequently, affected models can fail again after unload. A synthetic native
71
+ stream regression covers missing-header rejection and successful header
72
+ delivery; it does not certify supplier acceptance or all model capabilities.
53
73
 
54
74
  The account controls cannot replace DSH's native provider **Edit/Delete**
55
75
  controls. Saving another native provider group remains a native DSH action; the
@@ -90,8 +110,20 @@ provider 可能不可用;DSH 会报告已配置 provider 缺失,不会静默
90
110
 
91
111
  插件仍可通过公开 API 提供账号管理、额度展示和账号模型元数据。原生 Copilot OAuth
92
112
  及普通模型请求仍由 DSH canonical `github-copilot` provider 所有。账号切换是独立的
93
- 显式操作,不代表同步模型目录。可选的原生模型同步需单独预览并确认,只写入已有的
94
- 原生模型列表路径,不会创建 provider profile。
113
+ 显式操作,不代表同步模型目录。可选的原生模型同步需单独预览并确认,写入已有的
114
+ 原生模型列表路径,不会创建 provider profile。仅对原生目录缺失的 ID,如果尚未配置
115
+ route API,且所有启用账号模型的已验证协议一致、目录中匹配的原生模型协议也一致,
116
+ 预览才会建议设置 provider 级 API,并明确披露它影响整条路由。已有 route API 不覆盖;
117
+ 协议混合、证据缺失或冲突时阻止同步。模型列表和获准的 API 会在同一写入中提交,
118
+ 原生校验仍是最终依据。
119
+
120
+ 当前固定版本的原生适配器中,不在内置目录的 ID-only 模型不会继承模型级 IDE 请求头。
121
+ 插件通过公开 `llm-pi-ai/request-headers` 钩子,从已发布 pi-ai Copilot provider 补齐
122
+ 缺失的 `Editor-Version`、`Editor-Plugin-Version`、`Copilot-Integration-Id`,
123
+ 仅适用于原生 Copilot 路由及该 provider 公布的默认端点。保留显式请求头和原生
124
+ User-Agent;不改目录、能力、凭据或设置,不新增传输,也不自动重试。
125
+ 卸载插件会移除该补充而保留模型列表,因此受影响模型可能再次出现缺少请求头错误。
126
+ 合成原生流回归覆盖缺头拒绝和补齐后的交付,不代表所有模型能力或真实供应商调用均已验证。
95
127
 
96
128
  账号界面不能替代 DSH 原生 provider 的 **Edit/Delete** 控件。新增原生 provider 组仍是
97
129
  DSH 操作;插件不拦截,也不声称能强制只保留一个组。
package/lib/client.js CHANGED
@@ -7075,6 +7075,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7075
7075
  "NATIVE_MODEL_SYNC_NATIVE_AUTH_UNPROVEN",
7076
7076
  "NATIVE_MODEL_SYNC_OVERRIDES_CONFLICT",
7077
7077
  "NATIVE_MODEL_SYNC_ROUTE_COMPAT_UNPROVEN",
7078
+ "NATIVE_MODEL_SYNC_ROUTE_API_UNPROVEN",
7079
+ "NATIVE_MODEL_SYNC_ROUTE_API_CONFLICT",
7078
7080
  "NATIVE_MODEL_SYNC_NO_SYNCABLE_MODELS",
7079
7081
  "NATIVE_MODEL_SYNC_PLAN_EXPIRED",
7080
7082
  "NATIVE_MODEL_SYNC_PLAN_STALE",
@@ -7100,6 +7102,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7100
7102
  removedIds: array(string().min(1).max(200)).max(512),
7101
7103
  updatedIds: array(string().min(1).max(200)).max(512),
7102
7104
  nativeCatalogMissingIds: array(string().min(1).max(200)).max(512).optional(),
7105
+ routeApiChange: _enum([
7106
+ "anthropic-messages",
7107
+ "openai-responses",
7108
+ "openai-completions"
7109
+ ]).optional(),
7103
7110
  skipped: array(object({
7104
7111
  id: string().min(1).max(200),
7105
7112
  code: _enum([
@@ -12297,12 +12304,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12297
12304
  case "NATIVE_MODEL_SYNC_NATIVE_AUTH_UNPROVEN": return "The native provider uses custom authentication, an endpoint, or headers; its account cannot be verified for sync.";
12298
12305
  case "NATIVE_MODEL_SYNC_OVERRIDES_CONFLICT": return "Native model overrides conflict with a custom model list. Review them before syncing; they will not be removed automatically.";
12299
12306
  case "NATIVE_MODEL_SYNC_ROUTE_COMPAT_UNPROVEN": return "Native route compatibility overrides cannot be verified for the new model list. Review them before syncing.";
12307
+ case "NATIVE_MODEL_SYNC_ROUTE_API_UNPROVEN": return "Enabled models do not share one verified protocol for the missing native IDs. No settings were changed.";
12308
+ case "NATIVE_MODEL_SYNC_ROUTE_API_CONFLICT": return "The existing route API or native catalog conflicts with account protocol metadata. No settings were changed.";
12300
12309
  case "NATIVE_MODEL_SYNC_NO_SYNCABLE_MODELS": return "No enabled account model IDs are available to submit.";
12301
12310
  case "NATIVE_MODEL_SYNC_PLAN_EXPIRED":
12302
12311
  case "NATIVE_MODEL_SYNC_PLAN_STALE": return "The model list changed or expired. Review the refreshed changes before syncing again.";
12303
12312
  case "NATIVE_MODEL_SYNC_SETTINGS_CONFLICT": return "Native settings changed elsewhere. Review the refreshed changes before syncing again.";
12304
12313
  case "NATIVE_MODEL_SYNC_READBACK_FAILED":
12305
- case "NATIVE_MODEL_SYNC_SAVE_FAILED": return "Could not confirm the native settings update. Native validation may reject unresolved model IDs. Read the saved settings before trying again.";
12314
+ case "NATIVE_MODEL_SYNC_SAVE_FAILED": return "Could not confirm the native settings update. Check the saved settings before trying again.";
12306
12315
  default: return "Native model sync is unavailable. No settings were changed.";
12307
12316
  }
12308
12317
  }
@@ -12463,6 +12472,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12463
12472
  ]);
12464
12473
  const applyNativeSync = async () => {
12465
12474
  const planId = syncPreview?.planId;
12475
+ const routeApiChange = syncPreview?.routeApiChange;
12466
12476
  const scope = request.current;
12467
12477
  if (planId === void 0 || nativeSyncDisabled || syncPending.current || scope.pending) return;
12468
12478
  const generation = scope.generation;
@@ -12497,7 +12507,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12497
12507
  } else setSyncResult(nativeSyncMessage(code));
12498
12508
  return;
12499
12509
  }
12500
- setSyncResult(`Synced ${parsed.data.modelCount} models to the native provider settings. This does not select a model.`);
12510
+ setSyncResult(`Synced ${parsed.data.modelCount} models to the native provider settings.` + (routeApiChange === void 0 ? "" : ` Set the provider-wide API to ${routeApiChange}.`) + " This does not select a model.");
12501
12511
  } catch {
12502
12512
  if (current()) uncertain();
12503
12513
  } finally {
@@ -12677,7 +12687,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12677
12687
  display: "grid",
12678
12688
  gap: "6px"
12679
12689
  }
12680
- }, (0, react.createElement)("p", { style: {
12690
+ }, syncPreview.routeApiChange === void 0 ? null : (0, react.createElement)("p", {
12691
+ role: "note",
12692
+ "data-dsh-github-copilot-native-model-sync-route-api": true,
12693
+ style: {
12694
+ ...nativeCaptionStyle,
12695
+ margin: 0
12696
+ }
12697
+ }, `Set the provider-wide API from unset to ${syncPreview.routeApiChange}. This applies to every synced model; account metadata and matching native catalog entries agree.`), (0, react.createElement)("p", { style: {
12681
12698
  ...nativeCaptionStyle,
12682
12699
  margin: 0
12683
12700
  } }, `${syncPreview.syncableCount} of ${syncPreview.enabledCount} enabled model IDs will be submitted; ${syncPreview.addedIds.length} added, ${syncPreview.updatedIds.length} updated, ${syncPreview.removedIds.length} removed from the native list, ${syncPreview.skipped.length} skipped.`), (0, react.createElement)("div", {
@@ -12689,7 +12706,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12689
12706
  overflowY: "auto",
12690
12707
  ...nativeCaptionStyle
12691
12708
  }
12692
- }, !syncPreview.nativeCatalogMissingIds?.length ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, "IDs absent from the installed native catalog"), (0, react.createElement)("p", null, "These IDs are included, not skipped. Native settings may reject the entire update if their protocol cannot be resolved."), (0, react.createElement)("ul", null, ...syncPreview.nativeCatalogMissingIds.map((id) => (0, react.createElement)("li", { key: id }, (0, react.createElement)("code", null, id))))), syncPreview.removedIds.length === 0 ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, "Native models that will be removed"), (0, react.createElement)("ul", null, ...syncPreview.removedIds.map((id) => (0, react.createElement)("li", { key: id }, (0, react.createElement)("code", null, id))))), syncPreview.skipped.length === 0 ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, "Models unavailable for this native list"), (0, react.createElement)("ul", null, ...syncPreview.skipped.map((item) => (0, react.createElement)("li", { key: item.id }, (0, react.createElement)("code", null, item.id), ` — ${nativeSyncSkipMessage(item.code)} (${item.code})`)))), syncPreview.addedIds.length === 0 ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, "Models to add"), (0, react.createElement)("ul", null, ...syncPreview.addedIds.map((id) => (0, react.createElement)("li", { key: id }, (0, react.createElement)("code", null, id))))), syncPreview.updatedIds.length === 0 ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, "Models to update"), (0, react.createElement)("ul", null, ...syncPreview.updatedIds.map((id) => (0, react.createElement)("li", { key: id }, (0, react.createElement)("code", null, id))))), syncPreview.outputTokenDefaults.length === 0 ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, `Per-request output defaults (${syncPreview.outputTokenDefaults.length})`), (0, react.createElement)("ul", null, ...syncPreview.outputTokenDefaults.map((item) => (0, react.createElement)("li", { key: item.id }, (0, react.createElement)("code", null, item.id), ` — ${item.maxTokens.toLocaleString()} max output tokens`)))))), (0, react.createElement)("button", {
12709
+ }, !syncPreview.nativeCatalogMissingIds?.length ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, "IDs absent from the installed native catalog"), (0, react.createElement)("p", null, "These IDs are included, not skipped. Any verified provider-wide API change is shown below; native validation may still reject the entire update."), (0, react.createElement)("ul", null, ...syncPreview.nativeCatalogMissingIds.map((id) => (0, react.createElement)("li", { key: id }, (0, react.createElement)("code", null, id))))), syncPreview.removedIds.length === 0 ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, "Native models that will be removed"), (0, react.createElement)("ul", null, ...syncPreview.removedIds.map((id) => (0, react.createElement)("li", { key: id }, (0, react.createElement)("code", null, id))))), syncPreview.skipped.length === 0 ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, "Models unavailable for this native list"), (0, react.createElement)("ul", null, ...syncPreview.skipped.map((item) => (0, react.createElement)("li", { key: item.id }, (0, react.createElement)("code", null, item.id), ` — ${nativeSyncSkipMessage(item.code)} (${item.code})`)))), syncPreview.addedIds.length === 0 ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, "Models to add"), (0, react.createElement)("ul", null, ...syncPreview.addedIds.map((id) => (0, react.createElement)("li", { key: id }, (0, react.createElement)("code", null, id))))), syncPreview.updatedIds.length === 0 ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, "Models to update"), (0, react.createElement)("ul", null, ...syncPreview.updatedIds.map((id) => (0, react.createElement)("li", { key: id }, (0, react.createElement)("code", null, id))))), syncPreview.outputTokenDefaults.length === 0 ? null : (0, react.createElement)("div", null, (0, react.createElement)("strong", null, `Per-request output defaults (${syncPreview.outputTokenDefaults.length})`), (0, react.createElement)("ul", null, ...syncPreview.outputTokenDefaults.map((item) => (0, react.createElement)("li", { key: item.id }, (0, react.createElement)("code", null, item.id), ` — ${item.maxTokens.toLocaleString()} max output tokens`)))))), (0, react.createElement)("button", {
12693
12710
  type: "button",
12694
12711
  style: {
12695
12712
  ...controlStyle,