fix: review fixes, GitHub Releases update check (0.1.1)
- Wallet/subscription/window exhaustion skips a key for 10 minutes instead of disabling it; a balance read showing money brings it back. Only the gateway's own key refusals and a used-up key cap still disable a key. - Classify by sub2api's exact wording; a bare 401 or upstream text no longer retires a key; 'No available accounts' is capacity, not coverage. - Hosts keep only an https origin (no doubled /v1); timeouts and HTTP answers no longer set a host aside; hand edits are re-probed. - Balance: inactive subscriptions, per-plan subscription pooling, key caps kept out of the total, rate windows shown. - Endpoint editor no longer empties itself after Save. - Update check reads GitHub Releases and installs the release tarball; release workflow replaces npm publishing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
86b8e4d24f
commit
f4f4ce55b3
34 files changed
+953
-521
No files matched your search
@@ -197,7 +197,7 @@ test('an exhausted key moves aside through the shared sink and the next key answ
|
||||
assert.equal(result.sources.length, 2)
|
||||
assert.deepEqual(used, ['sk-first-key-0001', 'sk-second-key-0002'])
|
||||
assert.equal(failures.length, 1)
|
||||
assert.equal(failures[0].kind, 'quota')
|
||||
assert.equal(failures[0].kind, 'exhausted')
|
||||
assert.equal(failures[0].key, 'sk-first-key-0001')
|
||||
assert.equal(typeof failures[0].id, 'string')
|
||||
})
|
||||
@@ -234,7 +234,7 @@ test('a client-policy refusal is explained and blames no key', async () => {
|
||||
ring,
|
||||
hosts: stubHostPool(createHostPool, ['https://gw.example']),
|
||||
onKeyFailure: kind => failures.push(kind),
|
||||
fetchImpl: async () => json(403, { error: { message: '请使用标准 codex 客户端' } }),
|
||||
fetchImpl: async () => json(403, { error: { message: 'This API endpoint is only accessible via the official Claude CLI' } }),
|
||||
})
|
||||
await assert.rejects(provider.search({ query: 'q' }), /拒绝了这个客户端/u)
|
||||
assert.deepEqual(failures, [])
|
||||
|
||||
Reference in new issue
Block a user