@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.d.cts CHANGED
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import Anthropic from '@anthropic-ai/sdk';
3
3
  import OpenAI from 'openai';
4
4
 
5
- type Provider = "anthropic" | "xiaomi" | "openai" | "gemini" | "glm" | "moonshot" | "minimax" | "deepseek" | "openrouter" | "palsu";
5
+ type Provider = "anthropic" | "xiaomi" | "openai" | "gemini" | "glm" | "moonshot" | "minimax" | "deepseek" | "openrouter" | "sakana" | "palsu";
6
6
  type ThinkingLevel = "low" | "medium" | "high" | "xhigh" | "max";
7
7
  type CacheRetention = "none" | "short" | "long";
8
8
  interface TextContent {
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import Anthropic from '@anthropic-ai/sdk';
3
3
  import OpenAI from 'openai';
4
4
 
5
- type Provider = "anthropic" | "xiaomi" | "openai" | "gemini" | "glm" | "moonshot" | "minimax" | "deepseek" | "openrouter" | "palsu";
5
+ type Provider = "anthropic" | "xiaomi" | "openai" | "gemini" | "glm" | "moonshot" | "minimax" | "deepseek" | "openrouter" | "sakana" | "palsu";
6
6
  type ThinkingLevel = "low" | "medium" | "high" | "xhigh" | "max";
7
7
  type CacheRetention = "none" | "short" | "long";
8
8
  interface TextContent {
package/dist/index.js CHANGED
@@ -57,6 +57,7 @@ var PROVIDER_DISPLAY = {
57
57
  moonshot: "Moonshot",
58
58
  deepseek: "DeepSeek",
59
59
  openrouter: "OpenRouter",
60
+ sakana: "Sakana",
60
61
  xiaomi: "Xiaomi (MiMo)",
61
62
  minimax: "MiniMax"
62
63
  };
@@ -965,8 +966,12 @@ function toOpenAIToolChoice(choice) {
965
966
  if (choice === "required") return "required";
966
967
  return { type: "function", function: { name: choice.name } };
967
968
  }
968
- function toOpenAIReasoningEffort(level, _model) {
969
- return level === "max" ? "xhigh" : level;
969
+ function toOpenAIReasoningEffort(level, model) {
970
+ const effort = level === "max" ? "xhigh" : level;
971
+ if (model.startsWith("fugu") && (effort === "low" || effort === "medium")) {
972
+ return "high";
973
+ }
974
+ return effort;
970
975
  }
971
976
  function normalizeAnthropicStopReason(reason) {
972
977
  switch (reason) {
@@ -3124,6 +3129,16 @@ providerRegistry.register("openrouter", {
3124
3129
  baseUrl: options.baseUrl ?? "https://openrouter.ai/api/v1"
3125
3130
  })
3126
3131
  });
3132
+ providerRegistry.register("sakana", {
3133
+ // Sakana Fugu is a multi-agent system exposed as a standard LLM through the
3134
+ // OpenAI-compatible Sakana API. We ride the Chat Completions transport (the
3135
+ // Responses API is also offered). Fugu models only accept "high"/"xhigh"
3136
+ // reasoning effort — clamped centrally in toOpenAIReasoningEffort.
3137
+ stream: (options) => streamOpenAI({
3138
+ ...options,
3139
+ baseUrl: options.baseUrl ?? "https://api.sakana.ai/v1"
3140
+ })
3141
+ });
3127
3142
  providerRegistry.register("minimax", {
3128
3143
  stream: (options) => streamAnthropic({
3129
3144
  ...options,