feat: 更新助手默认模型为 gpt-5.1-mini

This commit is contained in:
kuaifan 2025-11-14 01:20:41 +00:00
parent 4f9ee1dfa9
commit f2719eb742

View File

@ -22,7 +22,7 @@ class AI
'qianwen', 'qianwen',
'wenxin' 'wenxin'
]; ];
protected const OPENAI_DEFAULT_MODEL = 'gpt-5-mini'; protected const OPENAI_DEFAULT_MODEL = 'gpt-5.1-mini';
protected $post = []; protected $post = [];
protected $headers = []; protected $headers = [];
@ -730,6 +730,12 @@ class AI
return false; return false;
} }
$model = $provider['model'] ?? ''; $model = $provider['model'] ?? '';
return str_starts_with($model, 'gpt-5');
// 匹配 gpt- 开头后跟数字的模型名称
if (preg_match('/^gpt-(\d+)/', $model, $matches)) {
return intval($matches[1]) >= 5;
}
return false;
} }
} }