dsh-connect-trae 2.0.2 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.3 (2026-09-16)
4
+
5
+ ### Fixes
6
+
7
+ - **修复内置兜底目录里存在「不可调用模型」的问题**——插件在首次实时刷新落地前会先提供一份内置兜底模型列表,且这份列表**故意不经过「死 config_name」过滤**(过滤依赖实时目录,会把兜底本身误删)。因此它的 id 必须在源头就是正确的 `llm_utils_chat` config_name,而它此前不是:
8
+ - `auto` 不是任何 Trae 的 config_name,选中后会以 `4001` 失败——已移除。该条目会在「尚未刷新目录」时(未登录 / 网络抖动 / 卡片未刷新)被真正提供给用户,因此并非理论问题。
9
+ - `DeepSeek-V4-Flash` / `DeepSeek-V4-Pro` 缺少 `-Official` 后缀,不是真实 wire id——已更正为 `DeepSeek-V4-Flash-Official` / `DeepSeek-V4-Pro-Official`(依据 2026-09-15 实测目录,`docs/DS41_CALLABILITY.md`)。
10
+ - 新增回归测试锁定三条不变量:兜底 id 必须是真实 config_name(显式禁 `auto` 与裸名)、两个区域的兜底都不得出现 TraeCode 独占模型、`mergeTraeModelSources` 确实丢弃无 wire 匹配的目录行。
11
+
12
+ ### Docs
13
+
14
+ - **README 新增「模型覆盖范围」一节(中英同步)**——说明插件提供的是 Trae SOLO 通道的模型,而 TraeCode 通道的 4 个模型(`deepseek-v4.1-flash`、`glm-5.3-flash`、`kimi-k2.8-preview`、`qwen3.8-flash`)尚未开放到 SOLO 通道,因此暂不支持,**需要等官方开放到 SOLO 后才能支持**;并区分了 `GLM-5.3`(支持)与 `glm-5.3-flash`(不支持)。
15
+ - 新增 TraeCode / agent-task 通道与 TraeCLI 的可行性取证(`docs/CODEC_CHANNEL_FEASIBILITY.md`、`docs/TRAECLI_FEASIBILITY.md`、`docs/TRAE_ECOSYSTEM_RESEARCH.md`):四条路径逐一实测均不通,且阻塞原因互相独立(协议 / 配额 / 同机 / 登录态与 agent 归属),据此确认这批模型属上游授权边界而非插件可绕过的技术问题。
16
+
3
17
  ## 2.0.2 (2026-09-15)
4
18
 
5
19
  ### Fixes
package/README.en.md CHANGED
@@ -10,6 +10,7 @@
10
10
  <a href="README.md">中文</a> ·
11
11
  <a href="#install">Install</a> ·
12
12
  <a href="#how-it-works">How it works</a> ·
13
+ <a href="#model-coverage">Model coverage</a> ·
13
14
  <a href="CHANGELOG.md">Changelog</a> ·
14
15
  <a href="https://github.com/dingminhua/dsh-connect-trae/issues">Issues</a>
15
16
  </p>
@@ -56,6 +57,25 @@ Usage overview hits the read-only `https://api.trae.cn/trae/api/v2/pay/*` and `/
56
57
 
57
58
  > See `docs/IMPLEMENTATION_PLAN.md`, `docs/SOLO_ROUTE_DECISION.md`, `docs/USAGE_API_RESEARCH.md`.
58
59
 
60
+ ## Model coverage
61
+
62
+ This plugin serves models from Trae's **SOLO channel** (`DeepSeek-V4-Flash-Official`, `DeepSeek-V4-Pro-Official`, `GLM-5.3`, `GLM-5.2`, `Kimi-K3`, `MiniMax-M3`, `Qwen3.8-Max`, `Doubao-Seed-*`, …), for both the domestic and international sides.
63
+
64
+ The following four models currently come from the **TraeCode (Trae IDE) channel** and have **not** been opened up to the SOLO channel, so this plugin does **not** support them yet:
65
+
66
+ | Model |
67
+ | --- |
68
+ | `deepseek-v4.1-flash` |
69
+ | `glm-5.3-flash` |
70
+ | `kimi-k2.8-preview` |
71
+ | `qwen3.8-flash` |
72
+
73
+ These four are reachable only inside the Trae IDE client; there is no callable channel for them on the plugin side. **They can only be supported once Trae officially opens them up to the SOLO channel.**
74
+
75
+ > Note the distinction: **`GLM-5.3` is supported** (it goes through the SOLO channel), but **`glm-5.3-flash` is not** — they are different models.
76
+
77
+ To use these four models today, use the **Trae IDE itself**.
78
+
59
79
  ## Install
60
80
 
61
81
  ```sh
