fix(model): route requests through Electron net

This commit is contained in:
mesalogo
2026-10-08 21:58:00 +08:00
parent 47917094ad
commit adb58d9200
3 changed files with 9 additions and 2 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ import {
BrowserWindow,
dialog,
ipcMain,
net,
shell,
type NotificationConstructorOptions,
type IpcMainInvokeEvent
@@ -6318,7 +6319,7 @@ export function registerIpcHandlers(
if (profile.authentication === 'api-key' && !profile.apiKey) {
throw new Error(`监督者模型连接“${profile.name}”未配置 API Key`)
}
return createModelProfileRuntime(settings.workspacePath, settings, profile)
return createModelProfileRuntime(settings.workspacePath, settings, profile, net.fetch)
}
const supervisorService = createProductionSupervisorService(supervisionDatabase,
async () => applicationSettingsStore?.get(), resolveSupervisorRuntime, supervisionModelPool,