@kenkaiiii/gg-core 5.108.0 → 6.0.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.
@@ -119,6 +119,7 @@ function isHiddenProvider(provider) {
119
119
  // src/auth-storage.ts
120
120
  var import_gg_ai3 = require("@kenkaiiii/gg-ai");
121
121
  var KIMI_CODE_KEY = "kimi-code";
122
+ var GLM_CODING_PLAN_KEY = "glm-coding";
122
123
  var XIAOMI_CREDITS_KEY = "xiaomi-credits";
123
124
  var GEMINI_API_KEY = "gemini-api";
124
125
  var LOCAL_CREDENTIAL_LIFETIME_MS = 100 * 365 * 24 * 60 * 60 * 1e3;
@@ -151,6 +152,7 @@ var CODEX_FAST_BILLING = {
151
152
  };
152
153
  var GEMINI_AUTH_KEYS = [GEMINI_API_KEY];
153
154
  var KIMI_AUTH_KEYS = [KIMI_CODE_KEY, "moonshot"];
155
+ var GLM_AUTH_KEYS = [GLM_CODING_PLAN_KEY, "glm"];
154
156
  var MODELS = [
155
157
  // ── Anthropic ──────────────────────────────────────────
156
158
  // NOTE: Claude Mythos 5.2 (`claude-mythos-5-2`, 2026-11-09) is kept commented
@@ -736,12 +738,29 @@ var MODELS = [
736
738
  authStorageKeys: KIMI_AUTH_KEYS
737
739
  },
738
740
  // ── Z.AI (GLM) ─────────────────────────────────────────
739
- // Two GLM entries, both live on the coding endpoint (verified against its
741
+ // All GLM entries are live on the coding endpoint (verified against its
740
742
  // /models list). The pre-5.3 ids stay retired: they routed to strictly worse
741
743
  // coding for the same plan quota, and the endpoint already answers `glm-5.2`
742
744
  // requests as glm-5.3.
743
745
  // `max` is both the ceiling and Z.AI's own default — the rungs below it live
744
746
  // in thinking-level.ts.
747
+ // GLM-5.4 (released 2026-11) runs on a Coding Plan key only: the standard
748
+ // endpoint answers "You do not have permission to access glm-5.4". Images
749
+ // are native (verified: base64 PNG read back exactly), so its attachments go
750
+ // inline rather than through the zai_vision MCP that 5.3 still needs.
751
+ {
752
+ id: "glm-5.4",
753
+ name: "GLM-5.4",
754
+ provider: "glm",
755
+ contextWindow: 1e6,
756
+ maxOutputTokens: 131072,
757
+ supportsThinking: true,
758
+ supportsImages: true,
759
+ supportsVideo: false,
760
+ costTier: "medium",
761
+ maxThinkingLevel: "max",
762
+ authStorageKeys: [GLM_CODING_PLAN_KEY]
763
+ },
745
764
  {
746
765
  id: "glm-5.3",
747
766
  name: "GLM-5.3",
@@ -752,7 +771,13 @@ var MODELS = [
752
771
  supportsImages: false,
753
772
  supportsVideo: false,
754
773
  costTier: "medium",
755
- maxThinkingLevel: "max"
774
+ maxThinkingLevel: "max",
775
+ // The Coding Plan endpoint stopped serving 5.3 when 5.4 landed ("Invalid
776
+ // API parameter" on a bare request, 2026-11-23); the standard endpoint still does.
777
+ authStorageKeys: ["glm"],
778
+ // Same day, 5.3's ladder shrank: medium/xhigh and thinking-off now 400 with
779
+ // "always engages in thinking … please use low, high, or max".
780
+ thinkingLevels: ["low", "high", "max"]
756
781
  },
757
782
  // GLM-5.3-Flash (released 2026-08-26): 320B-A18B natively multimodal sibling
758
783
  // at ~1/20th of 5.3's API price with 3× the coding-plan quota, so it is the
@@ -776,7 +801,8 @@ var MODELS = [
776
801
  supportsImages: true,
777
802
  supportsVideo: false,
778
803
  costTier: "low",
779
- maxThinkingLevel: "max"
804
+ maxThinkingLevel: "max",
805
+ authStorageKeys: GLM_AUTH_KEYS
780
806
  },
781
807
  // ── MiniMax ────────────────────────────────────────────
782
808
  {
@@ -1163,7 +1189,7 @@ var DEFAULT_MODEL_IDS = {
1163
1189
  xiaomi: "mimo-v2.6-pro",
1164
1190
  openai: "gpt-6.2-sol",
1165
1191
  gemini: "gemini-3.1-flash-lite",
1166
- glm: "glm-5.3",
1192
+ glm: "glm-5.4",
1167
1193
  moonshot: "kimi-k3",
1168
1194
  minimax: "MiniMax-M3.1-Flash",
1169
1195
  deepseek: "deepseek-v4-pro",