@kenkaiiii/gg-ai 4.13.2 → 4.14.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.cjs CHANGED
@@ -112,6 +112,7 @@ var PROVIDER_DISPLAY = {
112
112
  moonshot: "Moonshot",
113
113
  deepseek: "DeepSeek",
114
114
  openrouter: "OpenRouter",
115
+ sakana: "Sakana",
115
116
  xiaomi: "Xiaomi (MiMo)",
116
117
  minimax: "MiniMax"
117
118
  };
@@ -1020,8 +1021,12 @@ function toOpenAIToolChoice(choice) {
1020
1021
  if (choice === "required") return "required";
1021
1022
  return { type: "function", function: { name: choice.name } };
1022
1023
  }
1023
- function toOpenAIReasoningEffort(level, _model) {
1024
- return level === "max" ? "xhigh" : level;
1024
+ function toOpenAIReasoningEffort(level, model) {
1025
+ const effort = level === "max" ? "xhigh" : level;
1026
+ if (model.startsWith("fugu") && (effort === "low" || effort === "medium")) {
1027
+ return "high";
1028
+ }
1029
+ return effort;
1025
1030
  }
1026
1031
  function normalizeAnthropicStopReason(reason) {
1027
1032
  switch (reason) {
@@ -3179,6 +3184,16 @@ providerRegistry.register("openrouter", {
3179
3184
  baseUrl: options.baseUrl ?? "https://openrouter.ai/api/v1"
3180
3185
  })
3181
3186
  });
3187
+ providerRegistry.register("sakana", {
3188
+ // Sakana Fugu is a multi-agent system exposed as a standard LLM through the
3189
+ // OpenAI-compatible Sakana API. We ride the Chat Completions transport (the
3190
+ // Responses API is also offered). Fugu models only accept "high"/"xhigh"
3191
+ // reasoning effort — clamped centrally in toOpenAIReasoningEffort.
3192
+ stream: (options) => streamOpenAI({
3193
+ ...options,
3194
+ baseUrl: options.baseUrl ?? "https://api.sakana.ai/v1"
3195
+ })
3196
+ });
3182
3197
  providerRegistry.register("minimax", {
3183
3198
  stream: (options) => streamAnthropic({
3184
3199
  ...options,