增加大模型推理级别配置

This commit is contained in:
1e0n
2025-10-08 05:26:31 +08:00
parent 191c53da40
commit 1c29062ba7
5 changed files with 137 additions and 12 deletions

View File

@@ -49,3 +49,15 @@ export function getSystemPrompt() {
const cfg = getConfig();
return cfg.system_prompt || '';
}
export function getModelReasoning(modelId) {
const model = getModelById(modelId);
if (!model || !model.reasoning) {
return null;
}
const reasoningLevel = model.reasoning.toLowerCase();
if (['low', 'medium', 'high'].includes(reasoningLevel)) {
return reasoningLevel;
}
return null;
}