@kenkaiiii/gg-ai 5.42.0 → 5.44.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/README.md +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1105,6 +1105,9 @@ function toLocalReasoningEffort(level) {
|
|
|
1105
1105
|
if (level === "max" || level === "ultra" || level === "xhigh") return "max";
|
|
1106
1106
|
return level;
|
|
1107
1107
|
}
|
|
1108
|
+
function toGlmReasoningEffort(level) {
|
|
1109
|
+
return level === "ultra" ? "max" : level;
|
|
1110
|
+
}
|
|
1108
1111
|
function toOpenAIReasoningEffort(level, model) {
|
|
1109
1112
|
const effort = level === "max" || level === "ultra" ? "xhigh" : level;
|
|
1110
1113
|
if (model.startsWith("fugu") && (effort === "low" || effort === "medium")) {
|
|
@@ -1973,6 +1976,11 @@ async function* runStream2(options) {
|
|
|
1973
1976
|
if (usesThinkingParam) {
|
|
1974
1977
|
if (options.thinking) {
|
|
1975
1978
|
params.thinking = { type: "enabled" };
|
|
1979
|
+
if (options.provider === "glm") {
|
|
1980
|
+
params.reasoning_effort = toGlmReasoningEffort(
|
|
1981
|
+
options.thinking
|
|
1982
|
+
);
|
|
1983
|
+
}
|
|
1976
1984
|
} else {
|
|
1977
1985
|
params.thinking = { type: "disabled" };
|
|
1978
1986
|
}
|