package/README.md CHANGED
@@ -10,6 +10,7 @@
10
10
  <a href="README.en.md">English</a> ·
11
11
  <a href="#安装">安装</a> ·
12
12
  <a href="#工作原理">工作原理</a> ·
13
+ <a href="#模型覆盖范围">模型覆盖范围</a> ·
13
14
  <a href="CHANGELOG.md">更新日志</a> ·
14
15
  <a href="https://github.com/dingminhua/dsh-connect-trae/issues">问题反馈</a>
15
16
  </p>
@@ -56,6 +57,25 @@ DSH PiAiAdapter(每个 provider 一套)
56
57
 
57
58
  > 详见 `docs/IMPLEMENTATION_PLAN.md`、`docs/SOLO_ROUTE_DECISION.md`、`docs/USAGE_API_RESEARCH.md`。
58
59
 
60
+ ## 模型覆盖范围
61
+
62
+ 插件提供的是 Trae **SOLO 通道**的模型(`DeepSeek-V4-Flash-Official`、`DeepSeek-V4-Pro-Official`、`GLM-5.3`、`GLM-5.2`、`Kimi-K3`、`MiniMax-M3`、`Qwen3.8-Max`、`Doubao-Seed-*` 等),国内版与国际版均走这条通道。
63
+
64
+ 以下 4 个模型目前来自 **TraeCode(Trae IDE)通道**,尚未开放到 SOLO 通道,因此本插件**暂不支持**:
65
+
66
+ | 模型 |
67
+ | --- |
68
+ | `deepseek-v4.1-flash` |
69
+ | `glm-5.3-flash` |
70
+ | `kimi-k2.8-preview` |
71
+ | `qwen3.8-flash` |
72
+
73
+ 这 4 个模型只在 Trae IDE 客户端内可用,插件侧没有可调用的通道。**需要等官方把它们开放到 SOLO 通道后,插件才能支持。**
74
+
75
+ > 注意区分:**`GLM-5.3` 是支持的**(走 SOLO 通道),但 **`glm-5.3-flash` 不支持**——两者是不同的模型。
76
+
77
+ 如果你现在就要用这 4 个模型,请直接在 **Trae IDE 本体**中使用。
78
+
59
79
  ## 安装
60
80
 
61
81
  推荐使用 DSH 插件命令安装 npm 已发布版本:
package/lib/index.d.ts CHANGED
@@ -112,7 +112,21 @@ interface TraeModelInfo {
112
112
  /** The directory function this model must be called through (see {@link TraeWireModel.function}). */
113
113
  wireFunction?: string;
114
114
  }
115
- /** Bootstrap catalog: identity only where current Trae metadata has not been fetched yet. */
115
+ /**
116
+ * Bootstrap catalog: identity only where current Trae metadata has not been
117
+ * fetched yet.
118
+ *
119
+ * Every id here must be a `config_name` that `llm_utils_chat` actually accepts,
120
+ * because this list is served verbatim before the first live refresh lands and
121
+ * it is NOT filtered against the wire map (the wire map can only confirm ids it
122
+ * happens to know, so filtering would delete the safety net exactly when it is
123
+ * needed — see `fallbackModels` in index.ts). The current CN roster was
124
+ * verified against the live remote directory on 2026-09-15
125
+ * (docs/DS41_CALLABILITY.md): `DeepSeek-V4-Flash-Official` and
126
+ * `DeepSeek-V4-Pro-Official` carry the `-Official` suffix, and there is no
127
+ * `auto` config_name — an `auto` row was previously served here and would have
128
+ * failed on selection.
129
+ */
116
130
  declare const FALLBACK_TRAE_MODELS: readonly TraeModelInfo[];
