@expiren/opencode-antigravity-auth 1.6.50 → 1.6.52
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/dist/index.js +25 -18
- package/dist/index.js.map +2 -2
- package/dist/src/plugin/fingerprint.d.ts +0 -2
- package/dist/src/plugin/fingerprint.d.ts.map +1 -1
- package/dist/src/plugin/fingerprint.js.map +1 -1
- package/dist/src/plugin/model-registry.d.ts.map +1 -1
- package/dist/src/plugin/model-registry.js +15 -0
- package/dist/src/plugin/model-registry.js.map +1 -1
- package/dist/src/plugin.d.ts.map +1 -1
- package/dist/src/plugin.js +20 -24
- package/dist/src/plugin.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2167,6 +2167,21 @@ var PUBLIC_MODEL_DEFINITIONS = {
|
|
|
2167
2167
|
limit: { context: 1048576, output: 65535 },
|
|
2168
2168
|
modalities: DEFAULT_MODALITIES
|
|
2169
2169
|
}),
|
|
2170
|
+
"gemini-3.5-flash-preview": defineModel("gemini-3.5-flash-preview", {
|
|
2171
|
+
name: "Gemini 3.5 Flash Preview (Gemini CLI)",
|
|
2172
|
+
reasoning: true,
|
|
2173
|
+
limit: { context: 1048576, output: 65536 },
|
|
2174
|
+
modalities: DEFAULT_MODALITIES
|
|
2175
|
+
}),
|
|
2176
|
+
"gemini-3.1-flash-image": defineModel("gemini-3.1-flash-image", {
|
|
2177
|
+
name: "Gemini 3.1 Flash Image (Gemini CLI)",
|
|
2178
|
+
reasoning: false,
|
|
2179
|
+
limit: { context: 66e3, output: 33e3 },
|
|
2180
|
+
modalities: {
|
|
2181
|
+
input: ["text", "image"],
|
|
2182
|
+
output: ["text", "image"]
|
|
2183
|
+
}
|
|
2184
|
+
}),
|
|
2170
2185
|
"gemini-3.1-flash-image-preview": defineModel("gemini-3.1-flash-image-preview", {
|
|
2171
2186
|
name: "Gemini 3.1 Flash Image Preview (Gemini CLI)",
|
|
2172
2187
|
reasoning: false,
|
|
@@ -12734,22 +12749,10 @@ var createAntigravityPlugin = (providerId) => async ({ client, directory }) => {
|
|
|
12734
12749
|
if (!bodyStr) return;
|
|
12735
12750
|
try {
|
|
12736
12751
|
pushDebug("cache-warmup-probe: start");
|
|
12737
|
-
let probeBody = bodyStr;
|
|
12738
|
-
try {
|
|
12739
|
-
const parsed = JSON.parse(bodyStr);
|
|
12740
|
-
if (parsed.request && typeof parsed.request === "object") {
|
|
12741
|
-
const req = { ...parsed.request };
|
|
12742
|
-
delete req.generationConfig;
|
|
12743
|
-
delete req.thinkingConfig;
|
|
12744
|
-
delete req.safetySettings;
|
|
12745
|
-
probeBody = JSON.stringify({ ...parsed, request: req });
|
|
12746
|
-
}
|
|
12747
|
-
} catch {
|
|
12748
|
-
}
|
|
12749
12752
|
const probeResponse = await fetch(toUrlString(prepared.request), {
|
|
12750
12753
|
...prepared.init,
|
|
12751
12754
|
method: "POST",
|
|
12752
|
-
body:
|
|
12755
|
+
body: bodyStr
|
|
12753
12756
|
});
|
|
12754
12757
|
if (probeResponse.body) {
|
|
12755
12758
|
const reader = probeResponse.body.getReader();
|
|
@@ -12779,7 +12782,7 @@ var createAntigravityPlugin = (providerId) => async ({ client, directory }) => {
|
|
|
12779
12782
|
let headerStyle = preferredHeaderStyle;
|
|
12780
12783
|
pushDebug(`headerStyle=${headerStyle} explicit=${explicitQuota}`);
|
|
12781
12784
|
if (account.fingerprint) {
|
|
12782
|
-
pushDebug(`fingerprint:
|
|
12785
|
+
pushDebug(`fingerprint: deviceId=${account.fingerprint.deviceId.slice(0, 8)}...`);
|
|
12783
12786
|
}
|
|
12784
12787
|
if (accountManager.isRateLimitedForHeaderStyle(account, family, headerStyle, model)) {
|
|
12785
12788
|
if (allowQuotaFallback && family === "gemini" && headerStyle === "antigravity") {
|
|
@@ -13379,6 +13382,10 @@ Alternatively, you can:
|
|
|
13379
13382
|
}
|
|
13380
13383
|
}
|
|
13381
13384
|
const cooldownMs = acc.coolingDownUntil && acc.coolingDownUntil > now ? acc.coolingDownUntil - now : void 0;
|
|
13385
|
+
const DISPLAY_QUOTA_MAX_AGE_MS = 60 * 60 * 1e3;
|
|
13386
|
+
const quotaIsStale = acc.cachedQuotaUpdatedAt == null || now - acc.cachedQuotaUpdatedAt > DISPLAY_QUOTA_MAX_AGE_MS;
|
|
13387
|
+
const displayQuota = quotaIsStale ? void 0 : acc.cachedQuota;
|
|
13388
|
+
const displayPerModelQuota = quotaIsStale ? void 0 : acc.cachedPerModelQuota;
|
|
13382
13389
|
return {
|
|
13383
13390
|
email: acc.email,
|
|
13384
13391
|
index: idx,
|
|
@@ -13387,11 +13394,11 @@ Alternatively, you can:
|
|
|
13387
13394
|
status,
|
|
13388
13395
|
isCurrentAccount: idx === (existingStorage2.activeIndex ?? 0),
|
|
13389
13396
|
enabled: acc.enabled !== false,
|
|
13390
|
-
quotaSummary: formatCachedQuotaSummary(acc),
|
|
13397
|
+
quotaSummary: quotaIsStale ? void 0 : formatCachedQuotaSummary(acc),
|
|
13391
13398
|
cooldownMs,
|
|
13392
13399
|
cooldownReason: cooldownMs ? acc.cooldownReason : void 0,
|
|
13393
|
-
cachedQuota:
|
|
13394
|
-
cachedPerModelQuota:
|
|
13400
|
+
cachedQuota: displayQuota,
|
|
13401
|
+
cachedPerModelQuota: displayPerModelQuota,
|
|
13395
13402
|
fingerprintHistory: acc.fingerprintHistory
|
|
13396
13403
|
};
|
|
13397
13404
|
});
|
|
@@ -13437,7 +13444,7 @@ Alternatively, you can:
|
|
|
13437
13444
|
if (!resetTime) return "";
|
|
13438
13445
|
const ms = Date.parse(resetTime) - Date.now();
|
|
13439
13446
|
if (ms <= 0) {
|
|
13440
|
-
return remainingFraction !== void 0 && remainingFraction <= 0 ? " (
|
|
13447
|
+
return remainingFraction !== void 0 && remainingFraction <= 0 ? " (paid only)" : " (resetting...)";
|
|
13441
13448
|
}
|
|
13442
13449
|
const hours = ms / (1e3 * 60 * 60);
|
|
13443
13450
|
if (hours >= 24) {
|