fix(ai): prioritize flash models, prevent high-demand blocks, and add resilient brainstorm fallbacks
This commit is contained in:
@@ -191,9 +191,9 @@ function get_ai_settings(?int $userId = null): array {
|
||||
$provider = 'gemini';
|
||||
}
|
||||
|
||||
$model = !empty($personalModel) ? $personalModel : get_system_setting('ai_model', 'gemini-1.5-pro');
|
||||
$model = !empty($personalModel) ? $personalModel : get_system_setting('ai_model', 'gemini-2.0-flash');
|
||||
if (empty($model)) {
|
||||
$model = (strpos((string)$provider, 'openai') !== false) ? 'gpt-4o-mini' : 'gemini-1.5-pro';
|
||||
$model = (strpos((string)$provider, 'openai') !== false) ? 'gpt-4o-mini' : 'gemini-2.0-flash';
|
||||
}
|
||||
|
||||
$apiKey = trim((string)$apiKey);
|
||||
|
||||
Reference in New Issue
Block a user