diff --git a/.claude/tools/.env.example b/.claude/tools/.env.example index cf27c0c..02af290 100644 --- a/.claude/tools/.env.example +++ b/.claude/tools/.env.example @@ -24,6 +24,14 @@ GLM_COMPACT_PCT=75 # DEEPSEEK_DISABLE_COMPACT=1 # DEEPSEEK_MAX_CONTEXT_TOKENS=1000000 +# ── Qwen (DashScope Anthropic 兼容) ────────────────────── +# QWEN_BASE_URL=https://dashscope.aliyuncs.com/apps/anthropic +# QWEN_AUTH_TOKEN={{your_qwen_dashscope_api_key}} +# QWEN_DEFAULT_MODEL=qw37 +# QWEN_CONTEXT_WINDOW=1000000 +# QWEN_COMPACT_PCT=50 +# QWEN_MAX_CONTEXT_TOKENS=1000000 + # ── 添加新 Provider ────────────────────────────────────── # 按以下格式添加即可,无需修改 runcc.sh: # MYPROVIDER_BASE_URL=https://api.example.com/anthropic diff --git a/.claude/tools/bashrc.tail.sh b/.claude/tools/bashrc.tail.sh index fa5e8e6..d43ee44 100755 --- a/.claude/tools/bashrc.tail.sh +++ b/.claude/tools/bashrc.tail.sh @@ -26,6 +26,11 @@ alias cc51='cc 51' alias ccds='cc -p deepseek ds' alias ccdsf='cc -p deepseek dsf' +# Qwen 快捷方式 +alias ccqw37='cc -p qwen qw37' +alias ccqw36f='cc -p qwen qw36f' +alias ccqwim='cc -p qwen qwim' + # ── OpenCode 启动函数(参数透传至 runoc.sh)────────────────── oc() { $BIN_PATH/runoc.sh "$@"; } diff --git a/.claude/tools/runcc.sh b/.claude/tools/runcc.sh index f79a630..30ecbcd 100755 --- a/.claude/tools/runcc.sh +++ b/.claude/tools/runcc.sh @@ -50,6 +50,7 @@ while [ $# -gt 0 ]; do echo " --provider, -p <名称> API 提供商 (由 .env 配置,如 glm / deepseek)" echo "" echo "GLM 模型: 45|45a|46|47|5|5t|51" + echo "Qwen 模型: qw37|qw36f" echo "DeepSeek 模型: ds|dsf" echo "其他: 直接传入模型名称" echo "" @@ -59,6 +60,8 @@ while [ $# -gt 0 ]; do echo "示例:" echo " runcc.sh # 默认 Provider + 默认模型" echo " runcc.sh 47 # 默认 Provider + glm-4.7" + echo " runcc.sh --provider qwen # Qwen + 默认模型" + echo " runcc.sh -p qwen qw37 # Qwen + qwen3.7-max" echo " runcc.sh --provider deepseek # DeepSeek + 默认模型" echo " runcc.sh -p deepseek dsf # DeepSeek + deepseek-v4-flash" exit 0 @@ -131,6 +134,10 @@ case "$MODEL_KEY" in 5) MODEL="glm-5" ;; 5t) MODEL="glm-5-turbo" ;; 51) MODEL="glm-5.1" ;; + # Qwen 系列 + qw37) MODEL="qwen3.7-max" ;; + qw36f) MODEL="qwen3.6-flash" ;; + qwim) MODEL="qwen-image-max" ;; # DeepSeek 系列 ds) MODEL="deepseek-v4-pro" ;; dsf) MODEL="deepseek-v4-flash" ;;