feat(eltex): three proxy models in /model, anth-glm-5.3 by default

Admins now give every key three models. ai-eltex maps them to the
picker slots:
- opus (default): anth-glm-5.3 - glm-5.3 on the Z.ai Anthropic
  endpoint: images via analyze_image, effort works, 1M window;
- sonnet: zai-glm-5.3 - glm-5.3 on the OpenAI endpoint, no images or
  effort, 200K. Two keys get it as zai-glm-5.3-2-2 (zai-glm-5.3 is 403
  for them), so the name is matched exactly or by prefix;
- haiku: zai-glm-5.3-flash - fast, sees images itself, no effort,
  200K; Claude Code also uses this slot for background tasks.
A missing zai/flash model falls back to the default one.

Model name is anth-glm-5.3 again: with anth-glm-5.3-5 the auto-logout
would drop every saved key, since no key has that name now.

Context window is per model instead of a global
CLAUDE_CODE_MAX_CONTEXT_TOKENS=1000000: [1m] only on anth-glm-5.3
(Claude Code strips the suffix before the API call), 200K for the
others, otherwise a long flash/zai session would hit "Prompt exceeds
max length" instead of auto-compacting.

Checked on all 6 pilot keys (19.10): default model reads a png via
Read + analyze_image; sonnet/haiku answer with 200K windows; effort
low on anth-glm-5.3 = 68 output tokens (max ~3500).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Виталий Никитенко
2026-10-19 11:51:04 +07:00
parent f4a8c23af3
commit 41c5cf9b10
4 changed files with 118 additions and 60 deletions

View File

@@ -161,7 +161,7 @@ bash tests/test_network.sh # полные тесты
- `ai-deepseek` - Claude Code через DeepSeek API
- `ai-kimi` - Claude Code через официальный Kimi Code API (`api.kimi.com/coding`)
- `ai-glm` - Claude Code через Zhipu AI GLM 5.3 API (`api.z.ai/api/anthropic`)
- `ai-eltex` - Claude Code через корпоративный LLM-прокси Eltex (`http://llm.eltex.loc:4000`, LiteLLM, team-подписка GLM). Ключ выдают админы ([дока](https://intdocs.eltex.loc/pages/viewpage.action?pageId=262329878)), модель `anth-glm-5.3` (Anthropic-эндпоинт Z.ai: настоящая GLM 5.3 и картинки); если ключу она недоступна, лаунчер выходит с понятной ошибкой; переопределение: `ELTEX_MODEL`, `ELTEX_BASE_URL`
- `ai-eltex` - Claude Code через корпоративный LLM-прокси Eltex (`http://llm.eltex.loc:4000`, LiteLLM, team-подписка GLM). Ключ выдают админы ([дока](https://intdocs.eltex.loc/pages/viewpage.action?pageId=262329878)), три модели в `/model`: `anth-glm-5.3` по умолчанию (Anthropic-эндпоинт Z.ai: картинки, effort, окно 1M), `zai-glm-5.3` (OpenAI-эндпоинт: без картинок и effort, 200K) и `zai-glm-5.3-flash` (быстрая, картинки видит сама, 200K); если ключу недоступна `anth-glm-5.3`, лаунчер выходит с понятной ошибкой; переопределение: `ELTEX_MODEL`, `ELTEX_BASE_URL`
- `ai-eltex-qwen` - то же через корпоративный LLM-прокси Eltex, но на моделях Qwen со своим ключом от админов: по умолчанию `Eltex-Coder-Senior` (Qwen3.8-27B), если она есть у ключа, иначе `Eltex-Qwen3_8-Flash-Next`; ключ можно задать в `AI_ELTEX_LLM_API_KEY`, как в онбординге Eltex AI; переопределение: `ELTEX_QWEN_MODEL`, `ELTEX_BASE_URL`
- `ai-mimo` - Claude Code через Xiaomi MiMo V2.6 (Anthropic-совместимый API, Token Plan или pay-as-you-go): всегда самая умная модель `mimo-v2.6-pro` (во всех слотах и сабагентах, `--model opus` на каждом запуске), effort `max`, вывод до 128000 токенов, окно 1M. Эндпоинт региона подписки (`token-plan-sgp`/`-ams`, для `sk-` ключа `api.xiaomimimo.com`) находится перебором при вводе ключа; переопределение: `MIMO_BASE_URL` (нужно для `token-plan-cn`: он в перебор не входит, с наших машин не отвечает)
- `ai-openrouter` - Claude Code через OpenRouter (GPT-5.5, Grok, Qwen, GLM 5.2 и др.)