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:
大阔andClaude Opus 5.5 committed 2026-10-15 01:15:24 +08:00
1 parent 86b8e4d24f
commit f4f4ce55b3
34 files changed
+953 -521

No files matched your search

+2 -2
View File
@@ -233,7 +233,7 @@ export function buildSearchRequest(backend, { apiHost, query, sessionId }) {
headers: key => ({ authorization: `Bearer ${key}` }),
body: {
model,
// The Codex group refuses a bare string input on some channels.
// Message-shaped input is accepted by every Responses upstream.
input: [{
role: 'user',
content: [{
@@ -401,7 +401,7 @@ export function createGeek2APISearchProvider({
if (classifyClientPolicy(failure)) {
throw new WebError(explainClientPolicyFailure(), 'WEB_PROVIDER_ERROR')
}
const kind = classifyGatewayFailure(failure) ?? (outcome.status === 401 ? 'invalid-key' : undefined)
const kind = classifyGatewayFailure(failure)
if (kind !== undefined) {
// The same sink the model route uses: the key moves aside for both.
onKeyFailure?.(kind, failure, key.key, key.id)