feat(qwen): add ai-qwen launcher for Alibaba Token Plan (Qwen3.8)

ai-qwen runs Claude Code through Alibaba Cloud Model Studio's
Anthropic-compatible Token Plan endpoint
(token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic). The shared
key is built into the generated script, so it starts right away without
asking for a key.

qwen3.8-max (the smartest model the key has) is in opus/sonnet and for
subagents, --model opus on each start; qwen3.8-flash is in haiku for
background tasks. Measured on 20.10: both models accept up to 983616
input tokens (CLAUDE_CODE_MAX_CONTEXT_TOKENS=1000000, autocompact fires
before the API limit) and see images. Qwen validates
output_config.effort (bogus -> 400), Max shows no trend from low to
max, Flash thinks ~2x longer on max; the launcher starts on --effort max
like ai-mimo, EFFORT_MAPPING.md records the measurements.

setup.sh status, statusline brand color, README, QUICK_START and
AGENTS.md list the new launcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Виталий Никитенко
2026-10-20 12:01:31 +07:00
parent 41c5cf9b10
commit 0502478081
8 changed files with 119 additions and 10 deletions

View File

@@ -230,7 +230,7 @@ case "$choice" in
fi
echo -e "${BLD}AI инструменты:${CLR}"
for cmd in ai-claude ai-gpt ai-deepseek ai-kimi ai-glm ai-eltex ai-eltex-qwen ai-mimo ai-openrouter ai-opencode ai-gemini android; do
for cmd in ai-claude ai-gpt ai-deepseek ai-kimi ai-glm ai-eltex ai-eltex-qwen ai-mimo ai-qwen ai-openrouter ai-opencode ai-gemini android; do
if command -v "$cmd" &>/dev/null; then
echo -e " ${GRN}✓${CLR} $cmd"
else
@@ -252,7 +252,7 @@ case "$choice" in
echo ""
echo -e "${BLD}API доступность:${CLR}"
for entry in "Anthropic:api.anthropic.com" "DeepSeek:api.deepseek.com" "OpenAI:api.openai.com" "Kimi:api.kimi.com" "GLM:api.z.ai" "MiMo:api.xiaomimimo.com" "OpenRouter:openrouter.ai" "OpenCode:opencode.ai"; do
for entry in "Anthropic:api.anthropic.com" "DeepSeek:api.deepseek.com" "OpenAI:api.openai.com" "Kimi:api.kimi.com" "GLM:api.z.ai" "MiMo:api.xiaomimimo.com" "Qwen:token-plan.ap-southeast-1.maas.aliyuncs.com" "OpenRouter:openrouter.ai" "OpenCode:opencode.ai"; do
_name="${entry%%:*}"
_host="${entry##*:}"
_ms=$(curl -s -o /dev/null -w "%{time_connect}" --max-time 5 "https://$_host" 2>/dev/null)