fix(eltex): default to anth-glm-5.3, drop forced ENABLE_TOOL_SEARCH

Admins moved the pilot to anth-glm-5.3: proxy deployments on the Z.ai
Anthropic endpoint. Checked on all 6 pilot keys: 48/48 requests served
by glm-5.3 (no flash), images recognised via Z.ai analyze_image in
Claude Code 8/8. zai-glm-5.3 goes through an auto-router that swaps in
glm-5.3-flash, so ai-eltex now prefers anth-glm-5.3 when the key has it
(ELTEX_MODEL still overrides).

ENABLE_TOOL_SEARCH is no longer forced: on the anthropic path GLM
searched for Read/Bash via ToolSearch and decided they were missing.

Effort still has no effect: Claude Code sends output_config.effort, but
LiteLLM drops it (direct Z.ai low/max = 81/3712 output tokens, via the
proxy ~3-5K at any level).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Виталий Никитенко
2026-10-07 10:08:08 +07:00
parent 083a614940
commit 5e1e3cc796
3 changed files with 27 additions and 13 deletions

View File

@@ -123,11 +123,21 @@ test_eltex_claude_launcher() {
test_eltex_model_from_key() {
if echo "$ELTEX_SECTION" | grep -q '/v1/models' \
&& echo "$ELTEX_SECTION" | grep -q 'model="${ELTEX_MODEL:-}"' \
&& echo "$ELTEX_SECTION" | grep -q '"anth-glm-5.3" if "anth-glm-5.3" in ids' \
&& echo "$ELTEX_SECTION" | grep -q 'ANTHROPIC_DEFAULT_OPUS_MODEL="$model"' \
&& echo "$ELTEX_SECTION" | grep -q 'ANTHROPIC_DEFAULT_HAIKU_MODEL="$model"'; then
ok "ai-eltex: model resolved from the key's /v1/models (ELTEX_MODEL overrides)"
ok "ai-eltex: prefers anth-glm-5.3 from the key's /v1/models (ELTEX_MODEL overrides)"
else
fail "ai-eltex: model must come from /v1/models or ELTEX_MODEL"
fail "ai-eltex: must prefer anth-glm-5.3 from /v1/models, ELTEX_MODEL overrides"
fi
}
# ── ai-eltex: без ENABLE_TOOL_SEARCH (на anthropic-пути GLM теряет Read/Bash) ──
test_eltex_no_tool_search() {
if echo "$ELTEX_SECTION" | grep -q '^ENABLE_TOOL_SEARCH='; then
fail "ai-eltex: must not force ENABLE_TOOL_SEARCH (GLM loses core tools on anthropic path)"
else
ok "ai-eltex: ENABLE_TOOL_SEARCH not forced"
fi
}
@@ -356,6 +366,7 @@ test_glm_official_api
test_glm_default_effort
test_eltex_claude_launcher
test_eltex_model_from_key
test_eltex_no_tool_search
test_logout_eltex
test_gemini_native_launcher
test_cursor_native_launcher