@kenkaiiii/gg-core 5.64.3 → 5.65.1

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.
@@ -1751,7 +1751,14 @@ var AuthStorage = class {
1751
1751
  if (opts?.storageKeys && !(opts.storageKeys.length === 1 && opts.storageKeys[0] === provider)) {
1752
1752
  for (const key of opts.storageKeys) {
1753
1753
  const creds2 = this.data[key];
1754
- if (creds2) return creds2;
1754
+ if (!creds2) continue;
1755
+ if (key !== provider && dualAuthProviderByOAuthKey(key)) {
1756
+ return await this.resolveCredentials(key, {
1757
+ ...opts.forceRefresh ? { forceRefresh: true } : {},
1758
+ ...opts.rejectedToken !== void 0 ? { rejectedToken: opts.rejectedToken } : {}
1759
+ });
1760
+ }
1761
+ return creds2;
1755
1762
  }
1756
1763
  throw new NotLoggedInError(provider);
1757
1764
  }
@@ -2042,10 +2049,12 @@ var MODELS = [
2042
2049
  },
2043
2050
  // ── Sakana (Fugu) ──────────────────────────────────────
2044
2051
  // Sakana Fugu is a multi-agent system surfaced as a standard LLM via the
2045
- // OpenAI-compatible Sakana API (https://api.sakana.ai/v1). Both models take
2046
- // text + image input. Plain Fugu stops at xhigh; Ultra v1.1 also supports max.
2047
- // `fugu` routes across all providers; `fugu-ultra` is
2048
- // the heavier tier (may need larger client timeouts on complex tasks).
2052
+ // OpenAI-compatible Sakana API (https://api.sakana.ai/v1). All three take
2053
+ // text + image input (verified against the live /models list, 2026-09-28).
2054
+ // `fugu` balances latency and quality; `fugu-max` (v1.0, 2026-09-11) is the
2055
+ // cost tier over the largest open-weight pool ($2/$6 per 1M); `fugu-ultra`
2056
+ // is the heavier quality tier (may need larger client timeouts). Plain Fugu
2057
+ // and Fugu Max stop at xhigh — Sakana documents max as the same effort there.
2049
2058
  {
2050
2059
  id: "fugu",
2051
2060
  name: "Fugu",
@@ -2058,6 +2067,18 @@ var MODELS = [
2058
2067
  costTier: "medium",
2059
2068
  maxThinkingLevel: "xhigh"
2060
2069
  },
2070
+ {
2071
+ id: "fugu-max",
2072
+ name: "Fugu Max",
2073
+ provider: "sakana",
2074
+ contextWindow: 1e6,
2075
+ maxOutputTokens: 128e3,
2076
+ supportsThinking: true,
2077
+ supportsImages: true,
2078
+ supportsVideo: false,
2079
+ costTier: "medium",
2080
+ maxThinkingLevel: "xhigh"
2081
+ },
2061
2082
  {
2062
2083
  id: "fugu-ultra",
2063
2084
  name: "Fugu Ultra",
@@ -2068,7 +2089,7 @@ var MODELS = [
2068
2089
  supportsImages: true,
2069
2090
  supportsVideo: false,
2070
2091
  costTier: "high",
2071
- // The rolling alias now serves v1.1, which adds a distinct max effort.
2092
+ // The rolling alias now serves v2.0 (2026-09-11), which keeps max effort.
2072
2093
  maxThinkingLevel: "max"
2073
2094
  },
2074
2095
  // ── xAI (Grok) ─────────────────────────────────────────
@@ -2212,7 +2233,27 @@ var MODELS = [
2212
2233
  costTier: "high",
2213
2234
  maxThinkingLevel: "max"
2214
2235
  },
2215
- // Retain the cheaper dedicated coding model as an explicit alternative.
2236
+ // K2.8 Preview (2026-09-11) is served only on the Kimi For Coding OAuth
2237
+ // endpoint, under its rolling `kimi-for-coding` id (live /models, 2026-09-28:
2238
+ // display_name "K2.8 Preview", 1M context, image + video input, efforts
2239
+ // low/high/max default max). The public API-key endpoint does not serve it,
2240
+ // so it resolves from the Kimi sign-in credential only.
2241
+ {
2242
+ id: "kimi-for-coding",
2243
+ name: "Kimi K2.8 Preview",
2244
+ provider: "moonshot",
2245
+ contextWindow: 1048576,
2246
+ maxOutputTokens: 131072,
2247
+ supportsThinking: true,
2248
+ supportsImages: true,
2249
+ supportsVideo: true,
2250
+ maxVideoBytes: 100 * 1024 * 1024,
2251
+ costTier: "medium",
2252
+ maxThinkingLevel: "max",
2253
+ authStorageKeys: [MOONSHOT_OAUTH_KEY]
2254
+ },
2255
+ // K2.7 Code is requested by its pinned id (not the `kimi-for-coding` alias
2256
+ // that moved to K2.8), so it stays the real K2.7 on both endpoints.
2216
2257
  {
2217
2258
  id: "kimi-k2.7-code",
2218
2259
  name: "Kimi K2.7 Code",
@@ -2343,10 +2384,14 @@ var MODELS = [
2343
2384
  authStorageKeys: [XIAOMI_CREDITS_KEY]
2344
2385
  },
2345
2386
  // ── DeepSeek ───────────────────────────────────────────
2387
+ // The live /models list (2026-09-28) serves exactly `deepseek-flash` and
2388
+ // `deepseek-v4-pro`. V4 Flash and V4 Flash Vision Exp are retired; their old
2389
+ // ids only temporarily route to V4.1 Flash, so they are retired here too.
2346
2390
  {
2347
2391
  // `deepseek-v4-pro` now serves DeepSeek-V4-Pro-0813 (released 2026-08-13,
2348
2392
  // first STABLE V4 Pro — supersedes the April preview; calling name
2349
2393
  // unchanged, same 1.6T/49B MoE). 1M context, text-only, low/high/max effort.
2394
+ // DeepSeek reversed its planned 2026-09-14 retirement, so it stays served.
2350
2395
  // Docs abbreviate output as 384K; use the same conservative 384,000-token
2351
2396
  // application cap across V4 models rather than mixing decimal/binary units.
2352
2397
  id: "deepseek-v4-pro",
@@ -2361,21 +2406,10 @@ var MODELS = [
2361
2406
  maxThinkingLevel: "max"
2362
2407
  },
2363
2408
  {
2364
- id: "deepseek-v4-flash",
2365
- name: "DeepSeek V4 Flash",
2366
- provider: "deepseek",
2367
- contextWindow: 1048576,
2368
- maxOutputTokens: 384e3,
2369
- supportsThinking: true,
2370
- supportsImages: false,
2371
- supportsVideo: false,
2372
- costTier: "low",
2373
- maxThinkingLevel: "max"
2374
- },
2375
- // Opt-in experimental vision sibling; never replaces the stable summary model.
2376
- {
2377
- id: "deepseek-v4-flash-vision-exp",
2378
- name: "DeepSeek V4 Flash Vision (Experimental)",
2409
+ // `deepseek-flash` is the rolling alias for the latest Flash — currently
2410
+ // V4.1 Flash (2026-09-10): native image input, 1M context, 384K output.
2411
+ id: "deepseek-flash",
2412
+ name: "DeepSeek V4.1 Flash",
2379
2413
  provider: "deepseek",
2380
2414
  contextWindow: 1048576,
2381
2415
  maxOutputTokens: 384e3,
@@ -2387,11 +2421,13 @@ var MODELS = [
2387
2421
  },
2388
2422
  // ── OpenRouter ─────────────────────────────────────────
2389
2423
  {
2390
- id: "qwen/qwen3.6-plus",
2391
- name: "Qwen3.6-Plus",
2424
+ // Qwen3.8 Max — Alibaba's flagship (live /endpoints, 2026-09-28): 1M
2425
+ // context, 131,072 output, text + image + video input, reasoning on.
2426
+ id: "qwen/qwen3.8-max",
2427
+ name: "Qwen3.8 Max",
2392
2428
  provider: "openrouter",
2393
2429
  contextWindow: 1e6,
2394
- maxOutputTokens: 65536,
2430
+ maxOutputTokens: 131072,
2395
2431
  supportsThinking: true,
2396
2432
  supportsImages: true,
2397
2433
  supportsVideo: true,
@@ -2485,7 +2521,7 @@ function getDefaultModel(provider) {
2485
2521
  if (provider === "deepseek") return MODELS.find((m) => m.id === "deepseek-v4-pro");
2486
2522
  if (provider === "huggingface")
2487
2523
  return MODELS.find((m) => m.id === "Qwen/Qwen3-Coder-480B-A35B-Instruct");
2488
- if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.6-plus");
2524
+ if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.8-max");
2489
2525
  if (provider === "sakana") return MODELS.find((m) => m.id === "fugu");
2490
2526
  if (provider === "xai") return MODELS.find((m) => m.id === "grok-4.7");
2491
2527
  if (provider === "local") {
@@ -2599,4 +2635,4 @@ export {
2599
2635
  getSummaryModel,
2600
2636
  getFastModel
2601
2637
  };
2602
- //# sourceMappingURL=chunk-WXKRLK5P.js.map
2638
+ //# sourceMappingURL=chunk-PLJE3KJA.js.map