fix: 按 DeepSeek 文档为每种调用指定是否思考,修复分类器拿不到结果

deepseek-flash 默认先思考(reasoning_effort high),思考也占输出 token,思考模式下 temperature 无效。
分类器只给 10 个 token,全被思考用掉,正文为空,切到新后端后的提问都没有层级。

- 生成代码:开思考;引导:关思考,回得快;分类:关思考,temperature 0 才生效
- thinking 只发给 DeepSeek,豆包请求不变
- 实测 deepseek-flash:分类约 1.2s,引导约 1.5s;固定 68 条样本两次一致 65 条

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-27 20:53:30 +08:00
1 parent b765cbf1aa
commit 6b2ffbb3ec
3 files changed
+27 -15

No files matched your search

+2 -2
View File
@@ -37,8 +37,8 @@ async function callLlm(content: string): Promise<number | null> {
{ role: "system", content: CLASSIFY_SYSTEM_PROMPT },
{ role: "user", content },
],
// 同一句提示词要得到同一个层级
{ maxTokens: 10, temperature: 0, timeoutMs: 30_000 },
// 只回一个数字,不用思考;关了思考 temperature 才生效,同一句提示词得到同一个层级
{ thinking: false, maxTokens: 10, temperature: 0, timeoutMs: 30_000 },
)
const match = /[1-6]/.exec(text)
if (!match) {