dsh-sub2api 0.2.4 → 0.2.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 +8 -0
- package/lib/routes.js +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.5
|
|
4
|
+
|
|
5
|
+
- 0.2.4's failure back-off also swallowed the retry a top-up was supposed to
|
|
6
|
+
trigger: the balance rejection recorded seconds earlier counted as "recently
|
|
7
|
+
failed", so the catalog stayed empty until the two minutes elapsed. The
|
|
8
|
+
back-off now excludes `INSUFFICIENT_BALANCE`, because that answer changes the
|
|
9
|
+
moment money lands.
|
|
10
|
+
|
|
3
11
|
## 0.2.4
|
|
4
12
|
|
|
5
13
|
- Sync the catalog by itself once the account is funded. A top-up normally
|
package/lib/routes.js
CHANGED
|
@@ -62,8 +62,11 @@ export function makeRoutes(deps) {
|
|
|
62
62
|
|
|
63
63
|
// Back off after a failure: a group with no models would otherwise be
|
|
64
64
|
// retried on every poll, and the answer will not change within seconds.
|
|
65
|
+
// A balance rejection is excluded — funding the account changes the answer
|
|
66
|
+
// immediately, and that is exactly the case this path exists for.
|
|
67
|
+
const blockedByBalance = catalog.lastError?.code === "INSUFFICIENT_BALANCE";
|
|
65
68
|
const failedAt = catalog.lastError?.at;
|
|
66
|
-
if (typeof failedAt === "number" && now - failedAt < 120000) return;
|
|
69
|
+
if (!blockedByBalance && typeof failedAt === "number" && now - failedAt < 120000) return;
|
|
67
70
|
|
|
68
71
|
const empty = catalog.visible().length === 0;
|
|
69
72
|
const funded = Number.isFinite(balance) && balance > 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-sub2api",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Sub2API provider for DeepSeek Harness: zero-friction signup, auto-provisioned API key, upstream model sync, balance and recharge",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "GPL-3.0-only",
|