diff --git a/main.js b/main.js index eeeed4445..426c74a3a 100644 --- a/main.js +++ b/main.js @@ -740,13 +740,30 @@ async function startApp() { debugLogger.debug("Parakeet startup init error (non-fatal)", { error: err.message }); }); - if (process.env.REASONING_PROVIDER === "local" && process.env.LOCAL_REASONING_MODEL) { + // TODO: drop legacy REASONING_PROVIDER / LOCAL_REASONING_MODEL fallbacks after 2 releases. + const cleanupProvider = process.env.CLEANUP_PROVIDER || process.env.REASONING_PROVIDER; + const cleanupLocalModel = + process.env.LOCAL_CLEANUP_MODEL || process.env.LOCAL_REASONING_MODEL; + if (cleanupProvider === "local" && cleanupLocalModel) { const modelManager = require("./src/helpers/modelManagerBridge").default; - modelManager.prewarmServer(process.env.LOCAL_REASONING_MODEL).catch((err) => { + modelManager.prewarmServer(cleanupLocalModel).catch((err) => { debugLogger.debug("llama-server pre-warm error (non-fatal)", { error: err.message }); }); } + if ( + process.env.DICTATION_AGENT_PROVIDER === "local" && + process.env.LOCAL_DICTATION_AGENT_MODEL && + process.env.LOCAL_DICTATION_AGENT_MODEL !== cleanupLocalModel + ) { + const modelManager = require("./src/helpers/modelManagerBridge").default; + modelManager.prewarmServer(process.env.LOCAL_DICTATION_AGENT_MODEL).catch((err) => { + debugLogger.debug("dictation-agent llama-server pre-warm error (non-fatal)", { + error: err.message, + }); + }); + } + // Auto-download diarization models if binary is available if ( diarizationManager.getBinaryPath() && diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsx index e2596715a..724980716 100644 --- a/src/components/ControlPanel.tsx +++ b/src/components/ControlPanel.tsx @@ -79,7 +79,7 @@ export default function ControlPanel() { const { useLocalWhisper, localTranscriptionProvider, - useReasoningModel, + useCleanupModel, setUseLocalWhisper, setCloudTranscriptionMode, } = useSettings(); @@ -242,7 +242,7 @@ export default function ControlPanel() { if (status?.gpuInfo.hasNvidiaGpu && !status.downloaded) results.cuda = true; } catch {} } - if (useReasoningModel) { + if (useCleanupModel) { try { const [gpu, vulkan] = await Promise.all([ window.electronAPI?.detectVulkanGpu?.(), @@ -254,7 +254,7 @@ export default function ControlPanel() { setGpuAccelAvailable(results); }; detect(); - }, [useLocalWhisper, localTranscriptionProvider, useReasoningModel, gpuBannerDismissed]); + }, [useLocalWhisper, localTranscriptionProvider, useCleanupModel, gpuBannerDismissed]); useEffect(() => { const cleanup = window.electronAPI?.onNavigateToMeetingNote?.((data) => { @@ -447,17 +447,17 @@ export default function ControlPanel() { let finalTranscription = result.transcription; // Apply AI reasoning if enabled - if (useReasoningModel) { + if (useCleanupModel) { try { const [ { default: ReasoningService }, - { getEffectiveReasoningModel, isCloudReasoningMode }, + { getEffectiveCleanupModel, isCloudCleanupMode }, ] = await Promise.all([ import("../services/ReasoningService"), import("../stores/settingsStore"), ]); - const model = getEffectiveReasoningModel(); - const isCloud = isCloudReasoningMode(); + const model = getEffectiveCleanupModel(); + const isCloud = isCloudCleanupMode(); if (model || isCloud) { const agentName = localStorage.getItem("agentName") || null; const reasonedText = await ReasoningService.processText(rawText, model, agentName); @@ -493,7 +493,7 @@ export default function ControlPanel() { }); } }, - [toast, t, useReasoningModel] + [toast, t, useCleanupModel] ); const handleUpdateClick = async () => { @@ -791,7 +791,7 @@ export default function ControlPanel() { setShowCloudMigrationBanner={setShowCloudMigrationBanner} aiCTADismissed={aiCTADismissed} setAiCTADismissed={setAiCTADismissed} - useReasoningModel={useReasoningModel} + useCleanupModel={useCleanupModel} copyToClipboard={copyToClipboard} deleteTranscription={deleteTranscription} clearAllTranscriptions={clearAllTranscriptions} diff --git a/src/components/HistoryView.tsx b/src/components/HistoryView.tsx index 7fe6acfd1..a1b2f222f 100644 --- a/src/components/HistoryView.tsx +++ b/src/components/HistoryView.tsx @@ -19,7 +19,7 @@ interface HistoryViewProps { setShowCloudMigrationBanner: (show: boolean) => void; aiCTADismissed: boolean; setAiCTADismissed: (dismissed: boolean) => void; - useReasoningModel: boolean; + useCleanupModel: boolean; copyToClipboard: (text: string) => void; deleteTranscription: (id: number) => void; clearAllTranscriptions: () => void; @@ -36,7 +36,7 @@ export default function HistoryView({ setShowCloudMigrationBanner, aiCTADismissed, setAiCTADismissed, - useReasoningModel, + useCleanupModel, copyToClipboard, deleteTranscription, clearAllTranscriptions, @@ -111,7 +111,7 @@ export default function HistoryView({ )} - {!useReasoningModel && !aiCTADismissed && ( + {!useCleanupModel && !aiCTADismissed && (