@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 CHANGED
@@ -83,7 +83,7 @@ gg-ai makes one model call. To run the tools and send results back until the mod
83
83
  | `gemini` | Gemini 3.1 Pro (Preview), 3.8 / 3.5 Flash, 3.5 / 3.1 Flash Lite | Google AI Studio key on the public Gemini API. Native video input |
84
84
  | `xai` | Grok 4.7 | API key |
85
85
  | `moonshot` | Kimi K3, K2.8 Preview, K2.7 Code, K2.7 Code HighSpeed | Moonshot key, or a Kimi Code plan key with its `baseUrl`. Native video input |
86
- | `glm` | GLM-5.3, GLM-5.3-Flash | Z.AI standard (pay-per-token) endpoint |
86
+ | `glm` | GLM-5.4, GLM-5.3, GLM-5.3-Flash | Z.AI Coding Plan or standard (pay-per-token) endpoint |
87
87
  | `minimax` | MiniMax M3.1 Flash, M3 | Anthropic-compatible endpoint. Native video input |
88
88
  | `xiaomi` | MiMo-V2.6-Pro, MiMo-V2.6-Flash, MiMo-V2.6-Pro-UltraSpeed | Native video input |
89
89
  | `deepseek` | DeepSeek V4 Pro, V4.1 Flash | |
package/dist/index.cjs CHANGED
@@ -2926,6 +2926,7 @@ async function* runStream2(options) {
2926
2926
  const k3Effort = options.thinking ? toKimiK3Effort(options.thinking) : void 0;
2927
2927
  const isKimiK27 = options.provider === "moonshot" && options.model.startsWith("kimi-k2.7-code");
2928
2928
  const hasFixedKimiSampling = isKimiK3 || isKimiK27;
2929
+ const isGlmAlwaysThinking = options.provider === "glm" && options.model === "glm-5.3";
2929
2930
  const usesThinkingParam = options.provider === "deepseek" || options.provider === "glm" || options.provider === "moonshot" && !isKimiK3 && !isKimiK27 || options.provider === "xiaomi";
2930
2931
  const downgradedImages = downgradeUnsupportedImages(options.messages, options.supportsImages);
2931
2932
  const downgradedMessages = downgradeUnsupportedVideos(downgradedImages, options.supportsVideo);
@@ -3011,11 +3012,9 @@ async function* runStream2(options) {
3011
3012
  if (options.provider === "deepseek") {
3012
3013
  params.reasoning_effort = options.thinking === "low" ? "low" : options.thinking === "medium" || options.thinking === "high" ? "high" : "max";
3013
3014
  } else if (options.provider === "glm") {
3014
- params.reasoning_effort = toGlmReasoningEffort(
3015
- options.thinking
3016
- );
3015
+ params.reasoning_effort = options.thinkingLevels?.length ? effortForRequest(options.thinking, options.model, options.thinkingLevels) : toGlmReasoningEffort(options.thinking);
3017
3016
  }
3018
- } else {
3017
+ } else if (!isGlmAlwaysThinking) {
3019
3018
  params.thinking = { type: "disabled" };
3020
3019
  }
3021
3020
  }