@prestyj/core 5.17.0 → 5.20.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-LQNMFHK5.js → chunk-Z3QR45IX.js} +6 -2
- package/dist/{chunk-LQNMFHK5.js.map → chunk-Z3QR45IX.js.map} +1 -1
- package/dist/index.cjs +22 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/model-registry.cjs +5 -1
- package/dist/model-registry.cjs.map +1 -1
- package/dist/model-registry.d.cts +8 -0
- package/dist/model-registry.d.ts +8 -0
- package/dist/model-registry.js +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -39,10 +39,12 @@ __export(index_exports, {
|
|
|
39
39
|
MODELS: () => MODELS,
|
|
40
40
|
MOONSHOT_OAUTH_KEY: () => MOONSHOT_OAUTH_KEY,
|
|
41
41
|
NotLoggedInError: () => NotLoggedInError,
|
|
42
|
+
PLAN_MODE_THINKING_CAP: () => PLAN_MODE_THINKING_CAP,
|
|
42
43
|
SubscriptionUsageError: () => SubscriptionUsageError,
|
|
43
44
|
TelegramBot: () => TelegramBot,
|
|
44
45
|
XAI_OAUTH_KEY: () => XAI_OAUTH_KEY,
|
|
45
46
|
XIAOMI_CREDITS_KEY: () => XIAOMI_CREDITS_KEY,
|
|
47
|
+
clampThinkingForPlanMode: () => clampThinkingForPlanMode,
|
|
46
48
|
clearLocalDiscoveryCache: () => clearLocalDiscoveryCache,
|
|
47
49
|
clearRuntimeModels: () => clearRuntimeModels,
|
|
48
50
|
closeLogger: () => closeLogger,
|
|
@@ -2135,6 +2137,7 @@ var MODELS = [
|
|
|
2135
2137
|
codexContextWindow: 272e3,
|
|
2136
2138
|
maxOutputTokens: 128e3,
|
|
2137
2139
|
supportsThinking: true,
|
|
2140
|
+
defaultThinkingLevel: "low",
|
|
2138
2141
|
supportsImages: true,
|
|
2139
2142
|
supportsVideo: false,
|
|
2140
2143
|
costTier: "high",
|
|
@@ -2158,6 +2161,7 @@ var MODELS = [
|
|
|
2158
2161
|
codexContextWindow: 272e3,
|
|
2159
2162
|
maxOutputTokens: 128e3,
|
|
2160
2163
|
supportsThinking: true,
|
|
2164
|
+
defaultThinkingLevel: "low",
|
|
2161
2165
|
supportsImages: true,
|
|
2162
2166
|
supportsVideo: false,
|
|
2163
2167
|
costTier: "high",
|
|
@@ -2173,6 +2177,7 @@ var MODELS = [
|
|
|
2173
2177
|
codexContextWindow: 272e3,
|
|
2174
2178
|
maxOutputTokens: 128e3,
|
|
2175
2179
|
supportsThinking: true,
|
|
2180
|
+
defaultThinkingLevel: "medium",
|
|
2176
2181
|
supportsImages: true,
|
|
2177
2182
|
supportsVideo: false,
|
|
2178
2183
|
costTier: "medium",
|
|
@@ -2188,6 +2193,7 @@ var MODELS = [
|
|
|
2188
2193
|
codexContextWindow: 272e3,
|
|
2189
2194
|
maxOutputTokens: 128e3,
|
|
2190
2195
|
supportsThinking: true,
|
|
2196
|
+
defaultThinkingLevel: "medium",
|
|
2191
2197
|
supportsImages: true,
|
|
2192
2198
|
supportsVideo: false,
|
|
2193
2199
|
costTier: "low",
|
|
@@ -2682,7 +2688,7 @@ function getMaxThinkingLevel(modelId) {
|
|
|
2682
2688
|
function getDefaultThinkingLevel(modelId, options) {
|
|
2683
2689
|
const model = getModel(modelId);
|
|
2684
2690
|
if (model?.id === "kimi-k3" && isKimiCodingEndpoint(options?.baseUrl)) return "high";
|
|
2685
|
-
return model?.maxThinkingLevel ?? "high";
|
|
2691
|
+
return model?.defaultThinkingLevel ?? model?.maxThinkingLevel ?? "high";
|
|
2686
2692
|
}
|
|
2687
2693
|
function getSummaryModel(provider, currentModelId) {
|
|
2688
2694
|
if (provider === "anthropic") {
|
|
@@ -2804,6 +2810,19 @@ function getNextThinkingLevel(provider, model, current) {
|
|
|
2804
2810
|
if (index === -1) return supportedLevels[0];
|
|
2805
2811
|
return supportedLevels[index + 1];
|
|
2806
2812
|
}
|
|
2813
|
+
var PLAN_MODE_THINKING_CAP = "medium";
|
|
2814
|
+
var THINKING_LADDER = [
|
|
2815
|
+
"low",
|
|
2816
|
+
"medium",
|
|
2817
|
+
"high",
|
|
2818
|
+
"xhigh",
|
|
2819
|
+
"max",
|
|
2820
|
+
"ultra"
|
|
2821
|
+
];
|
|
2822
|
+
function clampThinkingForPlanMode(level) {
|
|
2823
|
+
if (!level) return level;
|
|
2824
|
+
return THINKING_LADDER.indexOf(level) > THINKING_LADDER.indexOf(PLAN_MODE_THINKING_CAP) ? PLAN_MODE_THINKING_CAP : level;
|
|
2825
|
+
}
|
|
2807
2826
|
|
|
2808
2827
|
// src/local-models.ts
|
|
2809
2828
|
var DEFAULT_LOCAL_ENDPOINTS = [
|
|
@@ -3804,10 +3823,12 @@ function createAutoUpdater(config) {
|
|
|
3804
3823
|
MODELS,
|
|
3805
3824
|
MOONSHOT_OAUTH_KEY,
|
|
3806
3825
|
NotLoggedInError,
|
|
3826
|
+
PLAN_MODE_THINKING_CAP,
|
|
3807
3827
|
SubscriptionUsageError,
|
|
3808
3828
|
TelegramBot,
|
|
3809
3829
|
XAI_OAUTH_KEY,
|
|
3810
3830
|
XIAOMI_CREDITS_KEY,
|
|
3831
|
+
clampThinkingForPlanMode,
|
|
3811
3832
|
clearLocalDiscoveryCache,
|
|
3812
3833
|
clearRuntimeModels,
|
|
3813
3834
|
closeLogger,
|