@kenkaiiii/gg-ai 5.108.0 → 5.109.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 +3 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2836,6 +2836,7 @@ async function* runStream2(options) {
|
|
|
2836
2836
|
const k3Effort = options.thinking ? toKimiK3Effort(options.thinking) : void 0;
|
|
2837
2837
|
const isKimiK27 = options.provider === "moonshot" && options.model.startsWith("kimi-k2.7-code");
|
|
2838
2838
|
const hasFixedKimiSampling = isKimiK3 || isKimiK27;
|
|
2839
|
+
const isGlmAlwaysThinking = options.provider === "glm" && options.model === "glm-5.3";
|
|
2839
2840
|
const usesThinkingParam = options.provider === "deepseek" || options.provider === "glm" || options.provider === "moonshot" && !isKimiK3 && !isKimiK27 || options.provider === "xiaomi";
|
|
2840
2841
|
const downgradedImages = downgradeUnsupportedImages(options.messages, options.supportsImages);
|
|
2841
2842
|
const downgradedMessages = downgradeUnsupportedVideos(downgradedImages, options.supportsVideo);
|
|
@@ -2921,11 +2922,9 @@ async function* runStream2(options) {
|
|
|
2921
2922
|
if (options.provider === "deepseek") {
|
|
2922
2923
|
params.reasoning_effort = options.thinking === "low" ? "low" : options.thinking === "medium" || options.thinking === "high" ? "high" : "max";
|
|
2923
2924
|
} else if (options.provider === "glm") {
|
|
2924
|
-
params.reasoning_effort = toGlmReasoningEffort(
|
|
2925
|
-
options.thinking
|
|
2926
|
-
);
|
|
2925
|
+
params.reasoning_effort = options.thinkingLevels?.length ? effortForRequest(options.thinking, options.model, options.thinkingLevels) : toGlmReasoningEffort(options.thinking);
|
|
2927
2926
|
}
|
|
2928
|
-
} else {
|
|
2927
|
+
} else if (!isGlmAlwaysThinking) {
|
|
2929
2928
|
params.thinking = { type: "disabled" };
|
|
2930
2929
|
}
|
|
2931
2930
|
}
|