From f2e4f6607de2643d2a637db135a8fd37dcc92cc8 Mon Sep 17 00:00:00 2001 From: 6vision Date: Fri, 23 May 2025 17:07:46 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9Asupport=20claude-4-opus=20and=20cl?= =?UTF-8?q?aude-4-sonnet=20models?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bridge/bridge.py | 2 +- common/const.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bridge/bridge.py b/bridge/bridge.py index 538792e..e556245 100644 --- a/bridge/bridge.py +++ b/bridge/bridge.py @@ -40,7 +40,7 @@ class Bridge(object): self.btype["chat"] = const.GEMINI if model_type and model_type.startswith("glm"): self.btype["chat"] = const.ZHIPU_AI - if model_type and model_type.startswith("claude-3"): + if model_type and model_type.startswith("claude"): self.btype["chat"] = const.CLAUDEAPI if model_type in ["claude"]: diff --git a/common/const.py b/common/const.py index a0cdd5c..0c2f360 100644 --- a/common/const.py +++ b/common/const.py @@ -82,6 +82,8 @@ CLAUDE_35_SONNET_1022 = "claude-3-5-sonnet-20241022" # 带具体日期的模型 CLAUDE_35_SONNET_0620 = "claude-3-5-sonnet-20240620" CLAUDE_3_SONNET = "claude-3-sonnet-20240229" CLAUDE_3_HAIKU = "claude-3-haiku-20240307" +CLAUDE_4_SONNET = "claude-sonnet-4-0" +CLAUDE_4_OPUS = "claude-opus-4-0" DEEPSEEK_CHAT = "deepseek-chat" # DeepSeek-V3对话模型 DEEPSEEK_REASONER = "deepseek-reasoner" # DeepSeek-R1模型 @@ -102,7 +104,7 @@ MODEL_LIST = [ ZHIPU_AI, GLM_4, GLM_4_PLUS, GLM_4_flash, GLM_4_LONG, GLM_4_ALLTOOLS, GLM_4_0520, GLM_4_AIR, GLM_4_AIRX, MOONSHOT, MiniMax, GEMINI, GEMINI_PRO, GEMINI_15_flash, GEMINI_15_PRO,GEMINI_20_flash_exp, - 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", + CLAUDE_4_OPUS, 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", "moonshot-v1-8k", "moonshot-v1-32k", "moonshot-v1-128k", QWEN, QWEN_TURBO, QWEN_PLUS, QWEN_MAX, LINKAI_35, LINKAI_4_TURBO, LINKAI_4o,