@prestyj/ai 4.13.3 → 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 +17 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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,
|
|
1024
|
-
|
|
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) {
|
|
@@ -3184,6 +3189,16 @@ providerRegistry.register("openrouter", {
|
|
|
3184
3189
|
baseUrl: options.baseUrl ?? "https://openrouter.ai/api/v1"
|
|
3185
3190
|
})
|
|
3186
3191
|
});
|
|
3192
|
+
providerRegistry.register("sakana", {
|
|
3193
|
+
// Sakana Fugu is a multi-agent system exposed as a standard LLM through the
|
|
3194
|
+
// OpenAI-compatible Sakana API. We ride the Chat Completions transport (the
|
|
3195
|
+
// Responses API is also offered). Fugu models only accept "high"/"xhigh"
|
|
3196
|
+
// reasoning effort — clamped centrally in toOpenAIReasoningEffort.
|
|
3197
|
+
stream: (options) => streamOpenAI({
|
|
3198
|
+
...options,
|
|
3199
|
+
baseUrl: options.baseUrl ?? "https://api.sakana.ai/v1"
|
|
3200
|
+
})
|
|
3201
|
+
});
|
|
3187
3202
|
providerRegistry.register("minimax", {
|
|
3188
3203
|
stream: (options) => streamAnthropic({
|
|
3189
3204
|
...options,
|