feat(glm): default effort xhigh instead of max

Z.ai maps xhigh to native high, so this trims the thinking budget for
everyday ai-glm launches; AI_EFFORT=max still forces the old behavior.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Виталий Никитенко
2026-10-16 06:51:52 +03:00
parent e6fe58eb37
commit ef187a1b48
3 changed files with 12 additions and 11 deletions

View File

@@ -342,14 +342,14 @@ test_logout_mimo() {
rm -rf "$tmp_home"
}
# ── ai-glm: default effort is max (still overridable via AI_EFFORT) ───────
# ── ai-glm: default effort is xhigh (still overridable via AI_EFFORT) ──────
test_glm_default_effort() {
if echo "$GLM_SECTION" | grep -q -- '--effort "${AI_EFFORT:-max}"' \
if echo "$GLM_SECTION" | grep -q -- '--effort "${AI_EFFORT:-xhigh}"' \
&& echo "$GLM_SECTION" | grep -q '^CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000' \
&& echo "$GLM_SECTION" | grep -q 'CLAUDE_CODE_ALWAYS_ENABLE_EFFORT=1'; then
ok "ai-glm: starts with --effort max by default, effort sent to Z.ai, 64000 output tokens"
ok "ai-glm: starts with --effort xhigh by default, effort sent to Z.ai, 64000 output tokens"
else
fail "ai-glm: must start with --effort \"\${AI_EFFORT:-max}\", CLAUDE_CODE_ALWAYS_ENABLE_EFFORT=1 and MAX_OUTPUT_TOKENS=64000"
fail "ai-glm: must start with --effort \"\${AI_EFFORT:-xhigh}\", CLAUDE_CODE_ALWAYS_ENABLE_EFFORT=1 and MAX_OUTPUT_TOKENS=64000"
fi
}