修复自动模式优先使用后台默认生图模型
This commit is contained in:
parent
3909bae4c2
commit
b34fb88c98
@ -427,6 +427,17 @@ async function refineRouteWithAgent(
|
||||
}
|
||||
|
||||
try {
|
||||
const { db } = await import("@/lib/db");
|
||||
const { siteSettings } = await import("@/lib/db/schema");
|
||||
const [settings] = await db.select().from(siteSettings).limit(1);
|
||||
const configuredDefaultModelId = settings?.canvasAutoModeDefaultModelId || null;
|
||||
if (configuredDefaultModelId && baseRoute.id === configuredDefaultModelId) {
|
||||
console.log(
|
||||
`[Auto Agent] Keep admin default model for auto mode: ${baseRoute.displayName}`
|
||||
);
|
||||
return baseRoute;
|
||||
}
|
||||
|
||||
const {
|
||||
getEnabledAiModelsWithProvider,
|
||||
getAgentAiModelWithProvider,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user