@eddyskywalker/dsh-chatgpt-subscription 0.68.0 → 0.68.1
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 +9 -0
- package/lib/client.js +21 -1
- package/lib/client.js.map +1 -1
- package/lib/index.js +38 -4
- package/lib/types/client/opendesign/OpenDesignSection.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/opendesign/adapter.d.ts.map +1 -1
- package/lib/types/host/opendesign/mapper.d.ts +13 -1
- package/lib/types/host/opendesign/mapper.d.ts.map +1 -1
- package/lib/types/host/opendesign/routes.d.ts.map +1 -1
- package/lib/types/shared/opendesign-contracts.d.ts +1 -1
- package/lib/types/shared/opendesign-contracts.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.68.1 - 2026-11-11
|
|
6
|
+
|
|
7
|
+
- **[opendesign / 号池] 套餐不含某个模型不再判成密钥失效,并补回清除失效标记的入口**
|
|
8
|
+
- **现象**:Go 档账号用 `deepseek-v4.1-flash` 偶发失败后,卡片把该账号标成「登录已失效 / 需替换 Key」,而同一把 Key 打同一个模型在下一次请求就成功;用户反复「重新登录」也只能换一个新账号,旧行一直是红的。
|
|
9
|
+
- **根因**:`isAuthenticationError` 把 **401 与 403 一律**判成 `AUTH`,`streamErrorCode` 因此把网关的 `tier_request_kind_not_entitled`(`membership tier "go" is not entitled to use this model for chat_completions`)与 `tier_model_not_entitled`(`Go/Plus 用户不允许访问最贵的模型`)也归到 `AUTH`,`standDown` 再写成 `authStatus: "invalid"`。这两种拒绝说的是**套餐与模型**,同一把 Key 对其余模型照常可用;而 `invalid` 只由 `clearAuthFailed` 解除,本线路的账号路由又没有该 action(实测 `POST {"action":"relogin"}` 返回 `Unsupported account action.`),于是正常账号被永久挂起。
|
|
10
|
+
- **改法**:`mapper.ts` 新增 `isModelEntitlementDenial`,`streamErrorCode` 在 `AUTH` 之前把它归为 `PROVIDER_ERROR`;`isAuthenticationError` 只在 401,或 403 的正文点名了密钥(`invalid_api_key` / `key was revoked` 等)时才返回真。`adapter.ts` 对权益类拒绝改成「跳过本账号、换下一个账号」,**不落任何标记**——号池里可能有更高档位的 Key,而当前账号对其余模型仍然有效。`routes.ts` 新增 `relogin`(清标记、不删账号),卡片「重新登录」改为先清标记再走登录,与同仓其余线路一致。
|
|
11
|
+
- **刻意不做**:不改 `PROVIDER_ERROR` 的重试语义、不动 `QUOTA` 判定,也不把 5xx 拉进这次分类——`database_unavailable` 已经是 `SERVER`,本来就不会挂起账号。
|
|
12
|
+
- **回归**:`test/opendesign-mapper.test.ts` 覆盖两种 `tier_*` 403、不带凭证线索的 403(现在是 `HTTP_403`,此前是 `AUTH`)、带凭证线索的 403 与 401;`test/opendesign-adapter.test.ts` 覆盖承重的一步——权益类 403 换到下一个账号、且该账号既不落 `invalid` 也不进冷却(合并后补齐,并做过反向对照:短路 `adapter.ts` 那条分支即失败);`test/opendesign-routes.test.ts` 覆盖 `relogin` 清标记后账号仍在、别名保留、`usable` 恢复。`npm run typecheck` 通过;四个 opendesign 测试文件 171 例全通过;全量 Vitest 为 384 文件通过 / 2 跳过,6991 例通过 / 9 跳过,0 失败。
|
|
13
|
+
|
|
5
14
|
## 0.68.0 - 2026-11-11
|
|
6
15
|
|
|
7
16
|
- **[cline-pass / 路由] 移除客户端上游钉选,模型路由完全交还 Cline 网关**
|
package/lib/client.js
CHANGED
|
@@ -17728,6 +17728,26 @@ window.__ModuleLoader__.load({
|
|
|
17728
17728
|
});
|
|
17729
17729
|
}).catch((cause) => setError(detail(cause)));
|
|
17730
17730
|
}, [loginFlow]);
|
|
17731
|
+
/**
|
|
17732
|
+
* Re-authorize one account.
|
|
17733
|
+
*
|
|
17734
|
+
* The failure marker is cleared first and nothing is deleted, which is the
|
|
17735
|
+
* same contract every sibling line's card has. A row parked by a refusal that
|
|
17736
|
+
* was never about its key — the plan withholding one model answers 403 too —
|
|
17737
|
+
* comes back as soon as the marker is gone; a row whose key really is dead is
|
|
17738
|
+
* no worse off, because the next request parks it again for the same reason.
|
|
17739
|
+
*/
|
|
17740
|
+
const reloginAccount = (0, react.useCallback)((accountId) => {
|
|
17741
|
+
(async () => {
|
|
17742
|
+
try {
|
|
17743
|
+
applyStatus(await API$3.accountAction("relogin", { accountId }));
|
|
17744
|
+
} catch (cause) {
|
|
17745
|
+
setError(detail(cause));
|
|
17746
|
+
return;
|
|
17747
|
+
}
|
|
17748
|
+
startLogin();
|
|
17749
|
+
})();
|
|
17750
|
+
}, [applyStatus, startLogin]);
|
|
17731
17751
|
const run = (0, react.useCallback)(async (label, action) => {
|
|
17732
17752
|
setBusy(label);
|
|
17733
17753
|
setError(null);
|
|
@@ -17933,7 +17953,7 @@ window.__ModuleLoader__.load({
|
|
|
17933
17953
|
busy,
|
|
17934
17954
|
onLogin: startLogin,
|
|
17935
17955
|
loginBusyLabel: t.loggingIn,
|
|
17936
|
-
onRelogin:
|
|
17956
|
+
onRelogin: reloginAccount,
|
|
17937
17957
|
onSetPrimary: (id) => void run("set-primary", () => API$3.accountAction("set-primary", { accountId: id })),
|
|
17938
17958
|
onDelete: (id) => void run("delete", () => API$3.accountAction("delete", { accountId: id })),
|
|
17939
17959
|
onClearCooldown: (id) => void run("clear-cooldown", () => API$3.accountAction("clear-cooldown", { accountId: id })),
|