@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/README.md
CHANGED
|
@@ -42,7 +42,7 @@ Tool parameters are Zod schemas. Converted to JSON Schema at the provider bounda
|
|
|
42
42
|
|---|---|---|
|
|
43
43
|
| `anthropic` | Claude Opus 5, Sonnet 5, Haiku 4.5 | Extended thinking, prompt caching, server-side compaction |
|
|
44
44
|
| `openai` | GPT-4.1, o3, o4-mini | Supports OAuth (codex endpoint) and API keys |
|
|
45
|
-
| `glm` | GLM-5.
|
|
45
|
+
| `glm` | GLM-5.3 | Z.AI platform, OpenAI-compatible |
|
|
46
46
|
| `moonshot` | Kimi K3, Kimi K2.7 Code | Moonshot platform, OpenAI-compatible |
|
|
47
47
|
|
|
48
48
|
---
|
package/dist/index.cjs
CHANGED
|
@@ -1171,6 +1171,9 @@ function toLocalReasoningEffort(level) {
|
|
|
1171
1171
|
if (level === "max" || level === "ultra" || level === "xhigh") return "max";
|
|
1172
1172
|
return level;
|
|
1173
1173
|
}
|
|
1174
|
+
function toGlmReasoningEffort(level) {
|
|
1175
|
+
return level === "ultra" ? "max" : level;
|
|
1176
|
+
}
|
|
1174
1177
|
function toOpenAIReasoningEffort(level, model) {
|
|
1175
1178
|
const effort = level === "max" || level === "ultra" ? "xhigh" : level;
|
|
1176
1179
|
if (model.startsWith("fugu") && (effort === "low" || effort === "medium")) {
|
|
@@ -2039,6 +2042,11 @@ async function* runStream2(options) {
|
|
|
2039
2042
|
if (usesThinkingParam) {
|
|
2040
2043
|
if (options.thinking) {
|
|
2041
2044
|
params.thinking = { type: "enabled" };
|
|
2045
|
+
if (options.provider === "glm") {
|
|
2046
|
+
params.reasoning_effort = toGlmReasoningEffort(
|
|
2047
|
+
options.thinking
|
|
2048
|
+
);
|
|
2049
|
+
}
|
|
2042
2050
|
} else {
|
|
2043
2051
|
params.thinking = { type: "disabled" };
|
|
2044
2052
|
}
|