@kenkaiiii/gg-core 5.60.3 → 5.60.5

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/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,
@@ -2129,6 +2131,7 @@ var MODELS = [
2129
2131
  codexContextWindow: 272e3,
2130
2132
  maxOutputTokens: 128e3,
2131
2133
  supportsThinking: true,
2134
+ defaultThinkingLevel: "low",
2132
2135
  supportsImages: true,
2133
2136
  supportsVideo: false,
2134
2137
  costTier: "high",
@@ -2152,6 +2155,7 @@ var MODELS = [
2152
2155
  codexContextWindow: 272e3,
2153
2156
  maxOutputTokens: 128e3,
2154
2157
  supportsThinking: true,
2158
+ defaultThinkingLevel: "low",
2155
2159
  supportsImages: true,
2156
2160
  supportsVideo: false,
2157
2161
  costTier: "high",
@@ -2167,6 +2171,7 @@ var MODELS = [
2167
2171
  codexContextWindow: 272e3,
2168
2172
  maxOutputTokens: 128e3,
2169
2173
  supportsThinking: true,
2174
+ defaultThinkingLevel: "medium",
2170
2175
  supportsImages: true,
2171
2176
  supportsVideo: false,
2172
2177
  costTier: "medium",
@@ -2182,6 +2187,7 @@ var MODELS = [
2182
2187
  codexContextWindow: 272e3,
2183
2188
  maxOutputTokens: 128e3,
2184
2189
  supportsThinking: true,
2190
+ defaultThinkingLevel: "medium",
2185
2191
  supportsImages: true,
2186
2192
  supportsVideo: false,
2187
2193
  costTier: "low",
@@ -2676,7 +2682,7 @@ function getMaxThinkingLevel(modelId) {
2676
2682
  function getDefaultThinkingLevel(modelId, options) {
2677
2683
  const model = getModel(modelId);
2678
2684
  if (model?.id === "kimi-k3" && isKimiCodingEndpoint(options?.baseUrl)) return "high";
2679
- return model?.maxThinkingLevel ?? "high";
2685
+ return model?.defaultThinkingLevel ?? model?.maxThinkingLevel ?? "high";
2680
2686
  }
2681
2687
  function getSummaryModel(provider, currentModelId) {
2682
2688
  if (provider === "anthropic") {
@@ -2798,6 +2804,19 @@ function getNextThinkingLevel(provider, model, current) {
2798
2804
  if (index === -1) return supportedLevels[0];
2799
2805
  return supportedLevels[index + 1];
2800
2806
  }
2807
+ var PLAN_MODE_THINKING_CAP = "medium";
2808
+ var THINKING_LADDER = [
2809
+ "low",
2810
+ "medium",
2811
+ "high",
2812
+ "xhigh",
2813
+ "max",
2814
+ "ultra"
2815
+ ];
2816
+ function clampThinkingForPlanMode(level) {
2817
+ if (!level) return level;
2818
+ return THINKING_LADDER.indexOf(level) > THINKING_LADDER.indexOf(PLAN_MODE_THINKING_CAP) ? PLAN_MODE_THINKING_CAP : level;
2819
+ }
2801
2820
 
2802
2821
  // src/local-models.ts
2803
2822
  var DEFAULT_LOCAL_ENDPOINTS = [
@@ -3798,10 +3817,12 @@ function createAutoUpdater(config) {
3798
3817
  MODELS,
3799
3818
  MOONSHOT_OAUTH_KEY,
3800
3819
  NotLoggedInError,
3820
+ PLAN_MODE_THINKING_CAP,
3801
3821
  SubscriptionUsageError,
3802
3822
  TelegramBot,
3803
3823
  XAI_OAUTH_KEY,
3804
3824
  XIAOMI_CREDITS_KEY,
3825
+ clampThinkingForPlanMode,
3805
3826
  clearLocalDiscoveryCache,
3806
3827
  clearRuntimeModels,
3807
3828
  closeLogger,