@kenkaiiii/gg-core 5.107.0 → 5.109.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-T367MVTP.js → chunk-GUZSZFVT.js} +36 -5
- package/dist/chunk-GUZSZFVT.js.map +1 -0
- package/dist/index.cjs +54 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +22 -4
- package/dist/index.js.map +1 -1
- package/dist/model-registry.cjs +30 -4
- package/dist/model-registry.cjs.map +1 -1
- package/dist/model-registry.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-T367MVTP.js.map +0 -1
|
@@ -1438,6 +1438,8 @@ async function detectXiaomiTokenPlanBaseUrl(apiKey, options = {}) {
|
|
|
1438
1438
|
// src/auth-storage.ts
|
|
1439
1439
|
var OPENAI_CHATGPT_KEY = "openai-chatgpt";
|
|
1440
1440
|
var KIMI_CODE_KEY = "kimi-code";
|
|
1441
|
+
var GLM_CODING_PLAN_KEY = "glm-coding";
|
|
1442
|
+
var GLM_CODING_PLAN_BASE_URL = "https://api.z.ai/api/coding/paas/v4";
|
|
1441
1443
|
var RETIRED_SIGN_INS = [
|
|
1442
1444
|
{
|
|
1443
1445
|
provider: "anthropic",
|
|
@@ -1489,12 +1491,14 @@ function usableEntry(data, storageKey) {
|
|
|
1489
1491
|
function storageKeyProvider(storageKey) {
|
|
1490
1492
|
if (storageKey === OPENAI_CHATGPT_KEY) return "openai";
|
|
1491
1493
|
if (storageKey === KIMI_CODE_KEY) return "moonshot";
|
|
1494
|
+
if (storageKey === GLM_CODING_PLAN_KEY) return "glm";
|
|
1492
1495
|
if (storageKey === XIAOMI_CREDITS_KEY) return "xiaomi";
|
|
1493
1496
|
if (storageKey === GEMINI_API_KEY) return "gemini";
|
|
1494
1497
|
return storageKey;
|
|
1495
1498
|
}
|
|
1496
1499
|
function apiKeyStorageKeys(provider) {
|
|
1497
1500
|
if (provider === "moonshot") return [KIMI_CODE_KEY, "moonshot"];
|
|
1501
|
+
if (provider === "glm") return [GLM_CODING_PLAN_KEY, "glm"];
|
|
1498
1502
|
if (provider === "xiaomi") return ["xiaomi", XIAOMI_CREDITS_KEY];
|
|
1499
1503
|
if (provider === "gemini") return [GEMINI_API_KEY];
|
|
1500
1504
|
return [provider];
|
|
@@ -2189,6 +2193,7 @@ var CODEX_FAST_BILLING = {
|
|
|
2189
2193
|
};
|
|
2190
2194
|
var GEMINI_AUTH_KEYS = [GEMINI_API_KEY];
|
|
2191
2195
|
var KIMI_AUTH_KEYS = [KIMI_CODE_KEY, "moonshot"];
|
|
2196
|
+
var GLM_AUTH_KEYS = [GLM_CODING_PLAN_KEY, "glm"];
|
|
2192
2197
|
var MODELS = [
|
|
2193
2198
|
// ── Anthropic ──────────────────────────────────────────
|
|
2194
2199
|
// NOTE: Claude Mythos 5.2 (`claude-mythos-5-2`, 2026-11-09) is kept commented
|
|
@@ -2774,12 +2779,29 @@ var MODELS = [
|
|
|
2774
2779
|
authStorageKeys: KIMI_AUTH_KEYS
|
|
2775
2780
|
},
|
|
2776
2781
|
// ── Z.AI (GLM) ─────────────────────────────────────────
|
|
2777
|
-
//
|
|
2782
|
+
// All GLM entries are live on the coding endpoint (verified against its
|
|
2778
2783
|
// /models list). The pre-5.3 ids stay retired: they routed to strictly worse
|
|
2779
2784
|
// coding for the same plan quota, and the endpoint already answers `glm-5.2`
|
|
2780
2785
|
// requests as glm-5.3.
|
|
2781
2786
|
// `max` is both the ceiling and Z.AI's own default — the rungs below it live
|
|
2782
2787
|
// in thinking-level.ts.
|
|
2788
|
+
// GLM-5.4 (released 2026-11) runs on a Coding Plan key only: the standard
|
|
2789
|
+
// endpoint answers "You do not have permission to access glm-5.4". Images
|
|
2790
|
+
// are native (verified: base64 PNG read back exactly), so its attachments go
|
|
2791
|
+
// inline rather than through the zai_vision MCP that 5.3 still needs.
|
|
2792
|
+
{
|
|
2793
|
+
id: "glm-5.4",
|
|
2794
|
+
name: "GLM-5.4",
|
|
2795
|
+
provider: "glm",
|
|
2796
|
+
contextWindow: 1e6,
|
|
2797
|
+
maxOutputTokens: 131072,
|
|
2798
|
+
supportsThinking: true,
|
|
2799
|
+
supportsImages: true,
|
|
2800
|
+
supportsVideo: false,
|
|
2801
|
+
costTier: "medium",
|
|
2802
|
+
maxThinkingLevel: "max",
|
|
2803
|
+
authStorageKeys: [GLM_CODING_PLAN_KEY]
|
|
2804
|
+
},
|
|
2783
2805
|
{
|
|
2784
2806
|
id: "glm-5.3",
|
|
2785
2807
|
name: "GLM-5.3",
|
|
@@ -2790,7 +2812,13 @@ var MODELS = [
|
|
|
2790
2812
|
supportsImages: false,
|
|
2791
2813
|
supportsVideo: false,
|
|
2792
2814
|
costTier: "medium",
|
|
2793
|
-
maxThinkingLevel: "max"
|
|
2815
|
+
maxThinkingLevel: "max",
|
|
2816
|
+
// The Coding Plan endpoint stopped serving 5.3 when 5.4 landed ("Invalid
|
|
2817
|
+
// API parameter" on a bare request, 2026-11-23); the standard endpoint still does.
|
|
2818
|
+
authStorageKeys: ["glm"],
|
|
2819
|
+
// Same day, 5.3's ladder shrank: medium/xhigh and thinking-off now 400 with
|
|
2820
|
+
// "always engages in thinking … please use low, high, or max".
|
|
2821
|
+
thinkingLevels: ["low", "high", "max"]
|
|
2794
2822
|
},
|
|
2795
2823
|
// GLM-5.3-Flash (released 2026-08-26): 320B-A18B natively multimodal sibling
|
|
2796
2824
|
// at ~1/20th of 5.3's API price with 3× the coding-plan quota, so it is the
|
|
@@ -2814,7 +2842,8 @@ var MODELS = [
|
|
|
2814
2842
|
supportsImages: true,
|
|
2815
2843
|
supportsVideo: false,
|
|
2816
2844
|
costTier: "low",
|
|
2817
|
-
maxThinkingLevel: "max"
|
|
2845
|
+
maxThinkingLevel: "max",
|
|
2846
|
+
authStorageKeys: GLM_AUTH_KEYS
|
|
2818
2847
|
},
|
|
2819
2848
|
// ── MiniMax ────────────────────────────────────────────
|
|
2820
2849
|
{
|
|
@@ -3201,7 +3230,7 @@ var DEFAULT_MODEL_IDS = {
|
|
|
3201
3230
|
xiaomi: "mimo-v2.6-pro",
|
|
3202
3231
|
openai: "gpt-6.2-sol",
|
|
3203
3232
|
gemini: "gemini-3.1-flash-lite",
|
|
3204
|
-
glm: "glm-5.
|
|
3233
|
+
glm: "glm-5.4",
|
|
3205
3234
|
moonshot: "kimi-k3",
|
|
3206
3235
|
minimax: "MiniMax-M3.1-Flash",
|
|
3207
3236
|
deepseek: "deepseek-v4-pro",
|
|
@@ -3324,6 +3353,8 @@ export {
|
|
|
3324
3353
|
detectXiaomiTokenPlanBaseUrl,
|
|
3325
3354
|
OPENAI_CHATGPT_KEY,
|
|
3326
3355
|
KIMI_CODE_KEY,
|
|
3356
|
+
GLM_CODING_PLAN_KEY,
|
|
3357
|
+
GLM_CODING_PLAN_BASE_URL,
|
|
3327
3358
|
RETIRED_SIGN_INS,
|
|
3328
3359
|
storageKeyProvider,
|
|
3329
3360
|
apiKeyStorageKeys,
|
|
@@ -3361,4 +3392,4 @@ export {
|
|
|
3361
3392
|
getDefaultThinkingLevel,
|
|
3362
3393
|
getSummaryModel
|
|
3363
3394
|
};
|
|
3364
|
-
//# sourceMappingURL=chunk-
|
|
3395
|
+
//# sourceMappingURL=chunk-GUZSZFVT.js.map
|