@eddyskywalker/dsh-chatgpt-subscription 0.9.0 → 0.9.5
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 +18 -0
- package/README.md +9 -1
- package/lib/index.js +365 -34
- package/lib/types/host/claude/adapter.d.ts +52 -1
- package/lib/types/host/claude/adapter.d.ts.map +1 -1
- package/lib/types/host/claude/model-catalog.d.ts +43 -0
- package/lib/types/host/claude/model-catalog.d.ts.map +1 -1
- package/lib/types/host/claude/types.d.ts +61 -11
- package/lib/types/host/claude/types.d.ts.map +1 -1
- package/lib/types/host/common/account-pool.d.ts +40 -0
- package/lib/types/host/common/account-pool.d.ts.map +1 -1
- package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
- package/lib/types/host/kimi-code/client.d.ts +28 -0
- package/lib/types/host/kimi-code/client.d.ts.map +1 -1
- package/lib/types/host/kimi-code/routes.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- **修复用户实测缺陷:选择 Claude Opus 5.5 必然失败(`claude_code_version_too_old`)**。上游原文:`Claude Code 2.1.251 does not support this model; version 2.1.280 or newer is required.` 那个 **2.1.251 是本插件自己申报的版本号**被服务端回显——本插件发布 `claude-opus-5-5`(该模型要求客户端 ≥ 2.1.280),却仍申报 2.1.251,两个数字自相矛盾,因此对该模型的每次请求都白花一个往返后被拒。**这是本插件引入的缺陷,与用户环境无关。**
|
|
6
|
+
- **根因不只是"数字写旧了"**:加模型与抬版本之间没有任何强制关系,所以同类缺陷会反复出现。修法分两层。
|
|
7
|
+
- **① 修正值与记录门槛**:`CLAUDE_CLI_VERSION` 由 `2.1.251` 改为 `2.1.283`(npm `latest` 的真实已发布版本,且 ≥ 2.1.280)。能力表新增可选字段 `minCliVersion`,**仅**给 `claude-opus-5-5` 填 `2.1.280`;其余 14 行**一律不填**,接口注释写明「缺省 = 未知门槛,不等于没有门槛」——不臆造无依据的数字。注:上游 npm `stable` tag 本身是 `2.1.274`,**低于该模型要求**,这正是 [anthropics/claude-code#96130](https://github.com/anthropics/claude-code/issues/96130) 报的坑。
|
|
8
|
+
- **② 本地预检,不再让上游报错**:新增 `assertClaudeCliVersionMeetsFloor()`,在 `requestStream()` **解析凭据之前、发起 fetch 之前**比较「生效版本 vs 该模型门槛」,低于则抛 `PROVIDER_ERROR`(**明确不是凭据错误**——错误文案直接写明「你的登录态仍然有效,重新登录不会改变它」,因为上游原文会误导用户去重新登录)。未记录门槛的模型行为不变;上游 400 分支保留,用于应对「本表尚未知的门槛」。
|
|
9
|
+
- **③ 加了会咬人的不变量锁**:测试断言「**申报的默认版本 ≥ 每一个模型的 `minCliVersion`**」,对**全表**遍历、且针对**申报常量本身**(不受 pin/环境变量影响),失败信息会同时点出两个版本号与修法。**我独立做了变异验证**:把 Opus 5.5 的门槛临时改成 `2.1.300`,测试立刻失败并输出 `CLAUDE_CLI_VERSION is 2.1.283 but claude-opus-5-5 requires 2.1.300 or newer…expected -17 to be greater than or equal to 0`;恢复后 22 项全绿。这条锁从此让「加了高门槛模型却忘抬版本」无法通过 CI。
|
|
10
|
+
- **排查过程中发现的另一件事**:npm 上 `0.9.0` 与 `0.9.2` **均已发布**,而**已发布的 0.9.2 仍然带着 `2.1.251` 且不含预检**(我拉了 tarball 核对)。同时 DSH web profile 通过软链接指向本仓库,而仓库的 `lib/` **是旧的**——所以运行中的插件确实跑的是有缺陷的构建。本次已重新 `npm run build`,构建产物现为 `2.1.283` + 预检(`lib` 由 .gitignore 覆盖,不入库)。
|
|
11
|
+
- **验证**:三个 tsconfig 均 **0 错误**;`npm test` **110 文件 / 1587 项通过、0 失败**;`npm run build` 成功。
|
|
12
|
+
- **临时可用的旁路**(无需等新版本):启动 DSH 前设 `DSH_CLAUDE_CLI_VERSION=2.1.283`。优先级为 pin > 环境变量 > 申报默认值。
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
- **修复 Kimi Code 设置卡片「过一段时间就报 `rejected the stored credential (401)`」**:这不是登录态过期,而是**卡片拿着一个已经过期的 access token 去查用量**,并把服务端的 401 读成了「凭据被拒绝」。
|
|
16
|
+
- **根因一:卡片从不刷新号池凭据**。`/status`、`/quota`、`/connection/test` 都把号池里的 credentials 原样交给 `fetchAccountQuota`,而它只在**没有**传入凭据时才会刷新——号池的刷新只发生在模型请求路径上(`getEffectiveAccount`)。Kimi 的 access token 只有 **900 秒**(实测本机凭据 `exp - iat = 900`),于是「15 分钟没发过 Kimi 消息」=「打开设置页必现 401」。实测本机两份存储:镜像里的 token 有效,号池里的 access token 已过期——正是这一条。
|
|
17
|
+
- **根因二:同一枚轮换 refresh token 被两条路径各自刷新**。单凭据文件是号池主账号的**镜像**,但目录加载会绕过号池去刷它(`loadProviderModels` → `ensureAccessToken(store)`,且 stale-while-revalidate 会在后台再刷一次)。Kimi 的 refresh token 轮换后旧的即作废,于是镜像先刷成功就把号池那份变成死令牌;适配器下次刷新拿到 `invalid_grant`,账号被标 `authStatus=expired` 移出轮换,而进程内的「已拒绝」墓碑只在**重新登录**时清除——必须重新登录才能恢复。官方 CLI 正是为同一问题加了跨进程文件锁。
|
|
18
|
+
- **修法**:号池新增 `getFreshCredential(accountId)`(按 id 取凭据、到期前刷新、写回池并镜像)与 `renewCredential(accountId)`(**无条件**续期);`AccountPoolCore` 两者共用一条 `credentialFor` 路径,失败分类与 `getEffectiveAccount` 一致(refresh 被判死刑才标记账号)。卡片三条路径全部改走它。
|
|
19
|
+
- **401 现在会先续期再判定**:`fetchAccountQuota` 收到 401 时用一次强制续期再重试一次,只有**第二次** 401 才是「重新登录」。单账号路径只在存储里仍是**同一枚** refresh token 时才续期——已被别人轮换过的令牌不再花掉。续期后的凭据会用于随后的 `/me` 与落盘,避免刚换到的新 token 立刻被旧 token 覆盖。
|
|
20
|
+
- **目录加载不再碰镜像**:`loadProviderModels` 新增 `credentialProvider` 接缝,适配器与路由在装了号池时传入号池的活跃凭据;带池时**完全不再回退**到单凭据文件,没有活跃账号时宁可返回空目录也不去轮换镜像里的令牌。无池部署行为不变(自刷新仍是它唯一的凭据来源)。
|
|
21
|
+
- **验证**:`tsc` 三个项目 0 错误;`npm test` **110 文件 / 1582 项通过、0 失败**(新增 9 条)。把源码 stash 回修复前,其中 6 条失败,确认断言不是空转。
|
|
22
|
+
|
|
5
23
|
- **移除 Claude 线路的「合规告知 + 确认门禁」**:设置卡片顶部那段必须显式接受的告知、`/claude/api/consent` 路由、以及**主机侧门禁**全部删除。
|
|
6
24
|
- **为什么必须整体删除而不是只删界面**:那条门禁不是纯 UI——它决定**适配器是否注册**,未接受时 `login`/`adopt`/`accounts`/`quota`/`connection/test`/`catalog/refresh`/`settings`(POST)/`login/input` 一律 403。**只删告知框会留下门禁、却再没有地方能确认它,等于把这条线路锁死。** 现在 `claimClaudeRoute` **无条件注册**(保留原有的路由争用处理:`try/catch` + `claudeConflict` 上报 + `llm/adapters-updated` 重新认领)。
|
|
7
25
|
- **风险事实不变,只是不再要求点击**:Anthropic 现行条款仍明确不允许第三方应用提供 Claude.ai 登录、也不允许代用户经 Free/Pro/Max 凭据转发请求,本插件**仍未获任何授权或认可**。README 保留了如实说明,并写明「此前版本有确认步骤,现已移除;移除的只是那一步交互,不改变上述事实」。
|
package/README.md
CHANGED
|
@@ -424,6 +424,12 @@ DSH 设置页的「Subagent」卡片会把勾选的模型写成会话级的允
|
|
|
424
424
|
「强制 effort」分支,若把 Opus 5.5 一并归入,就会**静默把每次请求抬高一档、花更多钱**,因此它走的是普通 adaptive
|
|
425
425
|
分支。
|
|
426
426
|
|
|
427
|
+
它还有一条**版本门槛**:上游要求申报的客户端版本 **≥ 2.1.280** 才为该模型提供服务。能力表用 `minCliVersion`
|
|
428
|
+
记录这一点(**只有这一行有门槛**,其余 14 行缺省——缺省表示「未知」而不是「无门槛」,不臆造数字)。插件申报的
|
|
429
|
+
默认版本为 **2.1.283**,并且**在发出请求之前就本地校验**「申报版本 vs 该模型门槛」,不满足时直接给出模型、当前
|
|
430
|
+
版本与要求版本,**而不是白花一个往返让上游返回 400**。测试另有一条不变量:**申报的默认版本必须 ≥ 表中每个模型的
|
|
431
|
+
门槛**——这条锁让「加了高门槛模型却忘了抬版本」无法通过 CI。
|
|
432
|
+
|
|
427
433
|
### 收编本机已有的 Claude Code 登录(可选,默认关闭)
|
|
428
434
|
|
|
429
435
|
如果你本机已经登录过 Claude Code,可以点「收编本机登录」把它作为一条账号导入,省去再次登录。
|
|
@@ -554,11 +560,13 @@ npm pack --dry-run
|
|
|
554
560
|
| Kimi Code 报 502 `Upstream model provider is temporarily unavailable` | 上游模型供应商的瞬时故障,与账号、模型、凭据都无关:插件会按 DSH retry policy 自动重试(最多 3 次,并遵守上游 `Retry-After`);连续失败可稍后再试或换用同账号下其他模型 |
|
|
555
561
|
| Kimi Code 报 429 `engine is currently overloaded` | 服务容量问题(工作日 14:00–17:00 高峰更常见),会自动退避重试;若响应里带 `error.type = exceeded_current_quota_error` 则属于配额耗尽,插件不会重试而是提示补充额度 |
|
|
556
562
|
| Kimi Code 额度显示为空 | 卡片会同时给出失败原因(`/v1/usages` 的 401/403/5xx 文案),按提示处理后点「刷新用量」重试;确认用的是订阅账号——开放平台的 key 在这里不会被接受 |
|
|
563
|
+
| Kimi Code 报「rejected the stored credential (401). Sign in again…」但发消息却是好的 | 这是**过期 access token**,不是被拒的账号:Kimi 的 access token 只有 **15 分钟**,而设置卡片过去会把号池里存着的那个 token 直接拿去查用量,因此只要 15 分钟内没走过一次 Kimi 请求,卡片就必然拿到 401。现在卡片会先刷新再请求(401 还会触发一次强制续期),因此**不必重新登录**;若卡片仍提示重新登录,才是真的刷新令牌被拒,按提示处理即可 |
|
|
557
564
|
| Kimi Code 账号一栏为空 | 账号身份取自 OAuth token 自身的 JWT 声明,套餐名取自 `/me`(`/usages` 自 2026-09 起不再返回 `user_level_name`)。重新登录或点「刷新用量」即可写入;若仍为空但显示「已登录」,点「测试连接」可确认凭据是否仍被接受 |
|
|
558
565
|
| Claude 相关接口返回 403 | 403 现在是**同源校验**的结果(修改状态的路由只接受同源 JSON POST)。若出现在浏览器里,检查是否从其它来源发起了请求;插件已不再有任何"确认后才能用"的门禁 |
|
|
559
566
|
| 授权后粘贴授权码报「请把 # 后面的部分一起复制」 | 手动流程需要 `<授权码>#<state>` **整段**。只粘贴授权码是不被接受的:用流程自己的 state 顶上会架空 state 参数、把粘贴框变成登录 CSRF 的入口,因此插件宁可报错也不猜 |
|
|
560
567
|
| loopback 回调收不到 / 端口绑定失败 | 端口探测失败会自动**降级为手动粘贴**(卡片会说明原因),照提示粘贴授权码即可。另:若浏览器把 `localhost` 解析到 `::1`,依赖浏览器的跨地址族回退可达本机 v4 监听,这是**假定**而非实测 |
|
|
561
|
-
|
|
|
568
|
+
| 选择某个模型报 `claude_code_version_too_old`(例如 Opus 5.5 要求 2.1.280+) | 上游会校验本插件**申报的**客户端版本,新模型有各自的最低版本要求。插件现在会**在发出请求之前**本地拦下并告知模型、当前版本与要求版本(归类为**请求问题而非凭据问题**,**不会把你登出**——重新登录也不会有帮助)。用 `DSH_CLAUDE_CLI_VERSION` 抬高申报版本即可;已发布版本 ≥2.1.283 时 Opus 5.5 可直接使用 |
|
|
569
|
+
| 模型请求报持续 400 / 「You're out of extra usage」 | 可能是身份或版本门槛:订阅令牌要求 Claude Code 身份头与 `system` 首块,且服务端会校验你申报的客户端版本。此类错误被归类为**请求问题而非凭据问题**,不会把你登出 |
|
|
562
570
|
| 额度显示为空 / 某项显示「—」 | 额度接口的键集随账号类型变化,未提供的窗口会显示为未知而**不会伪造 0**。注意 **`utilization` 是已用百分比,0% 表示尚未使用(正常态)**,不是额度耗尽;真正的耗尽会以 429 与响应头状态呈现。接口被限流时卡片保留上次成功快照并标注时间 |
|
|
563
571
|
| 收编后提示「本机 Claude Code 登录已过期」 | 这是设计如此:收编的是**快照**,插件永不刷新它(Claude Code 刷新同一枚轮换令牌,两个进程各自刷新会互相作废)。回 Claude Code 重新登录后**再收编一次**即可 |
|
|
564
572
|
| 账号被标为「无法识别账号身份」 | 服务端这个账号既没返回 uuid 也没返回 email,插件无法在再次登录时自动认出它。用卡片上的**手动合并**把它并入既有账号;这是已知限制,插件不会用假 id 掩盖它 |
|
package/lib/index.js
CHANGED
|
@@ -1172,6 +1172,67 @@ var AccountPoolCore = class {
|
|
|
1172
1172
|
credentials: selected.credentials
|
|
1173
1173
|
};
|
|
1174
1174
|
}
|
|
1175
|
+
/**
|
|
1176
|
+
* Refresh one named account's credential for a caller that is not a metered
|
|
1177
|
+
* model request.
|
|
1178
|
+
*
|
|
1179
|
+
* The settings card is what this exists for. It addresses an account by id
|
|
1180
|
+
* rather than taking a rotation slot, and it used to hand the stored
|
|
1181
|
+
* credential to the provider unchanged; with a 15-minute access token that
|
|
1182
|
+
* meant a card opened more than a quarter of an hour after the last model
|
|
1183
|
+
* request sent an expired bearer to the usage endpoint and was answered with
|
|
1184
|
+
* 401 — "sign in again" for a credential that a plain refresh would have
|
|
1185
|
+
* renewed.
|
|
1186
|
+
*
|
|
1187
|
+
* Rotation bookkeeping is deliberately ignored, matching
|
|
1188
|
+
* {@link getCredentialAccount}: a cooldown or a pinned account describes
|
|
1189
|
+
* routing, not whether the credential can be read. A credential the provider
|
|
1190
|
+
* has already declared unusable is still refused, because refreshing it
|
|
1191
|
+
* cannot succeed.
|
|
1192
|
+
*
|
|
1193
|
+
* @param accountId - the pool account to read, or undefined for the primary.
|
|
1194
|
+
* @param fetchFn - fetch used by the provider's token refresh.
|
|
1195
|
+
*/
|
|
1196
|
+
async getFreshCredential(accountId, fetchFn = fetch) {
|
|
1197
|
+
return this.credentialFor(accountId, fetchFn, false);
|
|
1198
|
+
}
|
|
1199
|
+
/**
|
|
1200
|
+
* Renew one account's credential unconditionally.
|
|
1201
|
+
*
|
|
1202
|
+
* This is the answer to a 401 that the local clock did not predict: an access
|
|
1203
|
+
* token can be revoked upstream or rotated by another holder while it still
|
|
1204
|
+
* looks unexpired, and only the service's own refusal says so. Renewing it is
|
|
1205
|
+
* what separates that from a credential that genuinely needs a new sign-in.
|
|
1206
|
+
*/
|
|
1207
|
+
async renewCredential(accountId, fetchFn = fetch) {
|
|
1208
|
+
return this.credentialFor(accountId, fetchFn, true);
|
|
1209
|
+
}
|
|
1210
|
+
/**
|
|
1211
|
+
* Resolve, and if needed renew, one account's credential.
|
|
1212
|
+
*
|
|
1213
|
+
* With no id the account that would serve the next request is used — the
|
|
1214
|
+
* active one, then the primary, then the first — because a caller that does
|
|
1215
|
+
* not name an account (the catalog loader) still has to present the
|
|
1216
|
+
* credential that is actually in play.
|
|
1217
|
+
*/
|
|
1218
|
+
async credentialFor(accountId, fetchFn, force) {
|
|
1219
|
+
const data = await this.read();
|
|
1220
|
+
const target = accountId === void 0 ? data.accounts.find((account) => account.id === data.activeAccountId) ?? data.accounts.find((account) => account.isPrimary) ?? data.accounts[0] : data.accounts.find((account) => account.id === accountId);
|
|
1221
|
+
if (target === void 0) throw new LlmError(this.hooks.emptyMessage ?? `未登录 ${this.hooks.displayName} 账号,请先在设置页添加账号。`, "AUTH");
|
|
1222
|
+
if (!this.isCredentialUsable(target)) throw new LlmError(`${this.hooks.displayName} 账号的凭据已被拒绝,需要重新登录。`, "AUTH", { status: 401 });
|
|
1223
|
+
if (!force && (!this.shouldRefreshCredential(target, Date.now()) || !this.hooks.refresh)) return target.credentials;
|
|
1224
|
+
if (!this.hooks.refresh) return target.credentials;
|
|
1225
|
+
let refreshed;
|
|
1226
|
+
try {
|
|
1227
|
+
refreshed = await this.hooks.refresh(target.credentials, fetchFn);
|
|
1228
|
+
} catch (error) {
|
|
1229
|
+
const status = this.hooks.refreshFailureStatus?.(error);
|
|
1230
|
+
if (status !== void 0) await this.markAuthFailed(target.id, error instanceof Error ? error.message : String(error), status).catch(() => void 0);
|
|
1231
|
+
throw error;
|
|
1232
|
+
}
|
|
1233
|
+
await this.updateAccountCredentials(target.id, refreshed);
|
|
1234
|
+
return refreshed;
|
|
1235
|
+
}
|
|
1175
1236
|
/** Whether one account's credential must be refreshed before it is handed out. */
|
|
1176
1237
|
shouldRefreshCredential(account, now) {
|
|
1177
1238
|
if (this.hooks.needsRefresh) return this.hooks.needsRefresh(account.credentials, now);
|
|
@@ -13841,6 +13902,7 @@ const catalogSnapshotScopesLoaded$1 = /* @__PURE__ */ new Set();
|
|
|
13841
13902
|
function clearCachedCatalog$2() {
|
|
13842
13903
|
catalogCache$1 = null;
|
|
13843
13904
|
catalogSnapshotScopesLoaded$1.clear();
|
|
13905
|
+
catalogActiveRegions.clear();
|
|
13844
13906
|
}
|
|
13845
13907
|
/**
|
|
13846
13908
|
* Read one model entry from the live catalog.
|
|
@@ -13920,7 +13982,9 @@ async function cachedOrRevalidate(options) {
|
|
|
13920
13982
|
}
|
|
13921
13983
|
if (accessToken === void 0) {
|
|
13922
13984
|
if (options.store === void 0) return [];
|
|
13923
|
-
|
|
13985
|
+
accessToken = catalogAccessToken(region);
|
|
13986
|
+
if (accessToken === void 0 && options.credentialProvider !== void 0) accessToken = await options.credentialProvider(region).catch(() => void 0);
|
|
13987
|
+
if (accessToken === void 0 && options.credentialProvider === void 0) try {
|
|
13924
13988
|
accessToken = (await ensureAccessToken$1(options.store, {
|
|
13925
13989
|
fetchFn: options.fetchFn,
|
|
13926
13990
|
signal: options.signal
|
|
@@ -13928,6 +13992,7 @@ async function cachedOrRevalidate(options) {
|
|
|
13928
13992
|
} catch {
|
|
13929
13993
|
return [];
|
|
13930
13994
|
}
|
|
13995
|
+
if (accessToken === void 0) return [];
|
|
13931
13996
|
}
|
|
13932
13997
|
const cacheKey = `${region}:${accessToken.slice(-8)}`;
|
|
13933
13998
|
if (catalogCache$1 !== null && catalogCache$1.key === cacheKey && Date.now() - catalogCache$1.fetchedAt < 18e5) return catalogCache$1.models;
|
|
@@ -13946,7 +14011,9 @@ async function performListing(options) {
|
|
|
13946
14011
|
let accessToken = options.accessToken;
|
|
13947
14012
|
if (accessToken === void 0) {
|
|
13948
14013
|
if (options.store === void 0) return [];
|
|
13949
|
-
|
|
14014
|
+
accessToken = catalogAccessToken(region);
|
|
14015
|
+
if (accessToken === void 0 && options.credentialProvider !== void 0) accessToken = await options.credentialProvider(region).catch(() => void 0);
|
|
14016
|
+
if (accessToken === void 0 && options.credentialProvider === void 0) try {
|
|
13950
14017
|
accessToken = (await ensureAccessToken$1(options.store, {
|
|
13951
14018
|
fetchFn: options.fetchFn,
|
|
13952
14019
|
signal: options.signal
|
|
@@ -13954,6 +14021,7 @@ async function performListing(options) {
|
|
|
13954
14021
|
} catch {
|
|
13955
14022
|
return [];
|
|
13956
14023
|
}
|
|
14024
|
+
if (accessToken === void 0) return [];
|
|
13957
14025
|
}
|
|
13958
14026
|
const response = await (options.fetchFn ?? fetch)(openAIUrl(MODELS_PATH$1, region), {
|
|
13959
14027
|
headers: await kimiCodeHeaders(accessToken, "openai"),
|
|
@@ -13964,6 +14032,7 @@ async function performListing(options) {
|
|
|
13964
14032
|
const data = Array.isArray(payload) ? payload : asRecord$5(payload)?.data;
|
|
13965
14033
|
if (!Array.isArray(data)) throw new Error("Kimi Code model listing was not in the documented shape.");
|
|
13966
14034
|
const models = data.map(parseCatalogModel).filter((model) => model !== void 0);
|
|
14035
|
+
rememberCatalogCredential(region, accessToken);
|
|
13967
14036
|
catalogCache$1 = {
|
|
13968
14037
|
fetchedAt: Date.now(),
|
|
13969
14038
|
models,
|
|
@@ -13976,6 +14045,28 @@ async function performListing(options) {
|
|
|
13976
14045
|
function cacheKeyOf(region, accessToken) {
|
|
13977
14046
|
return `${region}:${accessToken.slice(-8)}`;
|
|
13978
14047
|
}
|
|
14048
|
+
/**
|
|
14049
|
+
* Region whose active account is already carried by the catalog cache.
|
|
14050
|
+
*
|
|
14051
|
+
* The settings card reads the card and the catalog with the pool's active
|
|
14052
|
+
* credential but calls the loader without one, so without this the loader would
|
|
14053
|
+
* fall back to the single-credential mirror — a second copy of the same
|
|
14054
|
+
* rotating refresh token. Refreshing that copy invalidates the token the pool
|
|
14055
|
+
* will present on the next model request, and the account then reads as
|
|
14056
|
+
* rejected until a new sign-in.
|
|
14057
|
+
*/
|
|
14058
|
+
const catalogActiveRegions = /* @__PURE__ */ new Map();
|
|
14059
|
+
/**
|
|
14060
|
+
* Record which credential the last listing used, so a token-free caller for the
|
|
14061
|
+
* same region can reuse it instead of decrypting the mirror.
|
|
14062
|
+
*/
|
|
14063
|
+
function rememberCatalogCredential(region, accessToken) {
|
|
14064
|
+
catalogActiveRegions.set(region, accessToken);
|
|
14065
|
+
}
|
|
14066
|
+
/** The token the cache already holds for this region, if any. */
|
|
14067
|
+
function catalogAccessToken(region) {
|
|
14068
|
+
return catalogActiveRegions.get(region);
|
|
14069
|
+
}
|
|
13979
14070
|
/** Shape check for a persisted snapshot.
|
|
13980
14071
|
*
|
|
13981
14072
|
* Entries are already in the parsed catalog shape, so they are accepted as
|
|
@@ -14318,10 +14409,18 @@ async function fetchAccountQuota$3(store, options = {}) {
|
|
|
14318
14409
|
} catch (error) {
|
|
14319
14410
|
throw error;
|
|
14320
14411
|
}
|
|
14321
|
-
const
|
|
14412
|
+
const requestUsage = async (credentials) => fetchFn(openAIUrl(USAGES_PATH, credentials.region), {
|
|
14322
14413
|
headers: await kimiCodeHeaders(credentials.accessToken, "openai"),
|
|
14323
14414
|
signal: timeoutSignal$2(options.signal, DISCOVERY_TIMEOUT_MS$2)
|
|
14324
14415
|
});
|
|
14416
|
+
let response = await requestUsage(credentials);
|
|
14417
|
+
if (response.status === 401) {
|
|
14418
|
+
const renewed = await forceRenew(store, credentials, options, fetchFn);
|
|
14419
|
+
if (renewed !== void 0) {
|
|
14420
|
+
credentials = renewed;
|
|
14421
|
+
response = await requestUsage(credentials);
|
|
14422
|
+
}
|
|
14423
|
+
}
|
|
14325
14424
|
if (response.status === 401) throw new KimiCodeUnauthorizedError("Kimi Code rejected the stored credential (401). Sign in again from Settings > Kimi Code.");
|
|
14326
14425
|
if (response.status === 404) throw new Error("The Kimi Code usage endpoint is unavailable for this account. Confirm the subscription is active.");
|
|
14327
14426
|
if (!response.ok) throw new Error(`Kimi Code usage request failed (${response.status}).`);
|
|
@@ -14329,7 +14428,7 @@ async function fetchAccountQuota$3(store, options = {}) {
|
|
|
14329
14428
|
const profile = await fetchProfile(store, {
|
|
14330
14429
|
fetchFn,
|
|
14331
14430
|
signal: options.signal,
|
|
14332
|
-
...options.credentials === void 0 ? {} : { credentials
|
|
14431
|
+
...options.credentials === void 0 ? {} : { credentials }
|
|
14333
14432
|
});
|
|
14334
14433
|
const account = accountFromCredentials$1(credentials, payload, profile ?? void 0);
|
|
14335
14434
|
const learned = {};
|
|
@@ -14352,6 +14451,34 @@ async function fetchAccountQuota$3(store, options = {}) {
|
|
|
14352
14451
|
return snapshot;
|
|
14353
14452
|
}
|
|
14354
14453
|
/**
|
|
14454
|
+
* Renew an access token once after the usage endpoint refused it.
|
|
14455
|
+
*
|
|
14456
|
+
* A pool supplies {@link QuotaFetchOptions.renewFn}, because only the pool can
|
|
14457
|
+
* persist the rotated refresh token. Without one the single-credential store
|
|
14458
|
+
* renews itself — but only when it still holds the very token that was refused:
|
|
14459
|
+
* a store already carrying a different pair was rotated by someone else, and
|
|
14460
|
+
* refreshing it again would spend a token the upstream has not rejected.
|
|
14461
|
+
*/
|
|
14462
|
+
async function forceRenew(store, refused, options, fetchFn) {
|
|
14463
|
+
if (options.renewFn !== void 0) try {
|
|
14464
|
+
return await options.renewFn(refused);
|
|
14465
|
+
} catch {
|
|
14466
|
+
return;
|
|
14467
|
+
}
|
|
14468
|
+
if (options.credentials !== void 0) return void 0;
|
|
14469
|
+
const stored = await store.read().catch(() => null);
|
|
14470
|
+
if (stored === null || stored.refreshToken !== refused.refreshToken) return void 0;
|
|
14471
|
+
try {
|
|
14472
|
+
return await ensureAccessToken$1(store, {
|
|
14473
|
+
fetchFn,
|
|
14474
|
+
signal: options.signal,
|
|
14475
|
+
force: true
|
|
14476
|
+
});
|
|
14477
|
+
} catch {
|
|
14478
|
+
return;
|
|
14479
|
+
}
|
|
14480
|
+
}
|
|
14481
|
+
/**
|
|
14355
14482
|
* Build the account view for one credential.
|
|
14356
14483
|
*
|
|
14357
14484
|
* There is no account-profile endpoint on the coding API: the signed-in
|
|
@@ -16414,9 +16541,11 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
16414
16541
|
* shipped fallback otherwise, narrowed by the user's enabled selection.
|
|
16415
16542
|
*/
|
|
16416
16543
|
async catalog() {
|
|
16544
|
+
const pool = this.accountPool;
|
|
16417
16545
|
const live = await (this.options.loadCatalog ?? (() => loadProviderModels$1({
|
|
16418
16546
|
fetchFn: this.options.fetchFn,
|
|
16419
|
-
store: this.store
|
|
16547
|
+
store: this.store,
|
|
16548
|
+
...pool === null ? {} : { credentialProvider: (_region) => pool.getFreshCredential(void 0, this.options.fetchFn ?? fetch).then((c) => c.accessToken) }
|
|
16420
16549
|
})))().catch(() => []);
|
|
16421
16550
|
if (live.length > 0) return live;
|
|
16422
16551
|
return FALLBACK_MODELS$2.map((model) => ({
|
|
@@ -16841,7 +16970,8 @@ async function getKimiCodeWebStatus(store, modelSettings, preferences, options =
|
|
|
16841
16970
|
const poolData = accountPool === void 0 ? null : await accountPool.read().catch(() => null);
|
|
16842
16971
|
const accounts = accountPool === void 0 ? [] : await accountPool.listAccounts().catch(() => []);
|
|
16843
16972
|
const activeAccount = accounts.find((entry) => entry.id === poolData?.activeAccountId) ?? accounts.find((entry) => entry.isPrimary) ?? accounts[0];
|
|
16844
|
-
const
|
|
16973
|
+
const activePoolAccount = poolData === null ? void 0 : poolData.accounts.find((entry) => entry.id === poolData.activeAccountId) ?? poolData.accounts.find((entry) => entry.isPrimary) ?? poolData.accounts[0];
|
|
16974
|
+
const active = (accountPool === void 0 || activePoolAccount === void 0 ? void 0 : await accountPool.getFreshCredential(activePoolAccount.id, options.fetchFn ?? fetch).catch(() => void 0)) ?? activePoolAccount?.credentials ?? credentials;
|
|
16845
16975
|
const region = active?.region ?? await resolveRegion();
|
|
16846
16976
|
const live = await loadProviderModels$1({
|
|
16847
16977
|
fetchFn: options.fetchFn,
|
|
@@ -16910,6 +17040,33 @@ function registerKimiCodeRoutes(ctx, store, modelSettings, preferences, options
|
|
|
16910
17040
|
credentials: target?.credentials
|
|
16911
17041
|
};
|
|
16912
17042
|
};
|
|
17043
|
+
/** Renewal seam for the quota fetch, bound to one pool account. */
|
|
17044
|
+
const renewFor = (accountId) => {
|
|
17045
|
+
const pool = accountPool;
|
|
17046
|
+
if (pool === void 0 || accountId === void 0) return void 0;
|
|
17047
|
+
return (_credentials) => pool.renewCredential(accountId, fetchFn);
|
|
17048
|
+
};
|
|
17049
|
+
/**
|
|
17050
|
+
* The credential the active account should be used with right now.
|
|
17051
|
+
*
|
|
17052
|
+
* Every card path goes through the pool here. A pool owns both the rotation
|
|
17053
|
+
* and the write-back, so handing out {@link activeAccount}'s stored value
|
|
17054
|
+
* meant the card kept presenting an access token that expired fifteen minutes
|
|
17055
|
+
* after the last model request, and read the 401 it earned as a credential the
|
|
17056
|
+
* user had to replace by signing in again.
|
|
17057
|
+
*
|
|
17058
|
+
* Without a pool there is no rotation to consult: the single-credential store
|
|
17059
|
+
* renews itself while the quota is fetched.
|
|
17060
|
+
*/
|
|
17061
|
+
const effectiveCredentials = async (target) => {
|
|
17062
|
+
if (accountPool === void 0) return target.credentials;
|
|
17063
|
+
if (target.id === void 0) return target.credentials;
|
|
17064
|
+
try {
|
|
17065
|
+
return await accountPool.getFreshCredential(target.id, fetchFn);
|
|
17066
|
+
} catch {
|
|
17067
|
+
return target.credentials;
|
|
17068
|
+
}
|
|
17069
|
+
};
|
|
16913
17070
|
const quotaRefresh = new QuotaRefresh();
|
|
16914
17071
|
return ctx.webServer.register({
|
|
16915
17072
|
kind: "prefix",
|
|
@@ -16923,13 +17080,17 @@ function registerKimiCodeRoutes(ctx, store, modelSettings, preferences, options
|
|
|
16923
17080
|
const poolActive = await activeAccount();
|
|
16924
17081
|
const cached = getCachedQuotaFor(poolActive.id ?? null);
|
|
16925
17082
|
if (poolActive.credentials !== void 0 && (cached === null || Date.now() - (cached.fetchedAt || 0) > 12e4)) {
|
|
16926
|
-
const refresh = () =>
|
|
16927
|
-
|
|
16928
|
-
|
|
16929
|
-
|
|
16930
|
-
|
|
16931
|
-
|
|
16932
|
-
|
|
17083
|
+
const refresh = async () => {
|
|
17084
|
+
const credentials = await effectiveCredentials(poolActive);
|
|
17085
|
+
return fetchAccountQuota$3(store, {
|
|
17086
|
+
fetchFn,
|
|
17087
|
+
...accountPool === void 0 ? {} : {
|
|
17088
|
+
credentials,
|
|
17089
|
+
accountId: poolActive.id,
|
|
17090
|
+
renewFn: renewFor(poolActive.id)
|
|
17091
|
+
}
|
|
17092
|
+
});
|
|
17093
|
+
};
|
|
16933
17094
|
if (cached === null) await quotaRefresh.run(refresh);
|
|
16934
17095
|
else quotaRefresh.start(refresh);
|
|
16935
17096
|
}
|
|
@@ -16992,8 +17153,9 @@ function registerKimiCodeRoutes(ctx, store, modelSettings, preferences, options
|
|
|
16992
17153
|
const { account, latencyMs } = await testConnection(store, {
|
|
16993
17154
|
fetchFn,
|
|
16994
17155
|
...accountPool === void 0 ? {} : {
|
|
16995
|
-
credentials: poolActive
|
|
16996
|
-
accountId: poolActive.id
|
|
17156
|
+
credentials: await effectiveCredentials(poolActive),
|
|
17157
|
+
accountId: poolActive.id,
|
|
17158
|
+
renewFn: renewFor(poolActive.id)
|
|
16997
17159
|
}
|
|
16998
17160
|
});
|
|
16999
17161
|
return sendJson$2(response, 200, {
|
|
@@ -17021,8 +17183,9 @@ function registerKimiCodeRoutes(ctx, store, modelSettings, preferences, options
|
|
|
17021
17183
|
fetchFn,
|
|
17022
17184
|
force: true,
|
|
17023
17185
|
...accountPool === void 0 ? {} : {
|
|
17024
|
-
credentials: quotaActive
|
|
17025
|
-
accountId: quotaActive.id
|
|
17186
|
+
credentials: await effectiveCredentials(quotaActive),
|
|
17187
|
+
accountId: quotaActive.id,
|
|
17188
|
+
renewFn: renewFor(quotaActive.id)
|
|
17026
17189
|
}
|
|
17027
17190
|
}) === null) return sendJson$2(response, 502, {
|
|
17028
17191
|
ok: false,
|
|
@@ -17086,7 +17249,7 @@ function registerKimiCodeRoutes(ctx, store, modelSettings, preferences, options
|
|
|
17086
17249
|
fetchFn,
|
|
17087
17250
|
store,
|
|
17088
17251
|
region: catalogActive.credentials.region,
|
|
17089
|
-
accessToken: catalogActive
|
|
17252
|
+
accessToken: (await effectiveCredentials(catalogActive))?.accessToken,
|
|
17090
17253
|
force: true
|
|
17091
17254
|
}).catch(() => void 0);
|
|
17092
17255
|
return sendJson$2(response, 200, {
|
|
@@ -21791,20 +21954,38 @@ const INTERLEAVED_THINKING_BETA = "interleaved-thinking-2025-05-14";
|
|
|
21791
21954
|
/** Anthropic protocol revision sent as `anthropic-version`. */
|
|
21792
21955
|
const ANTHROPIC_VERSION = "2023-06-01";
|
|
21793
21956
|
/**
|
|
21794
|
-
*
|
|
21795
|
-
*
|
|
21796
|
-
* Upstream enforces a *minimum reported client version* on the
|
|
21797
|
-
* path:
|
|
21798
|
-
*
|
|
21799
|
-
*
|
|
21800
|
-
*
|
|
21801
|
-
*
|
|
21802
|
-
*
|
|
21803
|
-
*
|
|
21804
|
-
*
|
|
21805
|
-
*
|
|
21806
|
-
|
|
21807
|
-
|
|
21957
|
+
* Client version this route CLAIMS to be on the subscription gateway.
|
|
21958
|
+
*
|
|
21959
|
+
* Upstream enforces a *minimum reported client version* per model on the
|
|
21960
|
+
* subscription path: the version travels in the `user-agent` header (built by
|
|
21961
|
+
* `claudeUserAgent` in client.ts) and a claim below the floor is refused with
|
|
21962
|
+
* HTTP 400 and an error body whose code is `claude_code_version_too_old`. That
|
|
21963
|
+
* is a hard stop for the whole request rather than a per-request failure, and the
|
|
21964
|
+
* number in the refusal is OUR OWN claim echoed back — so the user is told their
|
|
21965
|
+
* client is too old without being told which model demanded more, which is
|
|
21966
|
+
* exactly how it misleads people into signing in again.
|
|
21967
|
+
*
|
|
21968
|
+
* THE INVARIANT THIS CONSTANT CARRIES. It must be at or above the highest
|
|
21969
|
+
* `minCliVersion` that any shipped model in `model-catalog.ts` declares. A
|
|
21970
|
+
* default below a shipped model's floor is a model this package advertises in
|
|
21971
|
+
* its own picker and then cannot call at all, which is the bug this comment now
|
|
21972
|
+
* records: `2.1.251` shipped while `claude-opus-5-5` — also shipped, and the
|
|
21973
|
+
* row the default picker leads with — requires `2.1.280`. The matching
|
|
21974
|
+
* regression lock lives in `test/claude-model-catalog.test.ts` and fails
|
|
21975
|
+
* loudly, naming both versions, when a future model's floor is added without
|
|
21976
|
+
* raising this value.
|
|
21977
|
+
*
|
|
21978
|
+
* The value is a REAL published `@anthropic-ai/claude-code` release, not a
|
|
21979
|
+
* number chosen merely to clear a floor: claiming a version that does not exist
|
|
21980
|
+
* trades a clear refusal for an unpredictable one. Note that npm's `stable`
|
|
21981
|
+
* dist-tag can itself sit below a model's floor, so `latest` is the tag to read.
|
|
21982
|
+
*
|
|
21983
|
+
* It is still not a literal that only moves when this package is republished: a
|
|
21984
|
+
* user whose installed baseline has aged past the server's floor has to be able
|
|
21985
|
+
* to raise it without waiting for a release. Read the effective value with
|
|
21986
|
+
* {@link claudeCliVersion}, pin one with {@link setClaudeCliVersion}.
|
|
21987
|
+
*/
|
|
21988
|
+
const CLAUDE_CLI_VERSION = "2.1.283";
|
|
21808
21989
|
/**
|
|
21809
21990
|
* Loopback callback port the subscription flow defaults to.
|
|
21810
21991
|
*
|
|
@@ -21906,6 +22087,67 @@ function setClaudeCliVersion(value) {
|
|
|
21906
22087
|
cliVersionOverride = normalized === "" ? null : normalized;
|
|
21907
22088
|
}
|
|
21908
22089
|
/**
|
|
22090
|
+
* Compare two dotted numeric versions, e.g. `'2.1.283'` against `'2.1.280'`.
|
|
22091
|
+
*
|
|
22092
|
+
* This exists so a version FLOOR can be checked before a request is sent. The
|
|
22093
|
+
* comparison is deliberately small and TOTAL rather than a SemVer parser: the
|
|
22094
|
+
* only strings it ever sees are this line's own reported version (a pin, the
|
|
22095
|
+
* `DSH_CLAUDE_CLI_VERSION` override, or the shipped default) and the floors
|
|
22096
|
+
* recorded in the model catalog, and it must not throw on any of them — a
|
|
22097
|
+
* comparison that can throw would turn a misconfigured version into a crash
|
|
22098
|
+
* instead of the precise pre-flight refusal it was added to produce.
|
|
22099
|
+
*
|
|
22100
|
+
* Total means: a missing segment compares as 0 (`'2.1'` equals `'2.1.0'`), and a
|
|
22101
|
+
* segment that is not a run of decimal digits compares as 0 rather than as NaN
|
|
22102
|
+
* (`'abc'` equals `'0.0.0'`, and so does `''`). Leading zeros are exact rather
|
|
22103
|
+
* than octal, and an optional leading `v` is tolerated because that is how a
|
|
22104
|
+
* release is often written down.
|
|
22105
|
+
*
|
|
22106
|
+
* @returns a negative number, 0, or a positive number — the sign is the whole
|
|
22107
|
+
* contract, so callers compare against 0 rather than against ±1.
|
|
22108
|
+
*/
|
|
22109
|
+
function compareDottedVersions(left, right) {
|
|
22110
|
+
const a = versionSegments(left);
|
|
22111
|
+
const b = versionSegments(right);
|
|
22112
|
+
const length = Math.max(a.length, b.length);
|
|
22113
|
+
for (let index = 0; index < length; index += 1) {
|
|
22114
|
+
const difference = (a[index] ?? 0) - (b[index] ?? 0);
|
|
22115
|
+
if (difference !== 0) return difference;
|
|
22116
|
+
}
|
|
22117
|
+
return 0;
|
|
22118
|
+
}
|
|
22119
|
+
/**
|
|
22120
|
+
* Whether one reported version clears a floor.
|
|
22121
|
+
*
|
|
22122
|
+
* An absent floor (`undefined`) means "no known floor" rather than "no floor",
|
|
22123
|
+
* so it never blocks a request: refusing a model because nobody recorded a
|
|
22124
|
+
* number would be this line inventing a restriction upstream never stated.
|
|
22125
|
+
* A MALFORMED version on either side, on the other hand, is refused — that is
|
|
22126
|
+
* the conservative direction, since the check exists to stop an unknown claim
|
|
22127
|
+
* from reaching a server that has already refused one.
|
|
22128
|
+
*/
|
|
22129
|
+
function meetsDottedVersionFloor(version, floor) {
|
|
22130
|
+
if (floor === void 0 || floor.trim() === "") return true;
|
|
22131
|
+
if (!isDottedVersion(version)) return false;
|
|
22132
|
+
return compareDottedVersions(version, floor) >= 0;
|
|
22133
|
+
}
|
|
22134
|
+
/** Whether a string is a run of dot-separated decimal segments (an optional leading `v`). */
|
|
22135
|
+
function isDottedVersion(value) {
|
|
22136
|
+
const trimmed = value.trim().replace(/^v/i, "");
|
|
22137
|
+
return /^\d+(\.\d+)*$/.test(trimmed);
|
|
22138
|
+
}
|
|
22139
|
+
/** Numeric segments of a dotted version; a non-numeric or absent segment is 0. */
|
|
22140
|
+
function versionSegments(value) {
|
|
22141
|
+
const trimmed = value.trim().replace(/^v/i, "");
|
|
22142
|
+
if (trimmed === "") return [0];
|
|
22143
|
+
return trimmed.split(".").map((segment) => {
|
|
22144
|
+
const digits = /^\d+$/.test(segment.trim()) ? segment.trim() : "";
|
|
22145
|
+
if (digits === "") return 0;
|
|
22146
|
+
const parsed = Number.parseInt(digits, 10);
|
|
22147
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
22148
|
+
});
|
|
22149
|
+
}
|
|
22150
|
+
/**
|
|
21909
22151
|
* Resolve the browser authorization endpoint.
|
|
21910
22152
|
*
|
|
21911
22153
|
* The subscription flow has answered on more than one host, while its Console
|
|
@@ -22144,6 +22386,14 @@ function loopbackRedirectUri(port = DEFAULT_CALLBACK_PORT) {
|
|
|
22144
22386
|
*
|
|
22145
22387
|
* A future reader who notices the shared `supportsTemperature: false` and
|
|
22146
22388
|
* "fixes" item 2 to 'mid-convo' has reintroduced exactly that bug.
|
|
22389
|
+
*
|
|
22390
|
+
* One more field on that row comes from neither source: its `minCliVersion`
|
|
22391
|
+
* floor is the number upstream itself states when it refuses the model
|
|
22392
|
+
* (`claude_code_version_too_old`, "version 2.1.280 or newer is required"). That
|
|
22393
|
+
* is a stronger witness than a documentation page — the server said it — and it
|
|
22394
|
+
* is recorded here so a claim below it is refused locally, before the request is
|
|
22395
|
+
* sent, instead of as an upstream 400 that names neither the model nor the number
|
|
22396
|
+
* the user has to reach.
|
|
22147
22397
|
*/
|
|
22148
22398
|
/**
|
|
22149
22399
|
* Fifteen rows: the snapshot's own 14, in the snapshot's own declaration order,
|
|
@@ -22414,7 +22664,8 @@ const CLAUDE_MODELS = Object.freeze([
|
|
|
22414
22664
|
"xhigh",
|
|
22415
22665
|
"max"
|
|
22416
22666
|
],
|
|
22417
|
-
canDisableThinking: false
|
|
22667
|
+
canDisableThinking: false,
|
|
22668
|
+
minCliVersion: "2.1.280"
|
|
22418
22669
|
}
|
|
22419
22670
|
]);
|
|
22420
22671
|
/** Every id the fallback table knows, in declaration order. */
|
|
@@ -22518,6 +22769,24 @@ function claudeModelSupportsTemperature(modelId, catalog) {
|
|
|
22518
22769
|
function claudeModelCanDisableThinking(modelId, catalog) {
|
|
22519
22770
|
return resolveClaudeModel(modelId, catalog ?? CLAUDE_MODELS).canDisableThinking;
|
|
22520
22771
|
}
|
|
22772
|
+
/**
|
|
22773
|
+
* Lowest reported client version upstream serves one model to, when known.
|
|
22774
|
+
*
|
|
22775
|
+
* `undefined` means "no known floor" — NOT "no floor" — so a caller must treat it
|
|
22776
|
+
* as "nothing to check" rather than as "any version is fine". The distinction
|
|
22777
|
+
* matters because the caller is a pre-flight refusal: an absent floor must let
|
|
22778
|
+
* the request through (refusing it would invent a restriction nobody recorded),
|
|
22779
|
+
* while a present floor must block a claim below it.
|
|
22780
|
+
*
|
|
22781
|
+
* Unlike the other per-model lookups this one does NOT resolve through the
|
|
22782
|
+
* conservative stub for an unknown id. The stub describes capabilities this line
|
|
22783
|
+
* assumes; a version floor is a fact about the server that this line either has
|
|
22784
|
+
* or has not observed, and manufacturing one for an unknown id would refuse a
|
|
22785
|
+
* model nobody has evidence against.
|
|
22786
|
+
*/
|
|
22787
|
+
function claudeMinCliVersionFor(modelId, catalog) {
|
|
22788
|
+
return (catalog ?? CLAUDE_MODELS).find((model) => model.id === modelId)?.minCliVersion;
|
|
22789
|
+
}
|
|
22521
22790
|
//#endregion
|
|
22522
22791
|
//#region src/host/claude/token-store.ts
|
|
22523
22792
|
/**
|
|
@@ -26641,7 +26910,11 @@ function cancelLogin() {
|
|
|
26641
26910
|
* A reported-client-version rejection is a REQUEST problem even though it
|
|
26642
26911
|
* arrives as a 400 that mentions the client: it must NOT sign the user out, and
|
|
26643
26912
|
* it has a real remedy (raise the reported version), so it is handled
|
|
26644
|
-
* explicitly with that remedy in the message.
|
|
26913
|
+
* explicitly with that remedy in the message. Where the catalog records a
|
|
26914
|
+
* model's floor, the same verdict is produced LOCALLY before the request is sent
|
|
26915
|
+
* ({@link assertClaudeCliVersionMeetsFloor}), so the ordinary case never spends
|
|
26916
|
+
* a request to be told the same thing less precisely; the upstream branch above
|
|
26917
|
+
* stays for a claim that is too low for a floor this table has not learned yet.
|
|
26645
26918
|
*
|
|
26646
26919
|
* ---------------------------------------------------------------------------
|
|
26647
26920
|
* 5. ASSUMPTIONS AND JUDGEMENT CALLS
|
|
@@ -26728,6 +27001,46 @@ const MAX_COOLDOWN_MS = 300 * 60 * 1e3;
|
|
|
26728
27001
|
/** What the user is told when this line has no credential to call with. */
|
|
26729
27002
|
const MISSING_CREDENTIAL_MESSAGE = "Not signed in to Claude(订阅). Sign in from Settings > Claude.";
|
|
26730
27003
|
/**
|
|
27004
|
+
* Refuse one model locally, before the request is sent, when the version this
|
|
27005
|
+
* route reports is below the floor that model declares.
|
|
27006
|
+
*
|
|
27007
|
+
* WHY THIS EXISTS. Upstream validates the reported client version — the
|
|
27008
|
+
* `user-agent` built by client.ts's `claudeUserAgent` — against a per-model
|
|
27009
|
+
* minimum and answers a claim below it with an HTTP 400 whose code is
|
|
27010
|
+
* `claude_code_version_too_old`. That refusal is correct but nearly unusable as
|
|
27011
|
+
* a diagnosis: the version in its text is OUR OWN claim echoed back, the model
|
|
27012
|
+
* is only identifiable from the request that was just consumed, and the number
|
|
27013
|
+
* the user has to reach is buried in prose. The predictable consequence was the
|
|
27014
|
+
* reported bug — a user reading "your client is too old" about a model this
|
|
27015
|
+
* package advertises, whose remedy the text never names, and whose wording reads
|
|
27016
|
+
* like a credential problem often enough that people sign in again for nothing.
|
|
27017
|
+
*
|
|
27018
|
+
* The catalog now records the floor per model (`minCliVersion`), so the same
|
|
27019
|
+
* verdict can be produced HERE, at zero cost, naming the model, the version in
|
|
27020
|
+
* force, the version required, and the remedy. The upstream refusal is left in
|
|
27021
|
+
* place exactly as it was — this is an addition to the path, not a replacement,
|
|
27022
|
+
* because a claim that clears every floor this table knows can still be too low
|
|
27023
|
+
* for something the table has not learned yet, and `toLlmError` still handles
|
|
27024
|
+
* that case with the same remedy.
|
|
27025
|
+
*
|
|
27026
|
+
* WHAT IT MUST NOT DO. It must not disable a model for anyone who never picks it:
|
|
27027
|
+
* the check runs on the REQUEST path, against the model actually being called, so
|
|
27028
|
+
* a floor for one row cannot remove another row from the picker. It must not be a
|
|
27029
|
+
* credential error either — nothing is wrong with the stored sign-in, and the
|
|
27030
|
+
* message says so outright, because signing in again is the wrong move and the
|
|
27031
|
+
* upstream text invites it.
|
|
27032
|
+
*
|
|
27033
|
+
* Called with the model the request is about to name, and with the catalog that
|
|
27034
|
+
* request resolved against, so a floor added for a live-only id is honoured too.
|
|
27035
|
+
*/
|
|
27036
|
+
function assertClaudeCliVersionMeetsFloor(modelId, catalog = FALLBACK_MODELS) {
|
|
27037
|
+
const floor = claudeMinCliVersionFor(modelId, catalog);
|
|
27038
|
+
if (floor === void 0) return;
|
|
27039
|
+
const effective = claudeCliVersion();
|
|
27040
|
+
if (meetsDottedVersionFloor(effective, floor)) return;
|
|
27041
|
+
throw new LlmError("Claude(订阅) will not serve " + modelId + " to a client reporting version " + effective + ": upstream requires " + floor + " or newer for this model, and a lower claim is refused with claude_code_version_too_old. This was caught locally, before the request was sent. Raise the reported version with the DSH_CLAUDE_CLI_VERSION environment variable, or with a setClaudeCliVersion pin, then retry. The stored sign-in is still valid — this is not a credential problem and signing in again will not change it.", "PROVIDER_ERROR");
|
|
27042
|
+
}
|
|
27043
|
+
/**
|
|
26731
27044
|
* The immutable id of the account a token came from, presented as the two-method
|
|
26732
27045
|
* store oauth.ts wants. See module note 3.
|
|
26733
27046
|
*/
|
|
@@ -26812,6 +27125,23 @@ var ClaudeAdapter = class extends LlmAdapter {
|
|
|
26812
27125
|
const live = await (this.options.loadCatalog ?? ((current) => loadCatalog(current, { fetchFn: this.options.fetchFn })))(credentials).catch(() => []);
|
|
26813
27126
|
return live.length > 0 ? live : FALLBACK_MODELS;
|
|
26814
27127
|
}
|
|
27128
|
+
/**
|
|
27129
|
+
* The catalog a REQUEST should be validated against.
|
|
27130
|
+
*
|
|
27131
|
+
* The same two branches {@link resolveModel} takes, in the same order, because
|
|
27132
|
+
* the live listing is authoritative for which ids exist and a floor recorded
|
|
27133
|
+
* for a live-only id would otherwise be skipped. An absent credential is not an
|
|
27134
|
+
* error here: with no account there is nothing to list and the shipped table is
|
|
27135
|
+
* the only answer available, which is exactly what the preview path already
|
|
27136
|
+
* assumes. A credential that cannot be read degrades to the shipped table for
|
|
27137
|
+
* the same reason — the floor check must not be the thing that turns a listing
|
|
27138
|
+
* failure into a failed request.
|
|
27139
|
+
*/
|
|
27140
|
+
async catalogForRequest() {
|
|
27141
|
+
const record = await this.primaryAccount(await this.settings()).catch(() => null);
|
|
27142
|
+
if (record === null) return FALLBACK_MODELS;
|
|
27143
|
+
return this.catalog(record.credentials);
|
|
27144
|
+
}
|
|
26815
27145
|
async listModels(provider) {
|
|
26816
27146
|
const prov = provider || "claude-subscription";
|
|
26817
27147
|
const settings = await this.settings();
|
|
@@ -26933,6 +27263,7 @@ var ClaudeAdapter = class extends LlmAdapter {
|
|
|
26933
27263
|
const requestOptions = offloadOldestRequestImages(normalizeGenerateOptions(options));
|
|
26934
27264
|
const images = await resolveRequestImages(requestOptions, this.options.attachments, signal);
|
|
26935
27265
|
const toolNames = claudeToolNames(requestOptions.tools);
|
|
27266
|
+
assertClaudeCliVersionMeetsFloor(requestOptions.model, await this.catalogForRequest());
|
|
26936
27267
|
const effort = requestOptions.reasoningEffort === void 0 || requestOptions.reasoningEffort === null ? void 0 : String(requestOptions.reasoningEffort);
|
|
26937
27268
|
const thinking = claudeRequestThinks(requestOptions.model, effort);
|
|
26938
27269
|
const pool = this.accountPool;
|
|
@@ -81,7 +81,11 @@
|
|
|
81
81
|
* A reported-client-version rejection is a REQUEST problem even though it
|
|
82
82
|
* arrives as a 400 that mentions the client: it must NOT sign the user out, and
|
|
83
83
|
* it has a real remedy (raise the reported version), so it is handled
|
|
84
|
-
* explicitly with that remedy in the message.
|
|
84
|
+
* explicitly with that remedy in the message. Where the catalog records a
|
|
85
|
+
* model's floor, the same verdict is produced LOCALLY before the request is sent
|
|
86
|
+
* ({@link assertClaudeCliVersionMeetsFloor}), so the ordinary case never spends
|
|
87
|
+
* a request to be told the same thing less precisely; the upstream branch above
|
|
88
|
+
* stays for a claim that is too low for a floor this table has not learned yet.
|
|
85
89
|
*
|
|
86
90
|
* ---------------------------------------------------------------------------
|
|
87
91
|
* 5. ASSUMPTIONS AND JUDGEMENT CALLS
|
|
@@ -125,6 +129,40 @@ import { type AttachmentImageReader } from './mapper.ts';
|
|
|
125
129
|
* message, and this is only the fallback for a response that states neither.
|
|
126
130
|
*/
|
|
127
131
|
export declare const POOL_COOLDOWN_MS: number;
|
|
132
|
+
/**
|
|
133
|
+
* Refuse one model locally, before the request is sent, when the version this
|
|
134
|
+
* route reports is below the floor that model declares.
|
|
135
|
+
*
|
|
136
|
+
* WHY THIS EXISTS. Upstream validates the reported client version — the
|
|
137
|
+
* `user-agent` built by client.ts's `claudeUserAgent` — against a per-model
|
|
138
|
+
* minimum and answers a claim below it with an HTTP 400 whose code is
|
|
139
|
+
* `claude_code_version_too_old`. That refusal is correct but nearly unusable as
|
|
140
|
+
* a diagnosis: the version in its text is OUR OWN claim echoed back, the model
|
|
141
|
+
* is only identifiable from the request that was just consumed, and the number
|
|
142
|
+
* the user has to reach is buried in prose. The predictable consequence was the
|
|
143
|
+
* reported bug — a user reading "your client is too old" about a model this
|
|
144
|
+
* package advertises, whose remedy the text never names, and whose wording reads
|
|
145
|
+
* like a credential problem often enough that people sign in again for nothing.
|
|
146
|
+
*
|
|
147
|
+
* The catalog now records the floor per model (`minCliVersion`), so the same
|
|
148
|
+
* verdict can be produced HERE, at zero cost, naming the model, the version in
|
|
149
|
+
* force, the version required, and the remedy. The upstream refusal is left in
|
|
150
|
+
* place exactly as it was — this is an addition to the path, not a replacement,
|
|
151
|
+
* because a claim that clears every floor this table knows can still be too low
|
|
152
|
+
* for something the table has not learned yet, and `toLlmError` still handles
|
|
153
|
+
* that case with the same remedy.
|
|
154
|
+
*
|
|
155
|
+
* WHAT IT MUST NOT DO. It must not disable a model for anyone who never picks it:
|
|
156
|
+
* the check runs on the REQUEST path, against the model actually being called, so
|
|
157
|
+
* a floor for one row cannot remove another row from the picker. It must not be a
|
|
158
|
+
* credential error either — nothing is wrong with the stored sign-in, and the
|
|
159
|
+
* message says so outright, because signing in again is the wrong move and the
|
|
160
|
+
* upstream text invites it.
|
|
161
|
+
*
|
|
162
|
+
* Called with the model the request is about to name, and with the catalog that
|
|
163
|
+
* request resolved against, so a floor added for a live-only id is honoured too.
|
|
164
|
+
*/
|
|
165
|
+
export declare function assertClaudeCliVersionMeetsFloor(modelId: string, catalog?: readonly ClaudeModelEntry[]): void;
|
|
128
166
|
/**
|
|
129
167
|
* The pool surface this adapter uses, stated structurally.
|
|
130
168
|
*
|
|
@@ -196,6 +234,19 @@ export declare class ClaudeAdapter extends LlmAdapter {
|
|
|
196
234
|
* caller-supplied seam that does neither.
|
|
197
235
|
*/
|
|
198
236
|
private catalog;
|
|
237
|
+
/**
|
|
238
|
+
* The catalog a REQUEST should be validated against.
|
|
239
|
+
*
|
|
240
|
+
* The same two branches {@link resolveModel} takes, in the same order, because
|
|
241
|
+
* the live listing is authoritative for which ids exist and a floor recorded
|
|
242
|
+
* for a live-only id would otherwise be skipped. An absent credential is not an
|
|
243
|
+
* error here: with no account there is nothing to list and the shipped table is
|
|
244
|
+
* the only answer available, which is exactly what the preview path already
|
|
245
|
+
* assumes. A credential that cannot be read degrades to the shipped table for
|
|
246
|
+
* the same reason — the floor check must not be the thing that turns a listing
|
|
247
|
+
* failure into a failed request.
|
|
248
|
+
*/
|
|
249
|
+
private catalogForRequest;
|
|
199
250
|
listModels(provider?: string): Promise<readonly LlmModelInfo[]>;
|
|
200
251
|
resolveModel(provider: string, modelId: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
|
|
201
252
|
prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/adapter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoHG;AAEH,OAAO,EACL,UAAU,EACV,QAAQ,EACR,iBAAiB,EAEjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAKL,WAAW,EACX,aAAa,EAKd,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EAEtB,KAAK,iBAAiB,EAEtB,KAAK,qBAAqB,EAC3B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EASL,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,aAAa,CAAA;AACpB,OAAO,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AmB,CAAC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,GAAG,OAAO,CAI3F;AAiBD,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,GAAE,MAAmB,GAAG,MAAM,CAUtF;AAED,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAO7D;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,CA8D3D;AAED,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -219,6 +219,14 @@
|
|
|
219
219
|
*
|
|
220
220
|
* A future reader who notices the shared `supportsTemperature: false` and
|
|
221
221
|
* "fixes" item 2 to 'mid-convo' has reintroduced exactly that bug.
|
|
222
|
+
*
|
|
223
|
+
* One more field on that row comes from neither source: its `minCliVersion`
|
|
224
|
+
* floor is the number upstream itself states when it refuses the model
|
|
225
|
+
* (`claude_code_version_too_old`, "version 2.1.280 or newer is required"). That
|
|
226
|
+
* is a stronger witness than a documentation page — the server said it — and it
|
|
227
|
+
* is recorded here so a claim below it is refused locally, before the request is
|
|
228
|
+
* sent, instead of as an upstream 400 that names neither the model nor the number
|
|
229
|
+
* the user has to reach.
|
|
222
230
|
*/
|
|
223
231
|
/** One model's shipped capability entry. */
|
|
224
232
|
export interface ClaudeModelEntry {
|
|
@@ -265,6 +273,25 @@ export interface ClaudeModelEntry {
|
|
|
265
273
|
* at all): sending `{ type: 'disabled' }` is not a supported request.
|
|
266
274
|
*/
|
|
267
275
|
canDisableThinking: boolean;
|
|
276
|
+
/**
|
|
277
|
+
* Lowest reported client version upstream serves this model to, when known.
|
|
278
|
+
*
|
|
279
|
+
* ABSENT MEANS "NO KNOWN FLOOR", WHICH IS NOT THE SAME AS "NO FLOOR". Upstream
|
|
280
|
+
* enforces a minimum reported client version per model and answers a claim
|
|
281
|
+
* below it with HTTP 400 / `claude_code_version_too_old`
|
|
282
|
+
* ({@link ERROR_CODE_CLIENT_VERSION_TOO_OLD} in types.ts, whose doc comment
|
|
283
|
+
* states the invariant that ties this field to `CLAUDE_CLI_VERSION`). Most
|
|
284
|
+
* rows here predate any reason to record a number, and a floor that is guessed
|
|
285
|
+
* is worse than one that is absent in both directions: too low and the request
|
|
286
|
+
* still reaches the server and is refused there, too high and this line
|
|
287
|
+
* refuses a model the user could actually call. So the field is set ONLY where
|
|
288
|
+
* a floor has been observed, and a reader must never read its absence as
|
|
289
|
+
* evidence that a model accepts any client version.
|
|
290
|
+
*
|
|
291
|
+
* The value is a dotted numeric version compared by
|
|
292
|
+
* `compareDottedVersions` / `meetsDottedVersionFloor` in types.ts.
|
|
293
|
+
*/
|
|
294
|
+
minCliVersion?: string;
|
|
268
295
|
}
|
|
269
296
|
/**
|
|
270
297
|
* Fifteen rows: the snapshot's own 14, in the snapshot's own declaration order,
|
|
@@ -362,4 +389,20 @@ export declare function claudeThinkingMode(modelId: string, catalog?: readonly C
|
|
|
362
389
|
export declare function claudeModelSupportsTemperature(modelId: string, catalog?: readonly ClaudeModelEntry[]): boolean;
|
|
363
390
|
/** Whether thinking can be turned off for one model. */
|
|
364
391
|
export declare function claudeModelCanDisableThinking(modelId: string, catalog?: readonly ClaudeModelEntry[]): boolean;
|
|
392
|
+
/**
|
|
393
|
+
* Lowest reported client version upstream serves one model to, when known.
|
|
394
|
+
*
|
|
395
|
+
* `undefined` means "no known floor" — NOT "no floor" — so a caller must treat it
|
|
396
|
+
* as "nothing to check" rather than as "any version is fine". The distinction
|
|
397
|
+
* matters because the caller is a pre-flight refusal: an absent floor must let
|
|
398
|
+
* the request through (refusing it would invent a restriction nobody recorded),
|
|
399
|
+
* while a present floor must block a claim below it.
|
|
400
|
+
*
|
|
401
|
+
* Unlike the other per-model lookups this one does NOT resolve through the
|
|
402
|
+
* conservative stub for an unknown id. The stub describes capabilities this line
|
|
403
|
+
* assumes; a version floor is a fact about the server that this line either has
|
|
404
|
+
* or has not observed, and manufacturing one for an unknown id would refuse a
|
|
405
|
+
* model nobody has evidence against.
|
|
406
|
+
*/
|
|
407
|
+
export declare function claudeMinCliVersionFor(modelId: string, catalog?: readonly ClaudeModelEntry[]): string | undefined;
|
|
365
408
|
//# sourceMappingURL=model-catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/model-catalog.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/model-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqOG;AAIH,4CAA4C;AAC5C,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAA;IACZ,iFAAiF;IACjF,aAAa,EAAE,MAAM,CAAA;IACrB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAA;IACjB,6CAA6C;IAC7C,aAAa,EAAE,OAAO,CAAA;IACtB,kDAAkD;IAClD,mBAAmB,EAAE,OAAO,CAAA;IAC5B;;;;;;;;;;;;;;OAcG;IACH,YAAY,EAAE,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC1D;;;;;;OAMG;IACH,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC;;;;;OAKG;IACH,kBAAkB,EAAE,OAAO,CAAA;IAC3B;;;;;;;;;;;;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EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,gBAAgB,EAAE,GAAG,OAAO,CAE9G;AAED,wDAAwD;AACxD,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,gBAAgB,EAAE,GAAG,OAAO,CAE7G;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,gBAAgB,EAAE,GAAG,MAAM,GAAG,SAAS,CAGjH"}
|
|
@@ -92,20 +92,38 @@ export declare const INTERLEAVED_THINKING_BETA = "interleaved-thinking-2025-05-1
|
|
|
92
92
|
/** Anthropic protocol revision sent as `anthropic-version`. */
|
|
93
93
|
export declare const ANTHROPIC_VERSION = "2023-06-01";
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* Client version this route CLAIMS to be on the subscription gateway.
|
|
96
96
|
*
|
|
97
|
-
* Upstream enforces a *minimum reported client version* on the
|
|
98
|
-
* path:
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
97
|
+
* Upstream enforces a *minimum reported client version* per model on the
|
|
98
|
+
* subscription path: the version travels in the `user-agent` header (built by
|
|
99
|
+
* `claudeUserAgent` in client.ts) and a claim below the floor is refused with
|
|
100
|
+
* HTTP 400 and an error body whose code is `claude_code_version_too_old`. That
|
|
101
|
+
* is a hard stop for the whole request rather than a per-request failure, and the
|
|
102
|
+
* number in the refusal is OUR OWN claim echoed back — so the user is told their
|
|
103
|
+
* client is too old without being told which model demanded more, which is
|
|
104
|
+
* exactly how it misleads people into signing in again.
|
|
104
105
|
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
106
|
+
* THE INVARIANT THIS CONSTANT CARRIES. It must be at or above the highest
|
|
107
|
+
* `minCliVersion` that any shipped model in `model-catalog.ts` declares. A
|
|
108
|
+
* default below a shipped model's floor is a model this package advertises in
|
|
109
|
+
* its own picker and then cannot call at all, which is the bug this comment now
|
|
110
|
+
* records: `2.1.251` shipped while `claude-opus-5-5` — also shipped, and the
|
|
111
|
+
* row the default picker leads with — requires `2.1.280`. The matching
|
|
112
|
+
* regression lock lives in `test/claude-model-catalog.test.ts` and fails
|
|
113
|
+
* loudly, naming both versions, when a future model's floor is added without
|
|
114
|
+
* raising this value.
|
|
115
|
+
*
|
|
116
|
+
* The value is a REAL published `@anthropic-ai/claude-code` release, not a
|
|
117
|
+
* number chosen merely to clear a floor: claiming a version that does not exist
|
|
118
|
+
* trades a clear refusal for an unpredictable one. Note that npm's `stable`
|
|
119
|
+
* dist-tag can itself sit below a model's floor, so `latest` is the tag to read.
|
|
120
|
+
*
|
|
121
|
+
* It is still not a literal that only moves when this package is republished: a
|
|
122
|
+
* user whose installed baseline has aged past the server's floor has to be able
|
|
123
|
+
* to raise it without waiting for a release. Read the effective value with
|
|
124
|
+
* {@link claudeCliVersion}, pin one with {@link setClaudeCliVersion}.
|
|
107
125
|
*/
|
|
108
|
-
export declare const CLAUDE_CLI_VERSION = "2.1.
|
|
126
|
+
export declare const CLAUDE_CLI_VERSION = "2.1.283";
|
|
109
127
|
/**
|
|
110
128
|
* Loopback callback port the subscription flow defaults to.
|
|
111
129
|
*
|
|
@@ -223,6 +241,38 @@ export declare function claudeCliVersion(): string;
|
|
|
223
241
|
* environment and then the shipped baseline.
|
|
224
242
|
*/
|
|
225
243
|
export declare function setClaudeCliVersion(value: string | null): void;
|
|
244
|
+
/**
|
|
245
|
+
* Compare two dotted numeric versions, e.g. `'2.1.283'` against `'2.1.280'`.
|
|
246
|
+
*
|
|
247
|
+
* This exists so a version FLOOR can be checked before a request is sent. The
|
|
248
|
+
* comparison is deliberately small and TOTAL rather than a SemVer parser: the
|
|
249
|
+
* only strings it ever sees are this line's own reported version (a pin, the
|
|
250
|
+
* `DSH_CLAUDE_CLI_VERSION` override, or the shipped default) and the floors
|
|
251
|
+
* recorded in the model catalog, and it must not throw on any of them — a
|
|
252
|
+
* comparison that can throw would turn a misconfigured version into a crash
|
|
253
|
+
* instead of the precise pre-flight refusal it was added to produce.
|
|
254
|
+
*
|
|
255
|
+
* Total means: a missing segment compares as 0 (`'2.1'` equals `'2.1.0'`), and a
|
|
256
|
+
* segment that is not a run of decimal digits compares as 0 rather than as NaN
|
|
257
|
+
* (`'abc'` equals `'0.0.0'`, and so does `''`). Leading zeros are exact rather
|
|
258
|
+
* than octal, and an optional leading `v` is tolerated because that is how a
|
|
259
|
+
* release is often written down.
|
|
260
|
+
*
|
|
261
|
+
* @returns a negative number, 0, or a positive number — the sign is the whole
|
|
262
|
+
* contract, so callers compare against 0 rather than against ±1.
|
|
263
|
+
*/
|
|
264
|
+
export declare function compareDottedVersions(left: string, right: string): number;
|
|
265
|
+
/**
|
|
266
|
+
* Whether one reported version clears a floor.
|
|
267
|
+
*
|
|
268
|
+
* An absent floor (`undefined`) means "no known floor" rather than "no floor",
|
|
269
|
+
* so it never blocks a request: refusing a model because nobody recorded a
|
|
270
|
+
* number would be this line inventing a restriction upstream never stated.
|
|
271
|
+
* A MALFORMED version on either side, on the other hand, is refused — that is
|
|
272
|
+
* the conservative direction, since the check exists to stop an unknown claim
|
|
273
|
+
* from reaching a server that has already refused one.
|
|
274
|
+
*/
|
|
275
|
+
export declare function meetsDottedVersionFloor(version: string, floor?: string): boolean;
|
|
226
276
|
/**
|
|
227
277
|
* Resolve the browser authorization endpoint.
|
|
228
278
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,uCAAuC;AACvC,eAAO,MAAM,WAAW,wBAAwB,CAAA;AAChD,kEAAkE;AAClE,eAAO,MAAM,aAAa,mCAAe,CAAA;AAEzC,kFAAkF;AAClF,eAAO,MAAM,QAAQ,8BAA8B,CAAA;AAEnD;;;;;;GAMG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AAqF,CAAA;AAEnH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;IACrB,qFAAqF;;IAErF,+EAA+E;;IAE/E,iFAAiF;;IAEjF,mFAAmF;;IAEnF,uEAAuE;;IAEvE,kDAAkD;;IAElD,+CAA+C;;IAE/C,mFAAmF;;CAE3E,CAAA;AAEV,2CAA2C;AAC3C,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAA;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,gCAAgC,CAAA;AAE9E,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAA8B,CAAA;AAEvF,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAKD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAGzC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAG9D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CASzE;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAIhF;AAoBD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAG1C;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,MAA8B,GAAG,MAAM,CAEhF"}
|
|
@@ -233,6 +233,46 @@ export declare class AccountPoolCore<TCredentials, TAccount extends PoolAccountS
|
|
|
233
233
|
account: TAccount;
|
|
234
234
|
credentials: TCredentials;
|
|
235
235
|
}>;
|
|
236
|
+
/**
|
|
237
|
+
* Refresh one named account's credential for a caller that is not a metered
|
|
238
|
+
* model request.
|
|
239
|
+
*
|
|
240
|
+
* The settings card is what this exists for. It addresses an account by id
|
|
241
|
+
* rather than taking a rotation slot, and it used to hand the stored
|
|
242
|
+
* credential to the provider unchanged; with a 15-minute access token that
|
|
243
|
+
* meant a card opened more than a quarter of an hour after the last model
|
|
244
|
+
* request sent an expired bearer to the usage endpoint and was answered with
|
|
245
|
+
* 401 — "sign in again" for a credential that a plain refresh would have
|
|
246
|
+
* renewed.
|
|
247
|
+
*
|
|
248
|
+
* Rotation bookkeeping is deliberately ignored, matching
|
|
249
|
+
* {@link getCredentialAccount}: a cooldown or a pinned account describes
|
|
250
|
+
* routing, not whether the credential can be read. A credential the provider
|
|
251
|
+
* has already declared unusable is still refused, because refreshing it
|
|
252
|
+
* cannot succeed.
|
|
253
|
+
*
|
|
254
|
+
* @param accountId - the pool account to read, or undefined for the primary.
|
|
255
|
+
* @param fetchFn - fetch used by the provider's token refresh.
|
|
256
|
+
*/
|
|
257
|
+
getFreshCredential(accountId?: string, fetchFn?: typeof fetch): Promise<TCredentials>;
|
|
258
|
+
/**
|
|
259
|
+
* Renew one account's credential unconditionally.
|
|
260
|
+
*
|
|
261
|
+
* This is the answer to a 401 that the local clock did not predict: an access
|
|
262
|
+
* token can be revoked upstream or rotated by another holder while it still
|
|
263
|
+
* looks unexpired, and only the service's own refusal says so. Renewing it is
|
|
264
|
+
* what separates that from a credential that genuinely needs a new sign-in.
|
|
265
|
+
*/
|
|
266
|
+
renewCredential(accountId?: string, fetchFn?: typeof fetch): Promise<TCredentials>;
|
|
267
|
+
/**
|
|
268
|
+
* Resolve, and if needed renew, one account's credential.
|
|
269
|
+
*
|
|
270
|
+
* With no id the account that would serve the next request is used — the
|
|
271
|
+
* active one, then the primary, then the first — because a caller that does
|
|
272
|
+
* not name an account (the catalog loader) still has to present the
|
|
273
|
+
* credential that is actually in play.
|
|
274
|
+
*/
|
|
275
|
+
private credentialFor;
|
|
236
276
|
/** Whether one account's credential must be refreshed before it is handed out. */
|
|
237
277
|
private shouldRefreshCredential;
|
|
238
278
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-pool.d.ts","sourceRoot":"","sources":["../../../../src/host/common/account-pool.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAIxD,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,wCAAwC,CAAA;AAE/C,wEAAwE;AACxE,eAAO,MAAM,sBAAsB,QAAS,CAAA;AAK5C,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,YAAY;IAC5C,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,YAAY,CAAA;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,4EAA4E;AAC5E,MAAM,WAAW,QAAQ,CAAC,QAAQ;IAChC,OAAO,EAAE,CAAC,CAAA;IACV,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,EAAE,uBAAuB,CAAA;IACzC,QAAQ,EAAE,QAAQ,EAAE,CAAA;CACrB;AAED,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB,CAAC,YAAY,EAAE,QAAQ;IACtD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,YAAY,CAAA;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAA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AE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAkCpG,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAO/F,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC;YAgBpD,aAAa;CAmL7B;AAQD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -56,7 +56,24 @@ export declare function loadProviderModels(options?: {
|
|
|
56
56
|
region?: KimiCodeRegion;
|
|
57
57
|
signal?: AbortSignal;
|
|
58
58
|
force?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Read the active credential from the account pool.
|
|
61
|
+
*
|
|
62
|
+
* Every refresh rotates the refresh token and invalidates the previous one.
|
|
63
|
+
* The single-credential file is a *copy* of the pool's primary account, so
|
|
64
|
+
* refreshing that copy spends the token the pool will present on the next
|
|
65
|
+
* model request — the account then reads as rejected until a new sign-in.
|
|
66
|
+
* Supplying this keeps the loader on the one credential authority.
|
|
67
|
+
*/
|
|
68
|
+
credentialProvider?: (region: KimiCodeRegion) => Promise<string | undefined>;
|
|
59
69
|
}): Promise<KimiCodeCatalogModel[]>;
|
|
70
|
+
/**
|
|
71
|
+
* Record which credential the last listing used, so a token-free caller for the
|
|
72
|
+
* same region can reuse it instead of decrypting the mirror.
|
|
73
|
+
*/
|
|
74
|
+
export declare function rememberCatalogCredential(region: KimiCodeRegion, accessToken: string): void;
|
|
75
|
+
/** Test seam: forget which credential the cached listings were fetched with. */
|
|
76
|
+
export declare function clearCatalogCredentials(): void;
|
|
60
77
|
/** Choose the wire dialect for one model, from the live catalog when it says. */
|
|
61
78
|
export declare function wireForCatalogEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): KimiCodeWire;
|
|
62
79
|
/** Thinking levels for one model, from the catalog when it declares them. */
|
|
@@ -146,6 +163,17 @@ export interface QuotaFetchOptions {
|
|
|
146
163
|
* account's name, so a snapshot is only reused for the same id.
|
|
147
164
|
*/
|
|
148
165
|
accountId?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Refresh this credential and hand back the replacement, or undefined when
|
|
168
|
+
* the caller has no way to renew it.
|
|
169
|
+
*
|
|
170
|
+
* A usage call that answers 401 is the only signal that an access token
|
|
171
|
+
* stopped being accepted; rotation bookkeeping cannot see it, because the
|
|
172
|
+
* token still looks unexpired locally. The caller that owns the credential —
|
|
173
|
+
* the pool — supplies the write-back here, so the one retry happens where the
|
|
174
|
+
* rotated refresh token can actually be persisted.
|
|
175
|
+
*/
|
|
176
|
+
renewFn?: (credentials: KimiCodeCredentials) => Promise<KimiCodeCredentials | undefined>;
|
|
149
177
|
}
|
|
150
178
|
/**
|
|
151
179
|
* Fetch and cache the account's quota snapshot.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EAQd,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EAEnB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,YAAY,EACb,MAAM,qCAAqC,CAAA;AAG5C,gDAAgD;AAChD,eAAO,MAAM,WAAW,YAAY,CAAA;AACpC,eAAO,MAAM,WAAW,YAAY,CAAA;AACpC,eAAO,MAAM,OAAO,QAAQ,CAAA;AAiD5B,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAW5D;AAeD;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,IAAI,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