@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.
@@ -121,6 +121,7 @@ var import_promises2 = __toESM(require("fs/promises"), 1);
121
121
  var import_promises3 = require("timers/promises");
122
122
 
123
123
  // src/auth-storage.ts
124
+ var MOONSHOT_OAUTH_KEY = "moonshot-oauth";
124
125
  var XIAOMI_CREDITS_KEY = "xiaomi-credits";
125
126
  var LOCAL_CREDENTIAL_LIFETIME_MS = 100 * 365 * 24 * 60 * 60 * 1e3;
126
127
  var USAGE_EXHAUSTED_DEFAULT_MS = 15 * 60 * 1e3;
@@ -276,10 +277,12 @@ var MODELS = [
276
277
  },
277
278
  // ── Sakana (Fugu) ──────────────────────────────────────
278
279
  // Sakana Fugu is a multi-agent system surfaced as a standard LLM via the
279
- // OpenAI-compatible Sakana API (https://api.sakana.ai/v1). Both models take
280
- // text + image input. Plain Fugu stops at xhigh; Ultra v1.1 also supports max.
281
- // `fugu` routes across all providers; `fugu-ultra` is
282
- // the heavier tier (may need larger client timeouts on complex tasks).
280
+ // OpenAI-compatible Sakana API (https://api.sakana.ai/v1). All three take
281
+ // text + image input (verified against the live /models list, 2026-09-28).
282
+ // `fugu` balances latency and quality; `fugu-max` (v1.0, 2026-09-11) is the
283
+ // cost tier over the largest open-weight pool ($2/$6 per 1M); `fugu-ultra`
284
+ // is the heavier quality tier (may need larger client timeouts). Plain Fugu
285
+ // and Fugu Max stop at xhigh — Sakana documents max as the same effort there.
283
286
  {
284
287
  id: "fugu",
285
288
  name: "Fugu",
@@ -292,6 +295,18 @@ var MODELS = [
292
295
  costTier: "medium",
293
296
  maxThinkingLevel: "xhigh"
294
297
  },
298
+ {
299
+ id: "fugu-max",
300
+ name: "Fugu Max",
301
+ provider: "sakana",
302
+ contextWindow: 1e6,
303
+ maxOutputTokens: 128e3,
304
+ supportsThinking: true,
305
+ supportsImages: true,
306
+ supportsVideo: false,
307
+ costTier: "medium",
308
+ maxThinkingLevel: "xhigh"
309
+ },
295
310
  {
296
311
  id: "fugu-ultra",
297
312
  name: "Fugu Ultra",
@@ -302,7 +317,7 @@ var MODELS = [
302
317
  supportsImages: true,
303
318
  supportsVideo: false,
304
319
  costTier: "high",
305
- // The rolling alias now serves v1.1, which adds a distinct max effort.
320
+ // The rolling alias now serves v2.0 (2026-09-11), which keeps max effort.
306
321
  maxThinkingLevel: "max"
307
322
  },
308
323
  // ── xAI (Grok) ─────────────────────────────────────────
@@ -446,7 +461,27 @@ var MODELS = [
446
461
  costTier: "high",
447
462
  maxThinkingLevel: "max"
448
463
  },
449
- // Retain the cheaper dedicated coding model as an explicit alternative.
464
+ // K2.8 Preview (2026-09-11) is served only on the Kimi For Coding OAuth
465
+ // endpoint, under its rolling `kimi-for-coding` id (live /models, 2026-09-28:
466
+ // display_name "K2.8 Preview", 1M context, image + video input, efforts
467
+ // low/high/max default max). The public API-key endpoint does not serve it,
468
+ // so it resolves from the Kimi sign-in credential only.
469
+ {
470
+ id: "kimi-for-coding",
471
+ name: "Kimi K2.8 Preview",
472
+ provider: "moonshot",
473
+ contextWindow: 1048576,
474
+ maxOutputTokens: 131072,
475
+ supportsThinking: true,
476
+ supportsImages: true,
477
+ supportsVideo: true,
478
+ maxVideoBytes: 100 * 1024 * 1024,
479
+ costTier: "medium",
480
+ maxThinkingLevel: "max",
481
+ authStorageKeys: [MOONSHOT_OAUTH_KEY]
482
+ },
483
+ // K2.7 Code is requested by its pinned id (not the `kimi-for-coding` alias
484
+ // that moved to K2.8), so it stays the real K2.7 on both endpoints.
450
485
  {
451
486
  id: "kimi-k2.7-code",
452
487
  name: "Kimi K2.7 Code",
@@ -577,10 +612,14 @@ var MODELS = [
577
612
  authStorageKeys: [XIAOMI_CREDITS_KEY]
578
613
  },
579
614
  // ── DeepSeek ───────────────────────────────────────────
615
+ // The live /models list (2026-09-28) serves exactly `deepseek-flash` and
616
+ // `deepseek-v4-pro`. V4 Flash and V4 Flash Vision Exp are retired; their old
617
+ // ids only temporarily route to V4.1 Flash, so they are retired here too.
580
618
  {
581
619
  // `deepseek-v4-pro` now serves DeepSeek-V4-Pro-0813 (released 2026-08-13,
582
620
  // first STABLE V4 Pro — supersedes the April preview; calling name
583
621
  // unchanged, same 1.6T/49B MoE). 1M context, text-only, low/high/max effort.
622
+ // DeepSeek reversed its planned 2026-09-14 retirement, so it stays served.
584
623
  // Docs abbreviate output as 384K; use the same conservative 384,000-token
585
624
  // application cap across V4 models rather than mixing decimal/binary units.
586
625
  id: "deepseek-v4-pro",
@@ -595,21 +634,10 @@ var MODELS = [
595
634
  maxThinkingLevel: "max"
596
635
  },
597
636
  {
598
- id: "deepseek-v4-flash",
599
- name: "DeepSeek V4 Flash",
600
- provider: "deepseek",
601
- contextWindow: 1048576,
602
- maxOutputTokens: 384e3,
603
- supportsThinking: true,
604
- supportsImages: false,
605
- supportsVideo: false,
606
- costTier: "low",
607
- maxThinkingLevel: "max"
608
- },
609
- // Opt-in experimental vision sibling; never replaces the stable summary model.
610
- {
611
- id: "deepseek-v4-flash-vision-exp",
612
- name: "DeepSeek V4 Flash Vision (Experimental)",
637
+ // `deepseek-flash` is the rolling alias for the latest Flash — currently
638
+ // V4.1 Flash (2026-09-10): native image input, 1M context, 384K output.
639
+ id: "deepseek-flash",
640
+ name: "DeepSeek V4.1 Flash",
613
641
  provider: "deepseek",
614
642
  contextWindow: 1048576,
615
643
  maxOutputTokens: 384e3,
@@ -621,11 +649,13 @@ var MODELS = [
621
649
  },
622
650
  // ── OpenRouter ─────────────────────────────────────────
623
651
  {
624
- id: "qwen/qwen3.6-plus",
625
- name: "Qwen3.6-Plus",
652
+ // Qwen3.8 Max — Alibaba's flagship (live /endpoints, 2026-09-28): 1M
653
+ // context, 131,072 output, text + image + video input, reasoning on.
654
+ id: "qwen/qwen3.8-max",
655
+ name: "Qwen3.8 Max",
626
656
  provider: "openrouter",
627
657
  contextWindow: 1e6,
628
- maxOutputTokens: 65536,
658
+ maxOutputTokens: 131072,
629
659
  supportsThinking: true,
630
660
  supportsImages: true,
631
661
  supportsVideo: true,
@@ -719,7 +749,7 @@ function getDefaultModel(provider) {
719
749
  if (provider === "deepseek") return MODELS.find((m) => m.id === "deepseek-v4-pro");
720
750
  if (provider === "huggingface")
721
751
  return MODELS.find((m) => m.id === "Qwen/Qwen3-Coder-480B-A35B-Instruct");
722
- if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.6-plus");
752
+ if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.8-max");
723
753
  if (provider === "sakana") return MODELS.find((m) => m.id === "fugu");
724
754
  if (provider === "xai") return MODELS.find((m) => m.id === "grok-4.7");
725
755
  if (provider === "local") {