profile级tools_deny语义:allow先deny后叠加(deny赢,与mcp_servers同构),未配=继承顶层tools_deny(DEFAULTS默认[lab]屏蔽元工具,不进任何常规请求),[]=显式清空;mini替换为lab profile(tools_allow=[lab]+tools_deny=[]清空+lab-system.txt),报错文案配一为三;模板:删mini-system.txt(用户),新增lab-system.txt(用户),zero文案收紧(用户)
This commit is contained in:
@@ -21,7 +21,7 @@ router.post('/:id/messages', wrap((req, res) => {
|
||||
if (!content) return res.status(400).json({ error: 'content 不能为空' });
|
||||
// deepThink:是否启用模型该「深度思考」参数(thinking_params 合并进上游请求体)
|
||||
const deepThink = !!(req.body && req.body.deepThink);
|
||||
// profile:本轮 prompt+tools 组合(config.yml 顶层 model_profiles 的名字;保留值 'default' = 显式全量;
|
||||
// profile:本轮 prompt+tools 组合(config.yml 顶层 model_profiles 的名字;保留值 'default' = 显式全量(仍受全局 tools_deny 屏蔽);
|
||||
// 不传 = 随模型配置的 profile)。名字不存在直接 400 打回,不静默回退(难排查)。
|
||||
const profile = String((req.body && req.body.profile) || '').trim();
|
||||
if (profile && profile !== 'default' && !engine.hasModelProfile(profile)) {
|
||||
|
||||
Reference in New Issue
Block a user