@mars-sea/dsh-commandcode-provider 0.13.2 → 0.13.4
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 +50 -0
- package/README.md +23 -7
- package/README.zh-CN.md +18 -5
- package/lib/client.js +570 -64
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +64 -17
- package/lib/index.js +237 -59
- package/lib/index.js.map +1 -1
- package/package.json +38 -38
package/lib/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ type CommandCodeProtocol = 'cli' | 'openai' | 'messages';
|
|
|
61
61
|
declare const DEFAULT_MAX_OUTPUT_TOKENS = 131072;
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/adapter.d.ts
|
|
64
|
-
declare const COMMAND_CODE_CLI_VERSION = "1.82.
|
|
64
|
+
declare const COMMAND_CODE_CLI_VERSION = "1.82.5";
|
|
65
65
|
declare const DEFAULT_API_BASE = "https://api.commandcode.ai";
|
|
66
66
|
/**
|
|
67
67
|
* The output budget this bundle asks for, and the ceiling it will never exceed.
|
|
@@ -184,6 +184,18 @@ interface CommandCodeConnectionOptions {
|
|
|
184
184
|
* before, so composition configs and the web page are unaffected.
|
|
185
185
|
*/
|
|
186
186
|
modelVisibility?: Readonly<Record<string, boolean>> | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* 自定义上下文长度(全局值,issue #86):对没有 {@link contextWindowOverrides}
|
|
189
|
+
* 条目的目录模型,宣告给宿主的上下文窗口改用此值而非目录的
|
|
190
|
+
* `context_length`;选择器标注、`defaultMaxTokens` 预算同样跟随。
|
|
191
|
+
* 留空表示完全跟随目录。
|
|
192
|
+
*/
|
|
193
|
+
contextWindow?: number | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* 按模型的自定义上下文长度,键为目录模型 id;优先于 {@link contextWindow}。
|
|
196
|
+
* 非法条目在 `resolveAdapterOptions` 已被清洗,这里只读已判定的值。
|
|
197
|
+
*/
|
|
198
|
+
contextWindowOverrides?: Readonly<Record<string, number>> | undefined;
|
|
187
199
|
/**
|
|
188
200
|
* Optional protocol hint. `'auto'` (default) uses billing/cache plus
|
|
189
201
|
* Provider API fallback; `'cli'` forces `/alpha/generate`; `'openai'`
|
|
@@ -1001,14 +1013,16 @@ declare const KNOWN_EFFORTS: Readonly<Record<string, readonly string[]>>;
|
|
|
1001
1013
|
*/
|
|
1002
1014
|
declare const KNOWN_IMAGE_MODELS: ReadonlySet<string>;
|
|
1003
1015
|
/**
|
|
1004
|
-
* Models WITHOUT a zero-data-retention upstream
|
|
1005
|
-
* registry
|
|
1006
|
-
*
|
|
1007
|
-
*
|
|
1008
|
-
*
|
|
1009
|
-
*
|
|
1010
|
-
* 1.
|
|
1011
|
-
*
|
|
1016
|
+
* Models WITHOUT a zero-data-retention upstream. Through command-code@1.82.2
|
|
1017
|
+
* the CLI's own registry answered this: `modelSupportsZdr(id)` was exactly
|
|
1018
|
+
* `!nonZdrSet.has(canonicalize(id))`, and `knownModelSupportsZdr` carried the
|
|
1019
|
+
* membership in the sibling route table — the UNION of both was this set, and
|
|
1020
|
+
* the two anchors disagreed by one id (`meituan/LongCat-2.0:free`, which 1.74.1
|
|
1021
|
+
* dropped from the first anchor while the canonical helper kept it).
|
|
1022
|
+
* command-code@1.82.4 removes that disagreement by making the verdict a catalog
|
|
1023
|
+
* lookup — `resolveKnownCatalogModel({model,catalog})?.zdr ?? false` — so this
|
|
1024
|
+
* set is now the live catalog's `zdr:false` membership and nothing more. The
|
|
1025
|
+
* official docs (commandcode.ai/docs/resources/
|
|
1012
1026
|
* zdr) put coverage in prose — "99% of our models have ZDR-capable upstreams … only
|
|
1013
1027
|
* a small handful of models are affected" — so the CLI's exclusion list is
|
|
1014
1028
|
* the only per-model evidence there is; a ZDR request naming one of these
|
|
@@ -1021,10 +1035,19 @@ declare const KNOWN_IMAGE_MODELS: ReadonlySet<string>;
|
|
|
1021
1035
|
* switch is on — the provider remains the routing authority and refuses an
|
|
1022
1036
|
* unsupported model rather than silently dropping the privacy guarantee.
|
|
1023
1037
|
*
|
|
1024
|
-
* `minimax/minimax-m3-free` is the one entry the public catalog
|
|
1025
|
-
* (`/provider/v1/models`) does not serve (it is CLI/pricing-visible
|
|
1026
|
-
* from the picker); it stays listed because the CLI carries it and a Go-plan
|
|
1027
|
-
* request can still name it.
|
|
1038
|
+
* `minimax/minimax-m3-free` is the one entry the public catalog's default view
|
|
1039
|
+
* (`/provider/v1/models`) does not serve through the picker (it is CLI/pricing-visible
|
|
1040
|
+
* and hidden from the picker); it stays listed because the CLI carries it and a Go-plan
|
|
1041
|
+
* request can still name it. Both this row and `stealth/cat-jam:free` ARE served
|
|
1042
|
+
* by the `?view=client` catalog, which is where the 1.82.4 verdict comes from.
|
|
1043
|
+
*
|
|
1044
|
+
* command-code@1.82.4 moved the authority for this verdict: `knownModelSupportsZdr`
|
|
1045
|
+
* no longer negates a bundled Set, it returns `resolveKnownCatalogModel({model,
|
|
1046
|
+
* catalog})?.zdr ?? false`, so an id the catalog does not carry (or carries with
|
|
1047
|
+
* `zdr:false`) is NOT covered. That inverts the default this helper was built on
|
|
1048
|
+
* ("not listed" answered TRUE); the snapshot keeps its negative-set shape because
|
|
1049
|
+
* 99% of the catalog is still covered, but membership is now read from the
|
|
1050
|
+
* `?view=client` catalog and confirmed against the canonical helper set.
|
|
1028
1051
|
*
|
|
1029
1052
|
* Keep in sync via the dsh-commandcode-upstream skill: the CLI's registry data
|
|
1030
1053
|
* (its `zdr:{only:[…]}` provider routes and the per-provider `zdr`/`noTraining`
|
|
@@ -1045,6 +1068,11 @@ declare const KNOWN_IMAGE_MODELS: ReadonlySet<string>;
|
|
|
1045
1068
|
* `listSelectableModelIds()`, so they are pruned along with the rest of the
|
|
1046
1069
|
* tables and `supportsZeroDataRetention` now answers TRUE for them, matching
|
|
1047
1070
|
* what the current CLI says.
|
|
1071
|
+
*
|
|
1072
|
+
* 1.82.4 then reversed 1.74.1's removal of `meituan/LongCat-2.0:free` and added
|
|
1073
|
+
* the `stealth/cat-jam:free` preview, taking this set to 24 members — the size
|
|
1074
|
+
* of the live catalog's `zdr:false` list. The canonical helper set still carries
|
|
1075
|
+
* 23 because `cat-jam:free` postdates the artifact's embedded snapshot.
|
|
1048
1076
|
*/
|
|
1049
1077
|
declare const KNOWN_NON_ZDR_MODELS: ReadonlySet<string>;
|
|
1050
1078
|
/**
|
|
@@ -1074,15 +1102,20 @@ declare const KNOWN_THINKING_MODELS: ReadonlySet<string>;
|
|
|
1074
1102
|
* `/docs/plans/max` and `/docs/resources/pricing-limits`). Each plan's model
|
|
1075
1103
|
* list is a superset of the one below it: Go ⊂ GOAT ⊂ Pro ⊂ Provider/Max.
|
|
1076
1104
|
* Models absent from every plan list (Claude Opus/Fable, Fugu Ultra) are
|
|
1077
|
-
* Provider-tier. Re-verified at command-code@1.82.
|
|
1078
|
-
*
|
|
1105
|
+
* Provider-tier. Re-verified at command-code@1.82.4 (2026-10-16) against the
|
|
1106
|
+
* live `?view=client` catalog: 93 ids, still a strict superset chain. Mistral
|
|
1107
|
+
* Large 4
|
|
1079
1108
|
* (1.75.0) was the only addition at the 1.77.0 check; the 1.78.0/1.79.0 pair
|
|
1080
1109
|
* added Claude Haiku 5.5 at Pro and the free Glyph Cluster preview at Go.
|
|
1081
1110
|
* 1.79.2 lowers Haiku 5.5's minimum plan to GOAT; 1.80.0 adds Muse Wonder at
|
|
1082
|
-
* Max; 1.82.0 adds Gemini 4 Argon at Pro and nothing else moves.
|
|
1111
|
+
* Max; 1.82.0 adds Gemini 4 Argon at Pro and nothing else moves. The 1.82.4
|
|
1112
|
+
* train adds Qwen 3.8 Max Prime at GOAT plus Muse Spark Open, Nemotron 3.5
|
|
1113
|
+
* Super VL and the free Cat Jam preview at Go, and drops Ling 3.0 Flash Sante,
|
|
1114
|
+
* which left the live catalog. Every other
|
|
1083
1115
|
* tier is unchanged.
|
|
1084
1116
|
* The only removals since 1.49.0 are the two retired stealth previews (Pixel
|
|
1085
|
-
* Canary at 1.73.1, Space Bunny Alpha at 1.74.3)
|
|
1117
|
+
* Canary at 1.73.1, Space Bunny Alpha at 1.74.3) and Ling 3.0 Flash Sante
|
|
1118
|
+
* (2026-10-16). Per-entry tags below name the
|
|
1086
1119
|
* releases that added or moved each row.
|
|
1087
1120
|
*
|
|
1088
1121
|
* The Provider API exposes no plan metadata, so this snapshot is the source of
|
|
@@ -2192,6 +2225,20 @@ interface Config {
|
|
|
2192
2225
|
* path per model — a map.
|
|
2193
2226
|
*/
|
|
2194
2227
|
modelVisibility?: Record<string, boolean>;
|
|
2228
|
+
/**
|
|
2229
|
+
* 自定义上下文长度(全局值,issue #86):宣告给宿主的上下文窗口不再取
|
|
2230
|
+
* 模型目录的 `context_length`,而用这个值——上下文计量、自动压缩时机与
|
|
2231
|
+
* 选择器上的上下文标注都跟随它。对没有 {@link contextWindowOverrides}
|
|
2232
|
+
* 条目的每个目录模型生效;留空(默认)跟随目录。只对目录中存在的模型
|
|
2233
|
+
* 生效,未知模型保持既有的「无上下文宣告」。范围 1 – 10 000 000 个整数 token。
|
|
2234
|
+
*/
|
|
2235
|
+
contextWindow?: number;
|
|
2236
|
+
/**
|
|
2237
|
+
* 按模型的自定义上下文长度,键为目录模型 id;优先于全局
|
|
2238
|
+
* {@link contextWindow}。配置校验拒绝非整数及越界值;绕过校验的程序化
|
|
2239
|
+
* 调用还会丢弃无效条目,按全局值、目录值的顺序回落。
|
|
2240
|
+
*/
|
|
2241
|
+
contextWindowOverrides?: Record<string, number>;
|
|
2195
2242
|
/**
|
|
2196
2243
|
* Extra accounts for multi-account rotation. The top-level
|
|
2197
2244
|
* `apiKey`/`apiKeyEnv` (plus the CLI auth file) always form the first
|