feat(eltex): add ai-eltex-qwen, effort max by default; fix model pick and /logout-eltex

ai-eltex-qwen: new launcher for the Eltex proxy on Qwen models
(Coder-Senior, then Flash-Next), own key eltex_qwen_key, config dir and
/logout-eltex-qwen hook branch, 200K window.

Effort: ai-glm and ai-eltex start on max via CLI --effort (AI_EFFORT
overrides), CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000 so long GLM answers are
not cut at 32000. EFFORT_MAPPING notes the proxy passes effort for
anth-glm-5.3 since 09.10.

ai-eltex model pick: no longer falls back to the first /v1/models entry,
which twice picked something unusable (zai-glm-5.3 routed to flash, and
the access-group name ZAI-Test-Group -> 400). Without anth-glm-5.3 the
launcher exits with a clear message; ELTEX_MODEL still overrides.

/logout-eltex: Claude Code answered "Unknown command" and never called
the logout hook (the built-in /logout bypasses hooks too). ai-eltex now
registers commands/logout-eltex.md in its config dir, so the hook
receives the command and deletes eltex_key (checked end to end).

ru-bypass: resolve exception hosts via ahostsv4 first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Виталий Никитенко
2026-10-12 11:52:45 +07:00
parent e3a1c500fd
commit 6c507b4549
9 changed files with 298 additions and 46 deletions

View File

@@ -245,7 +245,8 @@ if [ -n "${ALL_EXC// }" ]; then
if echo "$item" | grep -qE "^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$"; then
ips="$item"
else
ips=$(getent hosts "$item" 2>/dev/null | awk '{print $1}' | sort -u)
ips=$(getent ahostsv4 "$item" 2>/dev/null | awk '{print $1}' | sort -u)
[ -z "$ips" ] && ips=$(getent hosts "$item" 2>/dev/null | awk '{print $1}' | sort -u)
fi
for ip in $ips; do
ipset add ru-direct "$ip" -exist 2>/dev/null || true
@@ -299,7 +300,8 @@ if [ -n "${ALL_EXC// }" ]; then
if echo "$item" | grep -qE "^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$"; then
ips="$item"
else
ips=$(getent hosts "$item" 2>/dev/null | awk '{print $1}' | sort -u)
ips=$(getent ahostsv4 "$item" 2>/dev/null | awk '{print $1}' | sort -u)
[ -z "$ips" ] && ips=$(getent hosts "$item" 2>/dev/null | awk '{print $1}' | sort -u)
fi
for ip in $ips; do
ip route replace "$ip/32" via "$GATEWAY" dev "$DEV" 2>/dev/null