@kenkaiiii/gg-core 4.13.3 → 4.14.1

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.js CHANGED
@@ -9,13 +9,14 @@ import {
9
9
  getSummaryModel,
10
10
  getVideoByteLimit,
11
11
  usesOpenAICodexTransport
12
- } from "./chunk-RVK5N64M.js";
12
+ } from "./chunk-7GQQLIPG.js";
13
13
  import {
14
14
  getAppPaths
15
15
  } from "./chunk-KQJNZC6A.js";
16
16
 
17
17
  // src/thinking-level.ts
18
18
  var OPENAI_GPT_THINKING_LEVELS = ["medium", "high", "xhigh"];
19
+ var SAKANA_THINKING_LEVELS = ["high", "xhigh"];
19
20
  var ANTHROPIC_OPUS_48_47_THINKING_LEVELS = [
20
21
  "low",
21
22
  "medium",
@@ -32,6 +33,9 @@ var ANTHROPIC_ADAPTIVE_THINKING_LEVELS = [
32
33
  function isOpenAIGptModel(provider, model) {
33
34
  return provider === "openai" && model.startsWith("gpt-");
34
35
  }
36
+ function isSakanaModel(provider) {
37
+ return provider === "sakana";
38
+ }
35
39
  function isAnthropicOpus48Or47Model(provider, model) {
36
40
  return provider === "anthropic" && /opus-4-8|opus-4-7/.test(model);
37
41
  }
@@ -46,6 +50,11 @@ function getSupportedThinkingLevels(provider, model) {
46
50
  if (maxIndex2 === -1) return ["low", "medium", "high"];
47
51
  return levels.slice(0, maxIndex2 + 1);
48
52
  }
53
+ if (isSakanaModel(provider)) {
54
+ const maxIndex2 = SAKANA_THINKING_LEVELS.indexOf(maxLevel);
55
+ if (maxIndex2 === -1) return SAKANA_THINKING_LEVELS;
56
+ return SAKANA_THINKING_LEVELS.slice(0, maxIndex2 + 1);
57
+ }
49
58
  if (!isOpenAIGptModel(provider, model)) return [maxLevel];
50
59
  const maxIndex = OPENAI_GPT_THINKING_LEVELS.indexOf(maxLevel);
51
60
  if (maxIndex === -1) return ["medium"];
@@ -56,7 +65,7 @@ function isThinkingLevelSupported(provider, model, level) {
56
65
  }
57
66
  function getNextThinkingLevel(provider, model, current) {
58
67
  const supportedLevels = getSupportedThinkingLevels(provider, model);
59
- const shouldCycleLevels = isOpenAIGptModel(provider, model) || isAnthropicAdaptiveModel(provider, model);
68
+ const shouldCycleLevels = isOpenAIGptModel(provider, model) || isAnthropicAdaptiveModel(provider, model) || isSakanaModel(provider);
60
69
  if (!shouldCycleLevels) {
61
70
  return current ? void 0 : supportedLevels[0];
62
71
  }
@@ -1180,7 +1189,8 @@ var STATIC_API_KEY_PROVIDERS = /* @__PURE__ */ new Set([
1180
1189
  "xiaomi",
1181
1190
  "minimax",
1182
1191
  "deepseek",
1183
- "openrouter"
1192
+ "openrouter",
1193
+ "sakana"
1184
1194
  ]);
1185
1195
  var AuthStorage = class {
1186
1196
  data = {};