From eabf13a3744a677663c0fcd7882e44859a6b50b2 Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Mon, 26 Jan 2026 14:21:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=B9=E6=8D=AE=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E5=95=86=E8=AE=BE=E7=BD=AE=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 default_models 数组,为每个提供商定义默认模型 - 小米 Mimo 默认模型: mimo-v2-flash - DeepSeek 默认模型: deepseek-chat - 豆包默认模型: doubao-pro-32k - 其他提供商也设置了对应的默认模型 - 修复测试时使用错误模型(gpt-4o-mini)的问题 --- functions.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index f89a869..9782649 100644 --- a/functions.php +++ b/functions.php @@ -8824,7 +8824,21 @@ function argon_ajax_test_unified_api() { return; } - $model = !empty($api['model']) ? $api['model'] : 'gpt-4o-mini'; + // 根据提供商设置默认模型 + $default_models = [ + 'openai' => 'gpt-4o-mini', + 'anthropic' => 'claude-3-5-sonnet-20241022', + 'deepseek' => 'deepseek-chat', + 'xiaomi' => 'mimo-v2-flash', + 'qianwen' => 'qwen-turbo', + 'wenxin' => 'ernie-4.0-8k', + 'doubao' => 'doubao-pro-32k', + 'kimi' => 'moonshot-v1-8k', + 'zhipu' => 'glm-4-flash', + 'siliconflow' => 'deepseek-ai/DeepSeek-V2.5' + ]; + + $model = !empty($api['model']) ? $api['model'] : (isset($default_models[$api['provider']]) ? $default_models[$api['provider']] : 'gpt-4o-mini'); // 构建测试请求 $data = [