From 35282db9e0027ea3bad1d2f0fd3a2e3e0e4bdd44 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Thu, 16 Apr 2026 23:24:16 +0800 Subject: [PATCH] feat(models): support claude-opus-4-7 --- README.md | 2 +- channel/web/web_channel.py | 4 ++-- common/const.py | 3 ++- docs/en/models/claude.mdx | 2 +- docs/ja/models/claude.mdx | 2 +- docs/models/claude.mdx | 2 +- run.sh | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8a25c11c..a0d29e38 100644 --- a/README.md +++ b/README.md @@ -499,7 +499,7 @@ sudo docker logs -f chatgpt-on-wechat "claude_api_key": "YOUR_API_KEY" } ``` - - `model`: 参考 [官方模型ID](https://docs.anthropic.com/en/docs/about-claude/models/overview#model-aliases) ,支持 `claude-sonnet-4-6、claude-opus-4-6、claude-sonnet-4-5、claude-sonnet-4-0、claude-opus-4-0、claude-3-5-sonnet-latest` 等 + - `model`: 参考 [官方模型ID](https://docs.anthropic.com/en/docs/about-claude/models/overview#model-aliases) ,支持 `claude-sonnet-4-6、claude-opus-4-7、claude-opus-4-6、claude-sonnet-4-5、claude-sonnet-4-0、claude-opus-4-0、claude-3-5-sonnet-latest` 等
diff --git a/channel/web/web_channel.py b/channel/web/web_channel.py index c9239ebd..00148c65 100644 --- a/channel/web/web_channel.py +++ b/channel/web/web_channel.py @@ -717,7 +717,7 @@ class ConfigHandler: const.QWEN36_PLUS, const.QWEN35_PLUS, const.QWEN3_MAX, const.KIMI_K2_5, const.KIMI_K2, const.DOUBAO_SEED_2_PRO, const.DOUBAO_SEED_2_CODE, - const.CLAUDE_4_6_SONNET, const.CLAUDE_4_6_OPUS, const.CLAUDE_4_5_SONNET, + const.CLAUDE_4_6_SONNET, const.CLAUDE_4_7_OPUS, const.CLAUDE_4_6_OPUS, const.CLAUDE_4_5_SONNET, const.GEMINI_31_FLASH_LITE_PRE, const.GEMINI_31_PRO_PRE, const.GEMINI_3_FLASH_PRE, const.GPT_54, const.GPT_54_MINI, const.GPT_54_NANO, const.GPT_5, const.GPT_41, const.GPT_4o, const.DEEPSEEK_CHAT, const.DEEPSEEK_REASONER, @@ -764,7 +764,7 @@ class ConfigHandler: "api_key_field": "claude_api_key", "api_base_key": "claude_api_base", "api_base_default": "https://api.anthropic.com/v1", - "models": [const.CLAUDE_4_6_SONNET, const.CLAUDE_4_6_OPUS, const.CLAUDE_4_5_SONNET], + "models": [const.CLAUDE_4_6_SONNET, const.CLAUDE_4_7_OPUS, const.CLAUDE_4_6_OPUS, const.CLAUDE_4_5_SONNET], }), ("gemini", { "label": "Gemini", diff --git a/common/const.py b/common/const.py index 5cc5bdb1..460f68c6 100644 --- a/common/const.py +++ b/common/const.py @@ -28,6 +28,7 @@ CLAUDE_35_SONNET = "claude-3-5-sonnet-latest" # 带 latest 标签的模型名 CLAUDE_35_SONNET_1022 = "claude-3-5-sonnet-20241022" # 带具体日期的模型名称,会固定为该日期发布的模型 CLAUDE_35_SONNET_0620 = "claude-3-5-sonnet-20240620" CLAUDE_4_OPUS = "claude-opus-4-0" +CLAUDE_4_7_OPUS = "claude-opus-4-7" # Claude Opus 4.7 CLAUDE_4_6_OPUS = "claude-opus-4-6" # Claude Opus 4.6 - Agent推荐模型 CLAUDE_4_SONNET = "claude-sonnet-4-0" # Claude Sonnet 4.0 CLAUDE_4_5_SONNET = "claude-sonnet-4-5" # Claude Sonnet 4.5 - Agent推荐模型 @@ -152,7 +153,7 @@ MODELSCOPE_MODEL_LIST = ["deepseek-ai/DeepSeek-R1-0528", "deepseek-ai/DeepSeek-R MODEL_LIST = [ # Claude - CLAUDE3, CLAUDE_4_6_SONNET, CLAUDE_4_6_OPUS, CLAUDE_4_OPUS, CLAUDE_4_5_SONNET, CLAUDE_4_SONNET, CLAUDE_3_OPUS, CLAUDE_3_OPUS_0229, + CLAUDE3, CLAUDE_4_6_SONNET, CLAUDE_4_7_OPUS, CLAUDE_4_6_OPUS, CLAUDE_4_OPUS, CLAUDE_4_5_SONNET, CLAUDE_4_SONNET, CLAUDE_3_OPUS, CLAUDE_3_OPUS_0229, CLAUDE_35_SONNET, CLAUDE_35_SONNET_1022, CLAUDE_35_SONNET_0620, CLAUDE_3_SONNET, CLAUDE_3_HAIKU, "claude", "claude-3-haiku", "claude-3-sonnet", "claude-3-opus", "claude-3.5-sonnet", diff --git a/docs/en/models/claude.mdx b/docs/en/models/claude.mdx index 58c767d7..3ac7651e 100644 --- a/docs/en/models/claude.mdx +++ b/docs/en/models/claude.mdx @@ -12,6 +12,6 @@ description: Claude model configuration | Parameter | Description | | --- | --- | -| `model` | Options include `claude-sonnet-4-6`, `claude-opus-4-6`, `claude-sonnet-4-5`, `claude-sonnet-4-0`, `claude-3-5-sonnet-latest`, etc. See [official models](https://docs.anthropic.com/en/docs/about-claude/models/overview) | +| `model` | Options include `claude-sonnet-4-6`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-4-5`, `claude-sonnet-4-0`, `claude-3-5-sonnet-latest`, etc. See [official models](https://docs.anthropic.com/en/docs/about-claude/models/overview) | | `claude_api_key` | Create at [Claude Console](https://console.anthropic.com/settings/keys) | | `claude_api_base` | Optional. Defaults to `https://api.anthropic.com/v1`. Change to use third-party proxy | diff --git a/docs/ja/models/claude.mdx b/docs/ja/models/claude.mdx index ca8ccd1a..eddd24fa 100644 --- a/docs/ja/models/claude.mdx +++ b/docs/ja/models/claude.mdx @@ -12,6 +12,6 @@ description: Claudeモデルの設定 | パラメータ | 説明 | | --- | --- | -| `model` | `claude-sonnet-4-6`、`claude-opus-4-6`、`claude-sonnet-4-5`、`claude-sonnet-4-0`、`claude-3-5-sonnet-latest`などから選択可能。[公式モデル一覧](https://docs.anthropic.com/en/docs/about-claude/models/overview)を参照 | +| `model` | `claude-sonnet-4-6`、`claude-opus-4-7`、`claude-opus-4-6`、`claude-sonnet-4-5`、`claude-sonnet-4-0`、`claude-3-5-sonnet-latest`などから選択可能。[公式モデル一覧](https://docs.anthropic.com/en/docs/about-claude/models/overview)を参照 | | `claude_api_key` | [Claude Console](https://console.anthropic.com/settings/keys)で作成 | | `claude_api_base` | 任意。デフォルトは`https://api.anthropic.com/v1`。サードパーティプロキシを使用する場合に変更 | diff --git a/docs/models/claude.mdx b/docs/models/claude.mdx index a4b9fc4d..920f54cd 100644 --- a/docs/models/claude.mdx +++ b/docs/models/claude.mdx @@ -12,6 +12,6 @@ description: Claude 模型配置 | 参数 | 说明 | | --- | --- | -| `model` | 支持 `claude-sonnet-4-6`、`claude-opus-4-6`、`claude-sonnet-4-5`、`claude-sonnet-4-0`、`claude-3-5-sonnet-latest` 等,参考 [官方模型](https://docs.anthropic.com/en/docs/about-claude/models/overview) | +| `model` | 支持 `claude-sonnet-4-6`、`claude-opus-4-7`、`claude-opus-4-6`、`claude-sonnet-4-5`、`claude-sonnet-4-0`、`claude-3-5-sonnet-latest` 等,参考 [官方模型](https://docs.anthropic.com/en/docs/about-claude/models/overview) | | `claude_api_key` | 在 [Claude 控制台](https://console.anthropic.com/settings/keys) 创建 | | `claude_api_base` | 可选,默认为 `https://api.anthropic.com/v1`,修改可接入第三方代理 | diff --git a/run.sh b/run.sh index 07c0753d..cfa5d47a 100755 --- a/run.sh +++ b/run.sh @@ -314,7 +314,7 @@ select_model() { echo -e "${YELLOW}3) Kimi (kimi-k2.5, kimi-k2, etc.)${NC}" echo -e "${YELLOW}4) Doubao (doubao-seed-2-0-code-preview-260215, etc.)${NC}" echo -e "${YELLOW}5) Qwen (qwen3.6-plus, qwen3.5-plus, qwen3-max, qwq-plus, etc.)${NC}" - echo -e "${YELLOW}6) Claude (claude-sonnet-4-6, claude-opus-4-6, etc.)${NC}" + echo -e "${YELLOW}6) Claude (claude-sonnet-4-6, claude-opus-4-7, claude-opus-4-6, etc.)${NC}" echo -e "${YELLOW}7) Gemini (gemini-3.1-flash-lite-preview, gemini-3.1-pro-preview, etc.)${NC}" echo -e "${YELLOW}8) OpenAI GPT (gpt-5.4, gpt-5.2, gpt-4.1, etc.)${NC}" echo -e "${YELLOW}9) LinkAI (access multiple models via one API)${NC}"