@prestyj/core 5.12.0 → 5.13.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-234BODO4.js → chunk-S6QBRJ4D.js} +12 -43
- package/dist/{chunk-234BODO4.js.map → chunk-S6QBRJ4D.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
|
@@ -2304,11 +2304,16 @@ var MODELS = [
|
|
|
2304
2304
|
maxThinkingLevel: "high"
|
|
2305
2305
|
},
|
|
2306
2306
|
// ── Z.AI (GLM) ─────────────────────────────────────────
|
|
2307
|
-
// GLM-5.
|
|
2308
|
-
//
|
|
2307
|
+
// GLM-5.3 is the only GLM entry: it supersedes 5.2 (same GLM-5 base, all
|
|
2308
|
+
// gains from post-training) and the coding endpoint already answers
|
|
2309
|
+
// `glm-5.2` requests as glm-5.3, so the older ids were menu clutter that
|
|
2310
|
+
// routed to strictly worse coding for the same plan quota.
|
|
2311
|
+
// Released 2026-08-14; live on the coding endpoint (verified), while the
|
|
2312
|
+
// standard paas API is still "coming soon". `max` is both the ceiling and
|
|
2313
|
+
// Z.AI's own default — the rungs below it live in thinking-level.ts.
|
|
2309
2314
|
{
|
|
2310
|
-
id: "glm-5.
|
|
2311
|
-
name: "GLM-5.
|
|
2315
|
+
id: "glm-5.3",
|
|
2316
|
+
name: "GLM-5.3",
|
|
2312
2317
|
provider: "glm",
|
|
2313
2318
|
contextWindow: 1e6,
|
|
2314
2319
|
maxOutputTokens: 131072,
|
|
@@ -2316,43 +2321,7 @@ var MODELS = [
|
|
|
2316
2321
|
supportsImages: false,
|
|
2317
2322
|
supportsVideo: false,
|
|
2318
2323
|
costTier: "medium",
|
|
2319
|
-
maxThinkingLevel: "
|
|
2320
|
-
},
|
|
2321
|
-
{
|
|
2322
|
-
id: "glm-5.1",
|
|
2323
|
-
name: "GLM-5.1",
|
|
2324
|
-
provider: "glm",
|
|
2325
|
-
contextWindow: 204800,
|
|
2326
|
-
maxOutputTokens: 131072,
|
|
2327
|
-
supportsThinking: true,
|
|
2328
|
-
supportsImages: false,
|
|
2329
|
-
supportsVideo: false,
|
|
2330
|
-
costTier: "medium",
|
|
2331
|
-
maxThinkingLevel: "high"
|
|
2332
|
-
},
|
|
2333
|
-
{
|
|
2334
|
-
id: "glm-4.7",
|
|
2335
|
-
name: "GLM-4.7",
|
|
2336
|
-
provider: "glm",
|
|
2337
|
-
contextWindow: 2e5,
|
|
2338
|
-
maxOutputTokens: 131072,
|
|
2339
|
-
supportsThinking: true,
|
|
2340
|
-
supportsImages: false,
|
|
2341
|
-
supportsVideo: false,
|
|
2342
|
-
costTier: "low",
|
|
2343
|
-
maxThinkingLevel: "high"
|
|
2344
|
-
},
|
|
2345
|
-
{
|
|
2346
|
-
id: "glm-4.7-flash",
|
|
2347
|
-
name: "GLM-4.7 Flash",
|
|
2348
|
-
provider: "glm",
|
|
2349
|
-
contextWindow: 2e5,
|
|
2350
|
-
maxOutputTokens: 131072,
|
|
2351
|
-
supportsThinking: true,
|
|
2352
|
-
supportsImages: false,
|
|
2353
|
-
supportsVideo: false,
|
|
2354
|
-
costTier: "low",
|
|
2355
|
-
maxThinkingLevel: "high"
|
|
2324
|
+
maxThinkingLevel: "max"
|
|
2356
2325
|
},
|
|
2357
2326
|
// ── MiniMax ────────────────────────────────────────────
|
|
2358
2327
|
{
|
|
@@ -2497,7 +2466,7 @@ function getDefaultModel(provider) {
|
|
|
2497
2466
|
if (provider === "xiaomi") return MODELS.find((m) => m.id === "mimo-v2.5-pro");
|
|
2498
2467
|
if (provider === "openai") return MODELS.find((m) => m.id === "gpt-5.6-sol");
|
|
2499
2468
|
if (provider === "gemini") return MODELS.find((m) => m.id === "gemini-3.1-flash-lite");
|
|
2500
|
-
if (provider === "glm") return MODELS.find((m) => m.id === "glm-5.
|
|
2469
|
+
if (provider === "glm") return MODELS.find((m) => m.id === "glm-5.3");
|
|
2501
2470
|
if (provider === "moonshot") return MODELS.find((m) => m.id === "kimi-k3");
|
|
2502
2471
|
if (provider === "minimax") return MODELS.find((m) => m.id === "MiniMax-M3");
|
|
2503
2472
|
if (provider === "deepseek") return MODELS.find((m) => m.id === "deepseek-v4-pro");
|
|
@@ -2584,6 +2553,7 @@ var ANTHROPIC_ADAPTIVE_THINKING_LEVELS = [
|
|
|
2584
2553
|
"max"
|
|
2585
2554
|
];
|
|
2586
2555
|
var MOONSHOT_K3_THINKING_LEVELS = ["low", "high", "max"];
|
|
2556
|
+
var GLM_THINKING_LEVELS = ["low", "medium", "high", "xhigh", "max"];
|
|
2587
2557
|
var LOCAL_THINKING_LEVELS = ["low", "medium", "high", "max"];
|
|
2588
2558
|
function isOpenAIGptModel(provider, model) {
|
|
2589
2559
|
return provider === "openai" && model.startsWith("gpt-");
|
|
@@ -2597,6 +2567,9 @@ function isXaiModel(provider) {
|
|
|
2597
2567
|
function isMoonshotK3Model(provider, model) {
|
|
2598
2568
|
return provider === "moonshot" && model === "kimi-k3";
|
|
2599
2569
|
}
|
|
2570
|
+
function isGlmModel(provider) {
|
|
2571
|
+
return provider === "glm";
|
|
2572
|
+
}
|
|
2600
2573
|
function isAnthropicXhighModel(provider, model) {
|
|
2601
2574
|
return provider === "anthropic" && /opus-5|opus-4-8|opus-4-7/.test(model);
|
|
2602
2575
|
}
|
|
@@ -2628,6 +2601,11 @@ function getSupportedThinkingLevels(provider, model) {
|
|
|
2628
2601
|
return XAI_THINKING_LEVELS.slice(0, maxIndex2 + 1);
|
|
2629
2602
|
}
|
|
2630
2603
|
if (isMoonshotK3Model(provider, model)) return MOONSHOT_K3_THINKING_LEVELS;
|
|
2604
|
+
if (isGlmModel(provider)) {
|
|
2605
|
+
const maxIndex2 = GLM_THINKING_LEVELS.indexOf(maxLevel);
|
|
2606
|
+
if (maxIndex2 === -1) return GLM_THINKING_LEVELS;
|
|
2607
|
+
return GLM_THINKING_LEVELS.slice(0, maxIndex2 + 1);
|
|
2608
|
+
}
|
|
2631
2609
|
if (!isOpenAIGptModel(provider, model)) return [maxLevel];
|
|
2632
2610
|
const levels = model.startsWith("gpt-5.6-") ? OPENAI_GPT_56_THINKING_LEVELS : OPENAI_GPT_THINKING_LEVELS;
|
|
2633
2611
|
const maxIndex = levels.indexOf(maxLevel);
|
|
@@ -2639,7 +2617,7 @@ function isThinkingLevelSupported(provider, model, level) {
|
|
|
2639
2617
|
}
|
|
2640
2618
|
function getNextThinkingLevel(provider, model, current) {
|
|
2641
2619
|
const supportedLevels = getSupportedThinkingLevels(provider, model);
|
|
2642
|
-
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
|
|
2620
|
+
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
|
|
2643
2621
|
// low/medium/high on `reasoning_effort` (verified against 0.32) and the
|
|
2644
2622
|
// other OpenAI-compatible servers use the same three. A model that can't
|
|
2645
2623
|
// reason at all already has no supported levels, so it never gets here.
|