@kenkaiiii/gg-core 5.81.0 → 5.83.0
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/{chunk-BNMQ6VWC.js → chunk-JJED477O.js} +150 -38
- package/dist/chunk-JJED477O.js.map +1 -0
- package/dist/index.cjs +182 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +38 -7
- package/dist/index.js.map +1 -1
- package/dist/model-registry.cjs +141 -39
- package/dist/model-registry.cjs.map +1 -1
- package/dist/model-registry.d.cts +41 -1
- package/dist/model-registry.d.ts +41 -1
- package/dist/model-registry.js +7 -3
- package/package.json +2 -2
- package/dist/chunk-BNMQ6VWC.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -35,6 +35,8 @@ __export(index_exports, {
|
|
|
35
35
|
DEFAULT_LOCAL_ENDPOINTS: () => DEFAULT_LOCAL_ENDPOINTS,
|
|
36
36
|
DEFAULT_MAX_VIDEO_BYTES: () => DEFAULT_MAX_VIDEO_BYTES,
|
|
37
37
|
FALLBACK_CONTEXT_WINDOW: () => FALLBACK_CONTEXT_WINDOW,
|
|
38
|
+
GEMINI_API_KEY: () => GEMINI_API_KEY,
|
|
39
|
+
GEMINI_API_KEY_BASE_URL: () => GEMINI_API_KEY_BASE_URL,
|
|
38
40
|
LOCAL_API_KEY_PLACEHOLDER: () => LOCAL_API_KEY_PLACEHOLDER,
|
|
39
41
|
LOCAL_AUTH_KEY_PREFIX: () => LOCAL_AUTH_KEY_PREFIX,
|
|
40
42
|
MODELS: () => MODELS,
|
|
@@ -89,6 +91,7 @@ __export(index_exports, {
|
|
|
89
91
|
isLocalModelId: () => isLocalModelId,
|
|
90
92
|
isLoggerOpen: () => isLoggerOpen,
|
|
91
93
|
isModelLoaded: () => isModelLoaded,
|
|
94
|
+
isPaidModel: () => isPaidModel,
|
|
92
95
|
isThinkingLevelSupported: () => isThinkingLevelSupported,
|
|
93
96
|
kimiCodeBaseUrl: () => kimiCodeBaseUrl,
|
|
94
97
|
kimiCodingHeaders: () => kimiCodingHeaders,
|
|
@@ -117,7 +120,8 @@ __export(index_exports, {
|
|
|
117
120
|
toModelInfo: () => toModelInfo,
|
|
118
121
|
transcribeVoice: () => transcribeVoice,
|
|
119
122
|
usesOpenAICodexTransport: () => usesOpenAICodexTransport,
|
|
120
|
-
withFileLock: () => withFileLock
|
|
123
|
+
withFileLock: () => withFileLock,
|
|
124
|
+
withoutPaidTier: () => withoutPaidTier
|
|
121
125
|
});
|
|
122
126
|
module.exports = __toCommonJS(index_exports);
|
|
123
127
|
|
|
@@ -1591,6 +1595,8 @@ function providerStorageKeys(provider) {
|
|
|
1591
1595
|
return dual ? [dual.oauthKey, dual.provider] : [provider];
|
|
1592
1596
|
}
|
|
1593
1597
|
var XIAOMI_CREDITS_KEY = "xiaomi-credits";
|
|
1598
|
+
var GEMINI_API_KEY = "gemini-api";
|
|
1599
|
+
var GEMINI_API_KEY_BASE_URL = "https://generativelanguage.googleapis.com/v1beta";
|
|
1594
1600
|
var LOCAL_AUTH_KEY_PREFIX = "local:";
|
|
1595
1601
|
var LOCAL_CREDENTIAL_LIFETIME_MS = 100 * 365 * 24 * 60 * 60 * 1e3;
|
|
1596
1602
|
function activeBaseUrlEntry(data, provider) {
|
|
@@ -1694,6 +1700,9 @@ var AuthStorage = class {
|
|
|
1694
1700
|
if (provider === "xiaomi") {
|
|
1695
1701
|
return Boolean(this.data["xiaomi"] || this.data[XIAOMI_CREDITS_KEY]);
|
|
1696
1702
|
}
|
|
1703
|
+
if (provider === "gemini") {
|
|
1704
|
+
return Boolean(this.data["gemini"] || this.data[GEMINI_API_KEY]);
|
|
1705
|
+
}
|
|
1697
1706
|
if (provider === "local") {
|
|
1698
1707
|
return Object.keys(this.data).some((key) => key.startsWith(LOCAL_AUTH_KEY_PREFIX));
|
|
1699
1708
|
}
|
|
@@ -1922,6 +1931,12 @@ var AuthStorage = class {
|
|
|
1922
1931
|
...opts.rejectedToken !== void 0 ? { rejectedToken: opts.rejectedToken } : {}
|
|
1923
1932
|
});
|
|
1924
1933
|
}
|
|
1934
|
+
if (key === provider) {
|
|
1935
|
+
return await this.resolveCredentials(provider, {
|
|
1936
|
+
...opts.forceRefresh ? { forceRefresh: true } : {},
|
|
1937
|
+
...opts.rejectedToken !== void 0 ? { rejectedToken: opts.rejectedToken } : {}
|
|
1938
|
+
});
|
|
1939
|
+
}
|
|
1925
1940
|
return creds2;
|
|
1926
1941
|
}
|
|
1927
1942
|
throw new NotLoggedInError(provider);
|
|
@@ -2063,6 +2078,24 @@ var NotLoggedInError = class extends Error {
|
|
|
2063
2078
|
};
|
|
2064
2079
|
|
|
2065
2080
|
// src/model-registry.ts
|
|
2081
|
+
var CLAUDE_FAST_BILLING = {
|
|
2082
|
+
label: "bills usage credits",
|
|
2083
|
+
detail: "Fast mode bills your Claude usage credits ($8 in / $40 out per million tokens) from the first token, never your plan's included usage.",
|
|
2084
|
+
paid: true,
|
|
2085
|
+
standardModel: "claude-opus-5-5"
|
|
2086
|
+
};
|
|
2087
|
+
var XIAOMI_ULTRASPEED_BILLING = {
|
|
2088
|
+
label: "bills API Credits",
|
|
2089
|
+
detail: "UltraSpeed runs only on your Xiaomi API Credits, billed per token at a higher rate than MiMo-V2.6-Pro, never on the Token Plan.",
|
|
2090
|
+
paid: true,
|
|
2091
|
+
standardModel: "mimo-v2.6-pro"
|
|
2092
|
+
};
|
|
2093
|
+
var CODEX_FAST_BILLING = {
|
|
2094
|
+
label: "2.5x plan usage",
|
|
2095
|
+
detail: "Codex Fast mode uses your ChatGPT plan limits at 2.5x the standard rate (purchased credits at 2x).",
|
|
2096
|
+
paid: false
|
|
2097
|
+
};
|
|
2098
|
+
var GEMINI_AUTH_KEYS = [GEMINI_API_KEY, "gemini"];
|
|
2066
2099
|
var MODELS = [
|
|
2067
2100
|
// ── Anthropic ──────────────────────────────────────────
|
|
2068
2101
|
// NOTE: Claude Mythos 5.1 (`claude-mythos-5-1`, 2026-09-01) is kept commented
|
|
@@ -2107,9 +2140,8 @@ var MODELS = [
|
|
|
2107
2140
|
// context, 128K output, image input. Same always-on adaptive thinking with
|
|
2108
2141
|
// the full effort ladder (low→max, xhigh included; the API-side default
|
|
2109
2142
|
// effort is `medium`) and the same Fable 5.1 constraints gg-ai already
|
|
2110
|
-
// handles (no forced tool use, thinking can't be disabled).
|
|
2111
|
-
//
|
|
2112
|
-
// $8/$40 pricing — not wired up). Opus 5 is retired here — a session that
|
|
2143
|
+
// handles (no forced tool use, thinking can't be disabled). Fast mode is
|
|
2144
|
+
// the separate `claude-opus-5-5-fast` entry below. Opus 5 is retired here — a session that
|
|
2113
2145
|
// still has it saved falls back to the provider default on next start.
|
|
2114
2146
|
id: "claude-opus-5-5",
|
|
2115
2147
|
name: "Claude Opus 5.5",
|
|
@@ -2126,6 +2158,26 @@ var MODELS = [
|
|
|
2126
2158
|
defaultThinkingLevel: "medium",
|
|
2127
2159
|
maxThinkingLevel: "max"
|
|
2128
2160
|
},
|
|
2161
|
+
{
|
|
2162
|
+
// Opus 5.5 in fast mode (research preview): the same model at up to 2.5x
|
|
2163
|
+
// output tokens/sec, $8/$40 MTok. gg-ai's `stream()` sends it as
|
|
2164
|
+
// `claude-opus-5-5` + `speed: "fast"` + the fast-mode beta. On a Claude
|
|
2165
|
+
// subscription it bills usage credits only — never included plan usage —
|
|
2166
|
+
// and Anthropic 429s "Usage credits are required for fast mode" until they
|
|
2167
|
+
// are turned on. Its prompt cache is separate from standard-speed Opus.
|
|
2168
|
+
id: "claude-opus-5-5-fast",
|
|
2169
|
+
name: "Claude Opus 5.5 Fast",
|
|
2170
|
+
provider: "anthropic",
|
|
2171
|
+
contextWindow: 1e6,
|
|
2172
|
+
maxOutputTokens: 128e3,
|
|
2173
|
+
supportsThinking: true,
|
|
2174
|
+
supportsImages: true,
|
|
2175
|
+
supportsVideo: false,
|
|
2176
|
+
costTier: "high",
|
|
2177
|
+
defaultThinkingLevel: "medium",
|
|
2178
|
+
maxThinkingLevel: "max",
|
|
2179
|
+
billing: CLAUDE_FAST_BILLING
|
|
2180
|
+
},
|
|
2129
2181
|
{
|
|
2130
2182
|
// Released 2026-09-28 — replaces Sonnet 5 at $2/$10 MTok, with the same
|
|
2131
2183
|
// 1M context / 128K output and adaptive thinking, now including xhigh.
|
|
@@ -2138,9 +2190,10 @@ var MODELS = [
|
|
|
2138
2190
|
supportsImages: true,
|
|
2139
2191
|
supportsVideo: false,
|
|
2140
2192
|
costTier: "medium",
|
|
2141
|
-
//
|
|
2142
|
-
//
|
|
2143
|
-
//
|
|
2193
|
+
// We start Sonnet 5.5 at medium like the rest of the 5.5 family (the API's
|
|
2194
|
+
// own default for Sonnet 5.5 is high). At a given level 5.5 thinks more
|
|
2195
|
+
// than 5, so the ladder ceiling (max) made fresh sessions slow and
|
|
2196
|
+
// expensive. Users can still opt up.
|
|
2144
2197
|
defaultThinkingLevel: "medium",
|
|
2145
2198
|
maxThinkingLevel: "max"
|
|
2146
2199
|
},
|
|
@@ -2193,6 +2246,25 @@ var MODELS = [
|
|
|
2193
2246
|
costTier: "high",
|
|
2194
2247
|
maxThinkingLevel: "ultra"
|
|
2195
2248
|
},
|
|
2249
|
+
{
|
|
2250
|
+
// Codex Fast mode for Astra (catalog `service_tiers: priority`, "2x speed,
|
|
2251
|
+
// increased usage"). gg-ai's `stream()` sends it as `gpt-6-astra` +
|
|
2252
|
+
// `service_tier: "priority"`, exactly what the Codex CLI sends. On a
|
|
2253
|
+
// ChatGPT plan it draws included limits at 2.5x the standard rate.
|
|
2254
|
+
id: "gpt-6-astra-fast",
|
|
2255
|
+
name: "GPT-6 Astra Fast",
|
|
2256
|
+
provider: "openai",
|
|
2257
|
+
contextWindow: 105e4,
|
|
2258
|
+
codexContextWindow: 272e3,
|
|
2259
|
+
maxOutputTokens: 128e3,
|
|
2260
|
+
supportsThinking: true,
|
|
2261
|
+
defaultThinkingLevel: "low",
|
|
2262
|
+
supportsImages: true,
|
|
2263
|
+
supportsVideo: false,
|
|
2264
|
+
costTier: "high",
|
|
2265
|
+
maxThinkingLevel: "ultra",
|
|
2266
|
+
billing: CODEX_FAST_BILLING
|
|
2267
|
+
},
|
|
2196
2268
|
// GPT-6 Sol + Luna — released 2026-09-22 below Astra, replacing the whole
|
|
2197
2269
|
// GPT-5.6 family (Sol/Terra/Luna; there is no GPT-6 Terra — OpenAI's Codex
|
|
2198
2270
|
// catalog upgrades 5.6 Terra to 6 Sol). GPT-6.1 Sol (2026-09-29) then replaced
|
|
@@ -2221,6 +2293,23 @@ var MODELS = [
|
|
|
2221
2293
|
costTier: "medium",
|
|
2222
2294
|
maxThinkingLevel: "ultra"
|
|
2223
2295
|
},
|
|
2296
|
+
{
|
|
2297
|
+
// Codex Fast mode for 6.1 Sol ("2x speed, increased usage") — see
|
|
2298
|
+
// `gpt-6-astra-fast` for the wire mapping and billing.
|
|
2299
|
+
id: "gpt-6.1-sol-fast",
|
|
2300
|
+
name: "GPT-6.1 Sol Fast",
|
|
2301
|
+
provider: "openai",
|
|
2302
|
+
contextWindow: 105e4,
|
|
2303
|
+
codexContextWindow: 272e3,
|
|
2304
|
+
maxOutputTokens: 128e3,
|
|
2305
|
+
supportsThinking: true,
|
|
2306
|
+
defaultThinkingLevel: "low",
|
|
2307
|
+
supportsImages: true,
|
|
2308
|
+
supportsVideo: false,
|
|
2309
|
+
costTier: "medium",
|
|
2310
|
+
maxThinkingLevel: "ultra",
|
|
2311
|
+
billing: CODEX_FAST_BILLING
|
|
2312
|
+
},
|
|
2224
2313
|
{
|
|
2225
2314
|
// Luna — "Fast and affordable model for easier tasks." (Codex priority 4,
|
|
2226
2315
|
// default medium, needs a Codex client >= 0.155.0). $0.10/$0.50 MTok.
|
|
@@ -2238,6 +2327,24 @@ var MODELS = [
|
|
|
2238
2327
|
costTier: "low",
|
|
2239
2328
|
maxThinkingLevel: "max"
|
|
2240
2329
|
},
|
|
2330
|
+
{
|
|
2331
|
+
// Codex Fast mode for Luna ("1.5x speed") — see `gpt-6-astra-fast` for the
|
|
2332
|
+
// wire mapping and billing. Listed after Luna so compaction summaries
|
|
2333
|
+
// (first `low` OpenAI model) stay on standard-speed Luna.
|
|
2334
|
+
id: "gpt-6-luna-fast",
|
|
2335
|
+
name: "GPT-6 Luna Fast",
|
|
2336
|
+
provider: "openai",
|
|
2337
|
+
contextWindow: 105e4,
|
|
2338
|
+
codexContextWindow: 272e3,
|
|
2339
|
+
maxOutputTokens: 128e3,
|
|
2340
|
+
supportsThinking: true,
|
|
2341
|
+
defaultThinkingLevel: "medium",
|
|
2342
|
+
supportsImages: true,
|
|
2343
|
+
supportsVideo: false,
|
|
2344
|
+
costTier: "low",
|
|
2345
|
+
maxThinkingLevel: "max",
|
|
2346
|
+
billing: CODEX_FAST_BILLING
|
|
2347
|
+
},
|
|
2241
2348
|
// ── Sakana (Fugu) ──────────────────────────────────────
|
|
2242
2349
|
// Sakana Fugu is a multi-agent system surfaced as a standard LLM via the
|
|
2243
2350
|
// OpenAI-compatible Sakana API (https://api.sakana.ai/v1). All three take
|
|
@@ -2320,10 +2427,14 @@ var MODELS = [
|
|
|
2320
2427
|
supportsVideo: true,
|
|
2321
2428
|
maxVideoBytes: 20 * 1024 * 1024,
|
|
2322
2429
|
costTier: "low",
|
|
2323
|
-
maxThinkingLevel: "high"
|
|
2430
|
+
maxThinkingLevel: "high",
|
|
2431
|
+
authStorageKeys: GEMINI_AUTH_KEYS
|
|
2324
2432
|
},
|
|
2325
2433
|
// Keep 3.1 Flash Lite first for the working OAuth default and fast-model routing.
|
|
2326
|
-
// New GA models are opt-in; Code Assist access varies by account.
|
|
2434
|
+
// New GA models are opt-in; Code Assist access varies by account. Gemini 3.7
|
|
2435
|
+
// Flash is retired: Google deprecated it on 2026-10-08 and routes every
|
|
2436
|
+
// `gemini-3.7-flash` request to 3.8 Flash (ai.google.dev/gemini-api/docs/
|
|
2437
|
+
// changelog), so a saved session on it falls back to the provider default.
|
|
2327
2438
|
{
|
|
2328
2439
|
id: "gemini-3.8-flash",
|
|
2329
2440
|
name: "Gemini 3.8 Flash",
|
|
@@ -2335,7 +2446,8 @@ var MODELS = [
|
|
|
2335
2446
|
supportsVideo: true,
|
|
2336
2447
|
maxVideoBytes: 20 * 1024 * 1024,
|
|
2337
2448
|
costTier: "low",
|
|
2338
|
-
maxThinkingLevel: "high"
|
|
2449
|
+
maxThinkingLevel: "high",
|
|
2450
|
+
authStorageKeys: GEMINI_AUTH_KEYS
|
|
2339
2451
|
},
|
|
2340
2452
|
{
|
|
2341
2453
|
id: "gemini-3.5-flash-lite",
|
|
@@ -2348,27 +2460,8 @@ var MODELS = [
|
|
|
2348
2460
|
supportsVideo: true,
|
|
2349
2461
|
maxVideoBytes: 20 * 1024 * 1024,
|
|
2350
2462
|
costTier: "low",
|
|
2351
|
-
maxThinkingLevel: "high"
|
|
2352
|
-
|
|
2353
|
-
{
|
|
2354
|
-
// Gemini 3.7 Flash (released 2026-08-13) — Google's most capable Flash for
|
|
2355
|
-
// coding, agents, and multi-step execution; GA-stable on the Gemini API as
|
|
2356
|
-
// `gemini-3.7-flash`. 1M context, 64K output, thinking low/medium/high.
|
|
2357
|
-
// Sent over our Code Assist (OAuth) transport ahead of gemini-cli — upstream
|
|
2358
|
-
// hasn't listed 3.7 yet (google-gemini/gemini-cli#28802, still open) — so
|
|
2359
|
-
// free/personal accounts 404 (entitlement-gated) while Code Assist
|
|
2360
|
-
// Standard/Enterprise accounts get it.
|
|
2361
|
-
id: "gemini-3.7-flash",
|
|
2362
|
-
name: "Gemini 3.7 Flash",
|
|
2363
|
-
provider: "gemini",
|
|
2364
|
-
contextWindow: 1048576,
|
|
2365
|
-
maxOutputTokens: 65536,
|
|
2366
|
-
supportsThinking: true,
|
|
2367
|
-
supportsImages: true,
|
|
2368
|
-
supportsVideo: true,
|
|
2369
|
-
maxVideoBytes: 20 * 1024 * 1024,
|
|
2370
|
-
costTier: "low",
|
|
2371
|
-
maxThinkingLevel: "high"
|
|
2463
|
+
maxThinkingLevel: "high",
|
|
2464
|
+
authStorageKeys: GEMINI_AUTH_KEYS
|
|
2372
2465
|
},
|
|
2373
2466
|
{
|
|
2374
2467
|
// Wire name `gemini-3-flash` — the Code Assist (OAuth) backend rejects the
|
|
@@ -2384,7 +2477,8 @@ var MODELS = [
|
|
|
2384
2477
|
supportsVideo: true,
|
|
2385
2478
|
maxVideoBytes: 20 * 1024 * 1024,
|
|
2386
2479
|
costTier: "low",
|
|
2387
|
-
maxThinkingLevel: "high"
|
|
2480
|
+
maxThinkingLevel: "high",
|
|
2481
|
+
authStorageKeys: GEMINI_AUTH_KEYS
|
|
2388
2482
|
},
|
|
2389
2483
|
{
|
|
2390
2484
|
// Gemini 3.1 Pro is public preview — gated behind Code Assist preview
|
|
@@ -2400,7 +2494,8 @@ var MODELS = [
|
|
|
2400
2494
|
supportsVideo: true,
|
|
2401
2495
|
maxVideoBytes: 20 * 1024 * 1024,
|
|
2402
2496
|
costTier: "high",
|
|
2403
|
-
maxThinkingLevel: "high"
|
|
2497
|
+
maxThinkingLevel: "high",
|
|
2498
|
+
authStorageKeys: GEMINI_AUTH_KEYS
|
|
2404
2499
|
},
|
|
2405
2500
|
// ── Moonshot (Kimi) ────────────────────────────────────
|
|
2406
2501
|
// K3 is Kimi's 2.8T-parameter flagship for long-horizon coding, knowledge
|
|
@@ -2589,9 +2684,13 @@ var MODELS = [
|
|
|
2589
2684
|
maxVideoBytes: 36 * 1024 * 1024,
|
|
2590
2685
|
costTier: "high",
|
|
2591
2686
|
maxThinkingLevel: "high",
|
|
2592
|
-
authStorageKeys: [XIAOMI_CREDITS_KEY]
|
|
2687
|
+
authStorageKeys: [XIAOMI_CREDITS_KEY],
|
|
2688
|
+
billing: XIAOMI_ULTRASPEED_BILLING
|
|
2593
2689
|
},
|
|
2594
2690
|
// ── DeepSeek ───────────────────────────────────────────
|
|
2691
|
+
// Window 1,000,000 tokens (decimal "1M"), as DeepSeek's own agent sizes it
|
|
2692
|
+
// (deepseek-ai/deepseek-harness DEFAULT_CONTEXT_WINDOW = 1_000_000; models.dev
|
|
2693
|
+
// via earendil-works/pi agrees) — not 1,048,576.
|
|
2595
2694
|
// The live /models list (2026-09-28) serves exactly `deepseek-flash` and
|
|
2596
2695
|
// `deepseek-v4-pro`. V4 Flash and V4 Flash Vision Exp are retired; their old
|
|
2597
2696
|
// ids only temporarily route to V4.1 Flash, so they are retired here too.
|
|
@@ -2605,7 +2704,7 @@ var MODELS = [
|
|
|
2605
2704
|
id: "deepseek-v4-pro",
|
|
2606
2705
|
name: "DeepSeek V4 Pro",
|
|
2607
2706
|
provider: "deepseek",
|
|
2608
|
-
contextWindow:
|
|
2707
|
+
contextWindow: 1e6,
|
|
2609
2708
|
maxOutputTokens: 384e3,
|
|
2610
2709
|
supportsThinking: true,
|
|
2611
2710
|
supportsImages: false,
|
|
@@ -2619,7 +2718,7 @@ var MODELS = [
|
|
|
2619
2718
|
id: "deepseek-flash",
|
|
2620
2719
|
name: "DeepSeek V4.1 Flash",
|
|
2621
2720
|
provider: "deepseek",
|
|
2622
|
-
contextWindow:
|
|
2721
|
+
contextWindow: 1e6,
|
|
2623
2722
|
maxOutputTokens: 384e3,
|
|
2624
2723
|
supportsThinking: true,
|
|
2625
2724
|
supportsImages: true,
|
|
@@ -2683,7 +2782,7 @@ var MODELS = [
|
|
|
2683
2782
|
id: "deepseek-ai/DeepSeek-V4.1-Flash",
|
|
2684
2783
|
name: "DeepSeek V4.1 Flash",
|
|
2685
2784
|
provider: "huggingface",
|
|
2686
|
-
contextWindow:
|
|
2785
|
+
contextWindow: 1e6,
|
|
2687
2786
|
maxOutputTokens: 131072,
|
|
2688
2787
|
supportsThinking: false,
|
|
2689
2788
|
supportsImages: true,
|
|
@@ -2730,6 +2829,19 @@ function getModel(id) {
|
|
|
2730
2829
|
function getModelsForProvider(provider) {
|
|
2731
2830
|
return getAllModels().filter((m) => m.provider === provider);
|
|
2732
2831
|
}
|
|
2832
|
+
function isPaidModel(modelId) {
|
|
2833
|
+
return getModel(modelId)?.billing?.paid === true;
|
|
2834
|
+
}
|
|
2835
|
+
function withoutPaidTier(modelId) {
|
|
2836
|
+
const model = getModel(modelId);
|
|
2837
|
+
if (model?.billing?.paid !== true) return modelId;
|
|
2838
|
+
const usable = (id) => id !== void 0 && getModel(id) !== void 0 && !isPaidModel(id);
|
|
2839
|
+
const standard = model.billing.standardModel;
|
|
2840
|
+
if (usable(standard)) return standard;
|
|
2841
|
+
const providerDefault = DEFAULT_MODEL_IDS[model.provider];
|
|
2842
|
+
if (usable(providerDefault)) return providerDefault;
|
|
2843
|
+
return FALLBACK_DEFAULT_MODEL_ID;
|
|
2844
|
+
}
|
|
2733
2845
|
function getAuthStorageKeys(provider, modelId) {
|
|
2734
2846
|
const model = getAllModels().find((m) => m.id === modelId && m.provider === provider);
|
|
2735
2847
|
return model?.authStorageKeys ?? [provider];
|
|
@@ -2811,7 +2923,7 @@ var SUMMARY_COST_TIER = {
|
|
|
2811
2923
|
};
|
|
2812
2924
|
function getSummaryModel(provider, currentModelId) {
|
|
2813
2925
|
const tier = SUMMARY_COST_TIER[provider];
|
|
2814
|
-
const tagged = tier ? getModelsForProvider(provider).find((m) => m.costTier === tier) : void 0;
|
|
2926
|
+
const tagged = tier ? getModelsForProvider(provider).find((m) => m.costTier === tier && m.billing === void 0) : void 0;
|
|
2815
2927
|
return tagged ?? getModel(currentModelId) ?? getDefaultModel(provider);
|
|
2816
2928
|
}
|
|
2817
2929
|
|
|
@@ -3217,20 +3329,40 @@ var AUTH_PROVIDERS = [
|
|
|
3217
3329
|
{
|
|
3218
3330
|
value: "anthropic",
|
|
3219
3331
|
label: "Anthropic",
|
|
3220
|
-
description: "Claude Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5",
|
|
3332
|
+
description: "Claude Fable 5.1, Opus 5.5, Opus 5.5 Fast, Sonnet 5.5, Haiku 5.5",
|
|
3221
3333
|
methods: ["oauth"]
|
|
3222
3334
|
},
|
|
3223
3335
|
{
|
|
3224
3336
|
value: "openai",
|
|
3225
3337
|
label: "OpenAI",
|
|
3226
|
-
description: "GPT-6 Astra, GPT-6.1 Sol, GPT-6 Luna",
|
|
3338
|
+
description: "GPT-6 Astra, GPT-6 Astra Fast, GPT-6.1 Sol, GPT-6.1 Sol Fast, GPT-6 Luna, GPT-6 Luna Fast",
|
|
3227
3339
|
methods: ["oauth"]
|
|
3228
3340
|
},
|
|
3229
3341
|
{
|
|
3230
3342
|
value: "gemini",
|
|
3231
3343
|
label: "Gemini",
|
|
3232
|
-
description: "Gemini 3.8 Flash, 3.5 Flash Lite, 3.
|
|
3233
|
-
methods: ["oauth"]
|
|
3344
|
+
description: "Gemini 3.8 Flash, 3.5 Flash Lite, 3.1 Flash Lite, 3.5 Flash, 3.1 Pro (Preview)",
|
|
3345
|
+
methods: ["oauth", "apikey"],
|
|
3346
|
+
apiKeyLabel: "Gemini",
|
|
3347
|
+
apiKeyBaseUrl: GEMINI_API_KEY_BASE_URL,
|
|
3348
|
+
// Stored under its own key so it never overwrites the `gemini` OAuth login.
|
|
3349
|
+
apiKeyVariants: [
|
|
3350
|
+
{ key: GEMINI_API_KEY, label: "Google AI Studio", baseUrl: GEMINI_API_KEY_BASE_URL }
|
|
3351
|
+
],
|
|
3352
|
+
methodDetails: {
|
|
3353
|
+
oauth: {
|
|
3354
|
+
method: "oauth",
|
|
3355
|
+
label: "Sign in with Google",
|
|
3356
|
+
billing: "Gemini Code Assist Standard or Enterprise licence.",
|
|
3357
|
+
when: "Personal Google accounts are no longer served here (Google ended it on June 18, 2026)."
|
|
3358
|
+
},
|
|
3359
|
+
apikey: {
|
|
3360
|
+
method: "apikey",
|
|
3361
|
+
label: "Gemini API key",
|
|
3362
|
+
billing: "Pay-per-token from a Google AI Studio key.",
|
|
3363
|
+
when: "Used first whenever it is set."
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3234
3366
|
},
|
|
3235
3367
|
{
|
|
3236
3368
|
value: "xai",
|
|
@@ -3360,6 +3492,9 @@ function describeAuthMethods(provider) {
|
|
|
3360
3492
|
});
|
|
3361
3493
|
}
|
|
3362
3494
|
function authPriorityNote(provider) {
|
|
3495
|
+
if (provider === "gemini") {
|
|
3496
|
+
return "Uses the Gemini API key first when one is set; otherwise the Google sign-in.";
|
|
3497
|
+
}
|
|
3363
3498
|
const dual = dualAuthProvider(provider);
|
|
3364
3499
|
if (!dual) return void 0;
|
|
3365
3500
|
return `Uses ${dual.oauthLabel} first; the ${dual.apiKeyLabel} takes over when it runs out, then switches back.`;
|
|
@@ -4106,6 +4241,8 @@ function createAutoUpdater(config) {
|
|
|
4106
4241
|
DEFAULT_LOCAL_ENDPOINTS,
|
|
4107
4242
|
DEFAULT_MAX_VIDEO_BYTES,
|
|
4108
4243
|
FALLBACK_CONTEXT_WINDOW,
|
|
4244
|
+
GEMINI_API_KEY,
|
|
4245
|
+
GEMINI_API_KEY_BASE_URL,
|
|
4109
4246
|
LOCAL_API_KEY_PLACEHOLDER,
|
|
4110
4247
|
LOCAL_AUTH_KEY_PREFIX,
|
|
4111
4248
|
MODELS,
|
|
@@ -4160,6 +4297,7 @@ function createAutoUpdater(config) {
|
|
|
4160
4297
|
isLocalModelId,
|
|
4161
4298
|
isLoggerOpen,
|
|
4162
4299
|
isModelLoaded,
|
|
4300
|
+
isPaidModel,
|
|
4163
4301
|
isThinkingLevelSupported,
|
|
4164
4302
|
kimiCodeBaseUrl,
|
|
4165
4303
|
kimiCodingHeaders,
|
|
@@ -4188,6 +4326,7 @@ function createAutoUpdater(config) {
|
|
|
4188
4326
|
toModelInfo,
|
|
4189
4327
|
transcribeVoice,
|
|
4190
4328
|
usesOpenAICodexTransport,
|
|
4191
|
-
withFileLock
|
|
4329
|
+
withFileLock,
|
|
4330
|
+
withoutPaidTier
|
|
4192
4331
|
});
|
|
4193
4332
|
//# sourceMappingURL=index.cjs.map
|