From 6d37542b0b4bef76b086e08c414b62d80de898f9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Jan 2026 23:17:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=99=BA=E8=83=BD=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=20-=20=E5=B0=86=20auto=20=E4=BC=A0=E9=80=92?= =?UTF-8?q?=E7=BB=99=E5=90=8E=E7=AB=AF=E8=80=8C=E9=9D=9E=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- components/multimodal-input.tsx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/components/multimodal-input.tsx b/components/multimodal-input.tsx index a398c76ed..9410f0f14 100644 --- a/components/multimodal-input.tsx +++ b/components/multimodal-input.tsx @@ -1098,18 +1098,16 @@ function PureModelSelectorCompact({ onValueChange={(modelName) => { const model = displayModels.find((m) => m.displayName === modelName); if (model) { - // 如果选择的是"自动",则智能选择一个真实模型 + // 🆕 如果选择的是"自动"模式,直接传递 "auto" 给后端 + // 后端会使用智能分析器进行意图识别和模型选择 if (model.id === "auto") { - const bestModel = selectBestModel(); - if (bestModel) { - console.log(`[自动选择] 根据${attachments.length > 0 ? '有附件' : '无附件'}情况,选择模型: ${bestModel.displayName}`); - setOptimisticModelId(bestModel.id); - onModelChange?.(bestModel.id); - startTransition(() => { - saveChatModelAsCookie(bestModel.id); - }); - return; - } + console.log("[自动模式] 选择智能自动模式,后端将进行意图分析和模型路由"); + setOptimisticModelId("auto"); + onModelChange?.("auto"); + startTransition(() => { + saveChatModelAsCookie("auto"); + }); + return; } setOptimisticModelId(model.id);