@kenkaiiii/gg-core 5.43.0 → 5.44.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-JH7OVHH5.js → chunk-CP2WHB57.js} +12 -43
- package/dist/{chunk-JH7OVHH5.js.map → chunk-CP2WHB57.js.map} +1 -1
- package/dist/index.cjs +21 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/model-registry.cjs +11 -42
- package/dist/model-registry.cjs.map +1 -1
- package/dist/model-registry.d.cts +4 -5
- package/dist/model-registry.d.ts +4 -5
- package/dist/model-registry.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2298,11 +2298,16 @@ var MODELS = [
|
|
|
2298
2298
|
maxThinkingLevel: "high"
|
|
2299
2299
|
},
|
|
2300
2300
|
// ── Z.AI (GLM) ─────────────────────────────────────────
|
|
2301
|
-
// GLM-5.
|
|
2302
|
-
//
|
|
2301
|
+
// GLM-5.3 is the only GLM entry: it supersedes 5.2 (same GLM-5 base, all
|
|
2302
|
+
// gains from post-training) and the coding endpoint already answers
|
|
2303
|
+
// `glm-5.2` requests as glm-5.3, so the older ids were menu clutter that
|
|
2304
|
+
// routed to strictly worse coding for the same plan quota.
|
|
2305
|
+
// Released 2026-08-14; live on the coding endpoint (verified), while the
|
|
2306
|
+
// standard paas API is still "coming soon". `max` is both the ceiling and
|
|
2307
|
+
// Z.AI's own default — the rungs below it live in thinking-level.ts.
|
|
2303
2308
|
{
|
|
2304
|
-
id: "glm-5.
|
|
2305
|
-
name: "GLM-5.
|
|
2309
|
+
id: "glm-5.3",
|
|
2310
|
+
name: "GLM-5.3",
|
|
2306
2311
|
provider: "glm",
|
|
2307
2312
|
contextWindow: 1e6,
|
|
2308
2313
|
maxOutputTokens: 131072,
|
|
@@ -2310,43 +2315,7 @@ var MODELS = [
|
|
|
2310
2315
|
supportsImages: false,
|
|
2311
2316
|
supportsVideo: false,
|
|
2312
2317
|
costTier: "medium",
|
|
2313
|
-
maxThinkingLevel: "
|
|
2314
|
-
},
|
|
2315
|
-
{
|
|
2316
|
-
id: "glm-5.1",
|
|
2317
|
-
name: "GLM-5.1",
|
|
2318
|
-
provider: "glm",
|
|
2319
|
-
contextWindow: 204800,
|
|
2320
|
-
maxOutputTokens: 131072,
|
|
2321
|
-
supportsThinking: true,
|
|
2322
|
-
supportsImages: false,
|
|
2323
|
-
supportsVideo: false,
|
|
2324
|
-
costTier: "medium",
|
|
2325
|
-
maxThinkingLevel: "high"
|
|
2326
|
-
},
|
|
2327
|
-
{
|
|
2328
|
-
id: "glm-4.7",
|
|
2329
|
-
name: "GLM-4.7",
|
|
2330
|
-
provider: "glm",
|
|
2331
|
-
contextWindow: 2e5,
|
|
2332
|
-
maxOutputTokens: 131072,
|
|
2333
|
-
supportsThinking: true,
|
|
2334
|
-
supportsImages: false,
|
|
2335
|
-
supportsVideo: false,
|
|
2336
|
-
costTier: "low",
|
|
2337
|
-
maxThinkingLevel: "high"
|
|
2338
|
-
},
|
|
2339
|
-
{
|
|
2340
|
-
id: "glm-4.7-flash",
|
|
2341
|
-
name: "GLM-4.7 Flash",
|
|
2342
|
-
provider: "glm",
|
|
2343
|
-
contextWindow: 2e5,
|
|
2344
|
-
maxOutputTokens: 131072,
|
|
2345
|
-
supportsThinking: true,
|
|
2346
|
-
supportsImages: false,
|
|
2347
|
-
supportsVideo: false,
|
|
2348
|
-
costTier: "low",
|
|
2349
|
-
maxThinkingLevel: "high"
|
|
2318
|
+
maxThinkingLevel: "max"
|
|
2350
2319
|
},
|
|
2351
2320
|
// ── MiniMax ────────────────────────────────────────────
|
|
2352
2321
|
{
|
|
@@ -2491,7 +2460,7 @@ function getDefaultModel(provider) {
|
|
|
2491
2460
|
if (provider === "xiaomi") return MODELS.find((m) => m.id === "mimo-v2.5-pro");
|
|
2492
2461
|
if (provider === "openai") return MODELS.find((m) => m.id === "gpt-5.6-sol");
|
|
2493
2462
|
if (provider === "gemini") return MODELS.find((m) => m.id === "gemini-3.1-flash-lite");
|
|
2494
|
-
if (provider === "glm") return MODELS.find((m) => m.id === "glm-5.
|
|
2463
|
+
if (provider === "glm") return MODELS.find((m) => m.id === "glm-5.3");
|
|
2495
2464
|
if (provider === "moonshot") return MODELS.find((m) => m.id === "kimi-k3");
|
|
2496
2465
|
if (provider === "minimax") return MODELS.find((m) => m.id === "MiniMax-M3");
|
|
2497
2466
|
if (provider === "deepseek") return MODELS.find((m) => m.id === "deepseek-v4-pro");
|
|
@@ -2578,6 +2547,7 @@ var ANTHROPIC_ADAPTIVE_THINKING_LEVELS = [
|
|
|
2578
2547
|
"max"
|
|
2579
2548
|
];
|
|
2580
2549
|
var MOONSHOT_K3_THINKING_LEVELS = ["low", "high", "max"];
|
|
2550
|
+
var GLM_THINKING_LEVELS = ["low", "medium", "high", "xhigh", "max"];
|
|
2581
2551
|
var LOCAL_THINKING_LEVELS = ["low", "medium", "high", "max"];
|
|
2582
2552
|
function isOpenAIGptModel(provider, model) {
|
|
2583
2553
|
return provider === "openai" && model.startsWith("gpt-");
|
|
@@ -2591,6 +2561,9 @@ function isXaiModel(provider) {
|
|
|
2591
2561
|
function isMoonshotK3Model(provider, model) {
|
|
2592
2562
|
return provider === "moonshot" && model === "kimi-k3";
|
|
2593
2563
|
}
|
|
2564
|
+
function isGlmModel(provider) {
|
|
2565
|
+
return provider === "glm";
|
|
2566
|
+
}
|
|
2594
2567
|
function isAnthropicXhighModel(provider, model) {
|
|
2595
2568
|
return provider === "anthropic" && /opus-5|opus-4-8|opus-4-7/.test(model);
|
|
2596
2569
|
}
|
|
@@ -2622,6 +2595,11 @@ function getSupportedThinkingLevels(provider, model) {
|
|
|
2622
2595
|
return XAI_THINKING_LEVELS.slice(0, maxIndex2 + 1);
|
|
2623
2596
|
}
|
|
2624
2597
|
if (isMoonshotK3Model(provider, model)) return MOONSHOT_K3_THINKING_LEVELS;
|
|
2598
|
+
if (isGlmModel(provider)) {
|
|
2599
|
+
const maxIndex2 = GLM_THINKING_LEVELS.indexOf(maxLevel);
|
|
2600
|
+
if (maxIndex2 === -1) return GLM_THINKING_LEVELS;
|
|
2601
|
+
return GLM_THINKING_LEVELS.slice(0, maxIndex2 + 1);
|
|
2602
|
+
}
|
|
2625
2603
|
if (!isOpenAIGptModel(provider, model)) return [maxLevel];
|
|
2626
2604
|
const levels = model.startsWith("gpt-5.6-") ? OPENAI_GPT_56_THINKING_LEVELS : OPENAI_GPT_THINKING_LEVELS;
|
|
2627
2605
|
const maxIndex = levels.indexOf(maxLevel);
|
|
@@ -2633,7 +2611,7 @@ function isThinkingLevelSupported(provider, model, level) {
|
|
|
2633
2611
|
}
|
|
2634
2612
|
function getNextThinkingLevel(provider, model, current) {
|
|
2635
2613
|
const supportedLevels = getSupportedThinkingLevels(provider, model);
|
|
2636
|
-
const shouldCycleLevels = isOpenAIGptModel(provider, model) || isAnthropicAdaptiveModel(provider, model) || isSakanaModel(provider) || isXaiModel(provider) || isMoonshotK3Model(provider, model) || // Local servers take a real effort level, not just on/off: Ollama accepts
|
|
2614
|
+
const shouldCycleLevels = isOpenAIGptModel(provider, model) || isAnthropicAdaptiveModel(provider, model) || isSakanaModel(provider) || isXaiModel(provider) || isMoonshotK3Model(provider, model) || isGlmModel(provider) || // Local servers take a real effort level, not just on/off: Ollama accepts
|
|
2637
2615
|
// low/medium/high on `reasoning_effort` (verified against 0.32) and the
|
|
2638
2616
|
// other OpenAI-compatible servers use the same three. A model that can't
|
|
2639
2617
|
// reason at all already has no supported levels, so it never gets here.
|