dsh-plugin-subscription-oauth 0.8.4 → 0.8.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.
|
@@ -458,10 +458,11 @@ export class AntigravityAdapter extends LlmAdapter {
|
|
|
458
458
|
const diag = [`pool=${accounts.join(',') || '(none)'}`];
|
|
459
459
|
const tried = new Set();
|
|
460
460
|
let token = await this.options.tokens.resolve();
|
|
461
|
-
//
|
|
462
|
-
// request
|
|
463
|
-
|
|
464
|
-
|
|
461
|
+
// Stay on the default account until it refuses. opencodex keeps account affinity —
|
|
462
|
+
// a request stays on one account and only moves after a 429 — because switching
|
|
463
|
+
// accounts on every request is what reads to Google as two accounts in play at once
|
|
464
|
+
// and trips the verify gate. Reordering here caused exactly that.
|
|
465
|
+
const order = [token.account, ...accounts.filter((a) => a !== token.account)];
|
|
465
466
|
for (const accountKey of order) {
|
|
466
467
|
if (tried.has(accountKey))
|
|
467
468
|
continue;
|
|
@@ -130,28 +130,17 @@ export async function* streamProviderResponses(options, input) {
|
|
|
130
130
|
if (models.length === 0) {
|
|
131
131
|
throw new LlmError(`${label} has no enabled model to dispatch to`, EMPTY_RESPONSE_CODE);
|
|
132
132
|
}
|
|
133
|
-
//
|
|
134
|
-
//
|
|
135
|
-
//
|
|
136
|
-
// the
|
|
133
|
+
// Stay on the default account until it refuses. opencodex keeps account affinity — a
|
|
134
|
+
// request stays on one account and only moves after a 429 — because switching accounts
|
|
135
|
+
// on every request is what reads to a provider as several accounts in play at once and
|
|
136
|
+
// trips the safety gate. Reordering candidates here caused exactly that.
|
|
137
137
|
let accounts = input.accounts === undefined
|
|
138
138
|
? undefined
|
|
139
139
|
: [...await input.accounts()];
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
if (accounts !== undefined && accounts.length > 1 && input.isAccountSpent !== undefined) {
|
|
145
|
-
const fresh = [];
|
|
146
|
-
const tired = [];
|
|
147
|
-
for (const account of accounts) {
|
|
148
|
-
if (await input.isAccountSpent(account))
|
|
149
|
-
tired.push(account);
|
|
150
|
-
else
|
|
151
|
-
fresh.push(account);
|
|
152
|
-
}
|
|
153
|
-
if (tired.length > 0 && fresh.length > 0) {
|
|
154
|
-
accounts = [...fresh, ...tired];
|
|
140
|
+
if (accounts !== undefined && accounts.length > 1) {
|
|
141
|
+
const defaultAccount = await tokens.defaultAccount();
|
|
142
|
+
if (defaultAccount !== undefined) {
|
|
143
|
+
accounts = [defaultAccount, ...accounts.filter((a) => a !== defaultAccount)];
|
|
155
144
|
}
|
|
156
145
|
}
|
|
157
146
|
const tryAccounts = accounts === undefined || accounts.length === 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-subscription-oauth",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "Use subscription accounts as DeepSeek Harness LLM providers — Kimi Code (OAuth device flow), Grok / X Premium (OIDC + PKCE), Google Antigravity (Google OAuth + Cloud Code Assist) and GLM / BigModel (ZCode's browser sign-in) — with per-model visibility, drag-to-reorder Auto fallback and plan quotas from the web Settings page",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "EricFL1998",
|