@kenkaiiii/gg-ai 5.10.1 → 5.11.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/index.d.cts CHANGED
@@ -3,7 +3,7 @@ import Anthropic from '@anthropic-ai/sdk';
3
3
  import OpenAI from 'openai';
4
4
 
5
5
  type Provider = "anthropic" | "xiaomi" | "openai" | "gemini" | "glm" | "moonshot" | "minimax" | "deepseek" | "openrouter" | "sakana" | "palsu";
6
- type ThinkingLevel = "low" | "medium" | "high" | "xhigh" | "max";
6
+ type ThinkingLevel = "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
7
7
  type CacheRetention = "none" | "short" | "long";
8
8
  interface TextContent {
9
9
  type: "text";
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import Anthropic from '@anthropic-ai/sdk';
3
3
  import OpenAI from 'openai';
4
4
 
5
5
  type Provider = "anthropic" | "xiaomi" | "openai" | "gemini" | "glm" | "moonshot" | "minimax" | "deepseek" | "openrouter" | "sakana" | "palsu";
6
- type ThinkingLevel = "low" | "medium" | "high" | "xhigh" | "max";
6
+ type ThinkingLevel = "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
7
7
  type CacheRetention = "none" | "short" | "long";
8
8
  interface TextContent {
9
9
  type: "text";
package/dist/index.js CHANGED
@@ -818,7 +818,7 @@ function toAnthropicThinking(level, maxTokens, model) {
818
818
  };
819
819
  }
820
820
  const VISIBLE_FLOOR = 1024;
821
- const effectiveLevel = level === "xhigh" || level === "max" ? "high" : level;
821
+ const effectiveLevel = level === "xhigh" || level === "max" || level === "ultra" ? "high" : level;
822
822
  const budgetMap = {
823
823
  low: Math.max(1024, Math.floor(maxTokens * 0.2)),
824
824
  medium: Math.max(2048, Math.floor(maxTokens * 0.45)),
@@ -986,7 +986,7 @@ function toOpenAIToolChoice(choice) {
986
986
  return { type: "function", function: { name: choice.name } };
987
987
  }
988
988
  function toOpenAIReasoningEffort(level, model) {
989
- const effort = level === "max" ? "xhigh" : level;
989
+ const effort = level === "max" || level === "ultra" ? "xhigh" : level;
990
990
  if (model.startsWith("fugu") && (effort === "low" || effort === "medium")) {
991
991
  return "high";
992
992
  }
@@ -2172,7 +2172,8 @@ async function* runStream3(options) {
2172
2172
  body.temperature = options.temperature;
2173
2173
  }
2174
2174
  body.reasoning = {
2175
- effort: options.thinking ?? "none",
2175
+ // `ultra` is a client orchestration preset, not a Codex API effort.
2176
+ effort: options.thinking === "ultra" ? "max" : options.thinking ?? "none",
2176
2177
  summary: "auto",
2177
2178
  ...responsesLite ? { context: "all_turns" } : {}
2178
2179
  };
@@ -2825,6 +2826,7 @@ function toGemini3ThinkingLevel(level) {
2825
2826
  case "high":
2826
2827
  case "xhigh":
2827
2828
  case "max":
2829
+ case "ultra":
2828
2830
  return "HIGH";
2829
2831
  }
2830
2832
  }
@@ -2837,6 +2839,7 @@ function toThinkingBudget(level) {
2837
2839
  case "high":
2838
2840
  case "xhigh":
2839
2841
  case "max":
2842
+ case "ultra":
2840
2843
  return 8192;
2841
2844
  }
2842
2845
  }