117
131
  /**
118
132
  * Bootstrap catalog for the international (ai) region, captured from the
@@ -174,8 +188,8 @@ interface TraeWireModel {
174
188
  *
175
189
  * Joining is two-tier, in priority order:
176
190
  * 1. `wire.id` (the `config_name`) equals the remote id — the model's display
177
- * id is already its wire id (the common case: glm-5.2, DeepSeek-V4-Flash,
178
- * kimi-k3, …).
191
+ * id is already its wire id (the common case: glm-5.2,
192
+ * DeepSeek-V4-Flash-Official, kimi-k3, …).
179
193
  * 2. `wire.name` (the `display_name`) equals the remote display name — for
180
194
  * models whose display id differs from the wire id across Trae versions.
181
195
  * When the matched wire `config_name` differs from the remote id it is recorded
package/lib/index.js CHANGED
@@ -15,18 +15,28 @@ import { Readable } from "node:stream";
15
15
  import { execFile } from "node:child_process";
16
16
  import { promisify } from "node:util";
17
17
  //#region src/catalog.ts
18
- /** Bootstrap catalog: identity only where current Trae metadata has not been fetched yet. */
18
+ /**
19
+ * Bootstrap catalog: identity only where current Trae metadata has not been
20
+ * fetched yet.
21
+ *
22
+ * Every id here must be a `config_name` that `llm_utils_chat` actually accepts,
23
+ * because this list is served verbatim before the first live refresh lands and
24
+ * it is NOT filtered against the wire map (the wire map can only confirm ids it
25
+ * happens to know, so filtering would delete the safety net exactly when it is
26
+ * needed — see `fallbackModels` in index.ts). The current CN roster was
27
+ * verified against the live remote directory on 2026-09-15
28
+ * (docs/DS41_CALLABILITY.md): `DeepSeek-V4-Flash-Official` and
29
+ * `DeepSeek-V4-Pro-Official` carry the `-Official` suffix, and there is no
30
+ * `auto` config_name — an `auto` row was previously served here and would have
31
+ * failed on selection.
32
+ */
19
33
  const FALLBACK_TRAE_MODELS = [
20
34
  {
21
- id: "auto",
22
- name: "Auto"
23
- },
24
- {
25
- id: "DeepSeek-V4-Flash",
35
+ id: "DeepSeek-V4-Flash-Official",
26
36
  name: "DeepSeek-V4-Flash"
27
37
  },
28
38
  {
29
- id: "DeepSeek-V4-Pro",
39
+ id: "DeepSeek-V4-Pro-Official",
30
40
  name: "DeepSeek-V4-Pro"
31
41
  },
32
42
  {
@@ -126,8 +136,8 @@ function displayKey(name) {
126
136
  *
127
137
  * Joining is two-tier, in priority order:
128
138
  * 1. `wire.id` (the `config_name`) equals the remote id — the model's display
129
- * id is already its wire id (the common case: glm-5.2, DeepSeek-V4-Flash,
130
- * kimi-k3, …).
139
+ * id is already its wire id (the common case: glm-5.2,
140
+ * DeepSeek-V4-Flash-Official, kimi-k3, …).
131
141
  * 2. `wire.name` (the `display_name`) equals the remote display name — for
132
142
  * models whose display id differs from the wire id across Trae versions.
133
143
  * When the matched wire `config_name` differs from the remote id it is recorded
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dsh-connect-trae",
3
3
  "displayName": "DSH Connect Trae",
4
4
  "description": "Connect locally signed-in Trae models to DeepSeek Harness, plus a read-only usage/credits summary.",
5
- "version": "2.0.2",
5
+ "version": "2.0.3",
6
6
  "author": "dingminhua",
7
7
  "copyright": "Copyright (c) 2026 LaoDing",
8
8
  "license": "MIT",