Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
fix(settings): enforce auto-end and request timeout defaults (#1755)
Chad Piha77c6661e1d6a
diff --git a/src/components/SettingsPage.tsx b/src/components/SettingsPage.tsxindex 53a724a73..1e043f78b 100644--- a/src/components/SettingsPage.tsx+++ b/src/components/SettingsPage.tsx@@ -110,11 +110,6 @@ import { GRADIENT_CIRCLE } from "./ui/gradientCircle";import { Popover, PopoverContent, PopoverTrigger } from "./ui/popover";import { startMigration, useMigration } from "../stores/noteStore.js";import { syncService } from "../services/SyncService.js";-import {- LLM_REQUEST_TIMEOUT_SECONDS_MIN,- LLM_REQUEST_TIMEOUT_SECONDS_MAX,- resolveLlmRequestTimeoutSeconds,-} from "../helpers/llmRequestTimeout.js";import { formatBytes } from "../utils/formatBytes";import {clearMissingLocalModelSelections,@@ -682,8 +677,6 @@ function LlmsTabs({}) {const { t } = useTranslation();const agentAllowed = usePolicyStore(isAgentAllowed);- const llmRequestTimeoutSeconds = useSettingsStore((s) => s.llmRequestTimeoutSeconds);- const setLlmRequestTimeoutSeconds = useSettingsStore((s) => s.setLlmRequestTimeoutSeconds);const visibleTabIds = agentAllowed? LLM_TABS: LLM_TABS.filter((tabId) => !AGENT_LLM_TABS.has(tabId));@@ -724,35 +717,6 @@ function LlmsTabs({{agentAllowed && (<TabPanel active={tab === "chatIntelligence"}>{renderChatIntelligence()}</TabPanel>)}-- {/* Applies to every scope above — the timeout setting is global, not per-scope. */}- <div className="border-t border-border/40 pt-4 mt-4">- <SettingsPanel>- <SettingsPanelRow>- <SettingsRow- label={t("settingsPage.llms.requestTimeout.label")}- description={t("settingsPage.llms.requestTimeout.description")}- >- <Input- type="number"- min={LLM_REQUEST_TIMEOUT_SECONDS_MIN}- max={LLM_REQUEST_TIMEOUT_SECONDS_MAX}- step={5}- value={llmRequestTimeoutSeconds}- onChange={(e) => setLlmRequestTimeoutSeconds(Number(e.target.value))}- // Clamp on blur so the stored value always matches the effective- // one (point of use clamps to 10-600s; a cleared field stores 0).- onBlur={() =>- setLlmRequestTimeoutSeconds(- resolveLlmRequestTimeoutSeconds(llmRequestTimeoutSeconds)- )- }- className="w-20"- />- </SettingsRow>- </SettingsPanelRow>- </SettingsPanel>- </div></div>);}diff --git a/src/components/settings/MeetingSettings.tsx b/src/components/settings/MeetingSettings.tsxindex b9c2f2c91..97e83fecd 100644--- a/src/components/settings/MeetingSettings.tsx+++ b/src/components/settings/MeetingSettings.tsx@@ -30,21 +30,6 @@ export function MeetingSpeakerDetectionRow() {);}-export function MeetingAutoEndRow() {- const { t } = useTranslation();- const meetingAutoEndEnabled = useSettingsStore((s) => s.meetingAutoEndEnabled);- const setMeetingAutoEndEnabled = useSettingsStore((s) => s.setMeetingAutoEndEnabled);-- return (- <SettingsRow- label={t("settings.meeting.autoEnd.title")}- description={t("settings.meeting.autoEnd.description")}- >- <Toggle checked={meetingAutoEndEnabled} onChange={setMeetingAutoEndEnabled} />- </SettingsRow>- );-}-const noop = () => {};export function MeetingTranscriptionPanel() {@@ -170,7 +155,6 @@ export function MeetingTranscriptionPanel() {{effectiveTranscriptionMode === "providers" && renderTranscriptionPicker("cloud")}{effectiveTranscriptionMode === "local" && renderTranscriptionPicker("local")}<MeetingSpeakerDetectionRow />- <MeetingAutoEndRow /></div>);}diff --git a/src/helpers/llmRequestTimeout.js b/src/helpers/llmRequestTimeout.jsindex f4f49b330..382a58a52 100644--- a/src/helpers/llmRequestTimeout.js+++ b/src/helpers/llmRequestTimeout.js@@ -1,22 +1,6 @@-// Every non-streaming reasoning request (cleanup, note formatting, chat/dictation-// agent tool calls, self-hosted LAN calls) shares one configurable abort timeout.-// Self-hosted/local models can legitimately take well past the historical 30s-// default; the range below just keeps a bad or hand-edited value from firing-// instantly or hanging forever. Streaming requests read the same configured-// value too, floored at LLM_STREAMING_TIMEOUT_FLOOR_SECONDS below so raising-// this setting can only extend streaming's wall-clock budget, never shorten it.-export const LLM_REQUEST_TIMEOUT_SECONDS_MIN = 10;-export const LLM_REQUEST_TIMEOUT_SECONDS_MAX = 600;-export const LLM_REQUEST_TIMEOUT_SECONDS_DEFAULT = 30;+const LLM_REQUEST_TIMEOUT_SECONDS = 30;+const LLM_STREAMING_TIMEOUT_SECONDS = 60;-// Streaming's abort budget has always been 60s; letting the configurable-// setting drop below that would regress existing users, so this is the floor.-export const LLM_STREAMING_TIMEOUT_FLOOR_SECONDS = 60;--export function resolveLlmRequestTimeoutSeconds(configured) {- const seconds = Number.isFinite(configured) ? configured : LLM_REQUEST_TIMEOUT_SECONDS_DEFAULT;- return Math.min(- LLM_REQUEST_TIMEOUT_SECONDS_MAX,- Math.max(LLM_REQUEST_TIMEOUT_SECONDS_MIN, seconds)- );+export function getLlmRequestTimeoutSeconds({ streaming = false } = {}) {+ return streaming ? LLM_STREAMING_TIMEOUT_SECONDS : LLM_REQUEST_TIMEOUT_SECONDS;}diff --git a/src/helpers/meetingDetectionEngine.js b/src/helpers/meetingDetectionEngine.jsindex cb70694b5..c97e272d7 100644--- a/src/helpers/meetingDetectionEngine.js+++ b/src/helpers/meetingDetectionEngine.js@@ -48,7 +48,7 @@ class MeetingDetectionEngine {this.windowManager = windowManager;this.databaseManager = databaseManager;this.activeDetections = new Map();- this.preferences = { processDetection: true, audioDetection: true, autoEnd: true };+ this.preferences = { processDetection: true, audioDetection: true };this._userRecording = false;this._meetingModeActive = false;this._notificationQueue = [];@@ -176,8 +176,7 @@ class MeetingDetectionEngine {_isAutoEndWanted() {return (this._recordingSession?.autoEndEligible === true &&- this._recordingSession.systemAudioAvailable === true &&- this.preferences.autoEnd !== false+ this._recordingSession.systemAudioAvailable === true);}@@ -745,17 +744,11 @@ class MeetingDetectionEngine {setPreferences(prefs) {debugLogger.info("Updating detection preferences", prefs, "meeting");- const autoEndWasWanted = this._isAutoEndWanted();- Object.assign(this.preferences, prefs);- const autoEndWanted = this._isAutoEndWanted();-- // Toggling auto-end mid-recording takes effect immediately: off dismisses- // any visible countdown (the recording itself continues); on arms a fresh- // session from the current mic-ownership state.- if (autoEndWasWanted && !autoEndWanted) {- this._deactivateAutoEnd();- } else if (!autoEndWasWanted && autoEndWanted && this._recordingSession) {- void this._activateAutoEnd(this._recordingSession.sessionId);+ if (typeof prefs?.processDetection === "boolean") {+ this.preferences.processDetection = prefs.processDetection;+ }+ if (typeof prefs?.audioDetection === "boolean") {+ this.preferences.audioDetection = prefs.audioDetection;}this._syncMeetingProcessDetector();diff --git a/src/hooks/useSettings.ts b/src/hooks/useSettings.tsindex 6dc8ffd2f..d269a2528 100644--- a/src/hooks/useSettings.ts+++ b/src/hooks/useSettings.ts@@ -263,8 +263,6 @@ function useSettingsInternal() {remoteTranscriptionModel: store.remoteTranscriptionModel,cleanupMode: store.cleanupMode,cleanupRemoteUrl: store.cleanupRemoteUrl,- llmRequestTimeoutSeconds: store.llmRequestTimeoutSeconds,- setLlmRequestTimeoutSeconds: store.setLlmRequestTimeoutSeconds,customDictionary: store.customDictionary,snippets: store.snippets,setSnippets: store.setSnippets,diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex ef13df9eb..e6b1fd43f 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -29,10 +29,6 @@"speakerDetection": {"title": "Sprecher erkennen und beschriften","description": "Wenn deaktiviert, zeigen Transkripte „Du“ und „Andere“"- },- "autoEnd": {- "title": "Vergessene Aufnahmen automatisch beenden",- "description": "Beendet Meeting-Aufnahmen automatisch, wenn das Gespräch beendet scheint – nach einem Countdown, den Sie abbrechen können"}}},@@ -2129,10 +2125,6 @@"noteFormatting": "Notizformatierung","chatIntelligence": "Chat","dictationTranslation": "Übersetzung"- },- "requestTimeout": {- "label": "Zeitlimit für Anfragen (Sekunden)",- "description": "Wie lange auf eine Antwort gewartet wird, bevor abgebrochen wird. Selbst gehostete oder lokale Modelle benötigen oft mehr als die Standardeinstellung von 30 s, besonders bei langen Notizen."}},"noteFormatting": {diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex 2bf1b4490..5adfc0123 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -29,10 +29,6 @@"speakerDetection": {"title": "Identify and label speakers","description": "When off, transcripts show \"You\" and \"Others\""- },- "autoEnd": {- "title": "Auto-end forgotten recordings",- "description": "Stop meeting recordings automatically when the call seems over, after a countdown you can cancel"}}},@@ -2129,10 +2125,6 @@"noteFormatting": "Note Formatting","chatIntelligence": "Chat","dictationTranslation": "Translation"- },- "requestTimeout": {- "label": "Request timeout (seconds)",- "description": "How long to wait for a response before giving up. Self-hosted or local models may need more than the default 30s, especially for long notes."}},"noteFormatting": {diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex 0555a0b38..93c8b05e4 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -29,10 +29,6 @@"speakerDetection": {"title": "Identificar y etiquetar participantes","description": "Cuando está desactivado, las transcripciones muestran \"Tú\" y \"Otros\""- },- "autoEnd": {- "title": "Finalizar grabaciones olvidadas",- "description": "Detiene las grabaciones de reuniones automáticamente cuando la llamada parece haber terminado, tras una cuenta atrás que puedes cancelar"}}},@@ -1893,10 +1889,6 @@"noteFormatting": "Formato de notas","chatIntelligence": "Chat","dictationTranslation": "Traducción"- },- "requestTimeout": {- "label": "Tiempo de espera de la solicitud (segundos)",- "description": "Cuánto tiempo esperar una respuesta antes de desistir. Los modelos autoalojados o locales pueden necesitar más de los 30 s predeterminados, sobre todo con notas largas."}},"noteFormatting": {diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex 7f59dfc2c..e34e2af67 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -29,10 +29,6 @@"speakerDetection": {"title": "Identifier et étiqueter les intervenants","description": "Lorsque désactivé, les transcriptions affichent « Vous » et « Autres »"- },- "autoEnd": {- "title": "Terminer les enregistrements oubliés",- "description": "Arrête automatiquement les enregistrements de réunion quand l'appel semble terminé, après un compte à rebours annulable"}}},@@ -2129,10 +2125,6 @@"noteFormatting": "Mise en forme des notes","chatIntelligence": "Chat","dictationTranslation": "Traduction"- },- "requestTimeout": {- "label": "Délai d'expiration de la requête (secondes)",- "description": "Durée d'attente d'une réponse avant abandon. Les modèles auto-hébergés ou locaux peuvent nécessiter plus que les 30 s par défaut, surtout pour les notes longues."}},"noteFormatting": {diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex 587d76d54..cf3160891 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -29,10 +29,6 @@"speakerDetection": {"title": "Identifica ed etichetta i partecipanti","description": "Se disattivato, le trascrizioni mostrano \"Tu\" e \"Altri\""- },- "autoEnd": {- "title": "Termina le registrazioni dimenticate",- "description": "Interrompe automaticamente le registrazioni delle riunioni quando la chiamata sembra finita, dopo un conto alla rovescia annullabile"}}},@@ -1845,10 +1841,6 @@"noteFormatting": "Formattazione note","chatIntelligence": "Chat","dictationTranslation": "Traduzione"- },- "requestTimeout": {- "label": "Timeout della richiesta (secondi)",- "description": "Per quanto tempo attendere una risposta prima di rinunciare. I modelli self-hosted o locali possono richiedere più dei 30 s predefiniti, soprattutto per le note lunghe."}},"noteFormatting": {diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex f8d644a46..a291fa9f8 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -29,10 +29,6 @@"speakerDetection": {"title": "話者を識別してラベル付け","description": "オフにすると、文字起こしには「あなた」と「他の人」と表示されます"- },- "autoEnd": {- "title": "停止し忘れた録音を自動終了",- "description": "通話が終わったと判断されると、キャンセル可能なカウントダウンの後に会議の録音を自動的に停止します"}}},@@ -1845,10 +1841,6 @@"noteFormatting": "ノートのフォーマット","chatIntelligence": "チャット","dictationTranslation": "翻訳"- },- "requestTimeout": {- "label": "リクエストのタイムアウト(秒)",- "description": "応答を待つ時間の上限です。セルフホストやローカルモデルでは、特に長いノートの場合、デフォルトの30秒より長い時間が必要になることがあります。"}},"noteFormatting": {diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex 5b9a12e7e..b46367e7f 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -29,10 +29,6 @@"speakerDetection": {"title": "Identificar e rotular participantes","description": "Quando desativado, as transcrições mostram \"Você\" e \"Outros\""- },- "autoEnd": {- "title": "Encerrar gravações esquecidas",- "description": "Para as gravações de reunião automaticamente quando a chamada parece ter terminado, após uma contagem regressiva que você pode cancelar"}}},@@ -1824,10 +1820,6 @@"noteFormatting": "Formatação de notas","chatIntelligence": "Chat","dictationTranslation": "Tradução"- },- "requestTimeout": {- "label": "Tempo limite da solicitação (segundos)",- "description": "Quanto tempo aguardar por uma resposta antes de desistir. Modelos auto-hospedados ou locais podem precisar de mais que os 30 s padrão, especialmente para notas longas."}},"noteFormatting": {diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex 1459b201c..a1c58610d 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -29,10 +29,6 @@"speakerDetection": {"title": "Распознавать и подписывать участников","description": "Если выключено, в транскриптах отображаются «Вы» и «Другие»"- },- "autoEnd": {- "title": "Автозавершение забытых записей",- "description": "Автоматически останавливает запись встречи, когда звонок, похоже, завершён — после обратного отсчёта, который можно отменить"}}},@@ -1851,10 +1847,6 @@"noteFormatting": "Форматирование заметок","chatIntelligence": "Чат","dictationTranslation": "Перевод"- },- "requestTimeout": {- "label": "Тайм-аут запроса (секунды)",- "description": "Как долго ждать ответа, прежде чем отменить запрос. Локальным или self-hosted моделям может потребоваться больше стандартных 30 секунд, особенно для длинных заметок."}},"noteFormatting": {diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex 52aabf4c9..3dfb530f2 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -29,10 +29,6 @@"speakerDetection": {"title": "识别并标记发言者","description": "关闭后,转写会显示\"你\"和\"其他人\""- },- "autoEnd": {- "title": "自动结束遗忘的录音",- "description": "当通话似乎已结束时,在可取消的倒计时后自动停止会议录音"}}},@@ -1845,10 +1841,6 @@"noteFormatting": "笔记格式化","chatIntelligence": "聊天","dictationTranslation": "翻译"- },- "requestTimeout": {- "label": "请求超时时间(秒)",- "description": "放弃前等待响应的时长。自托管或本地模型可能需要超过默认的 30 秒,尤其是处理较长的笔记时。"}},"noteFormatting": {diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex 60f75002b..79859676f 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -29,10 +29,6 @@"speakerDetection": {"title": "辨識並標記發言者","description": "關閉後,逐字稿會顯示「你」和「其他人」"- },- "autoEnd": {- "title": "自動結束遺忘的錄音",- "description": "當通話似乎已結束時,在可取消的倒數後自動停止會議錄音"}}},@@ -1845,10 +1841,6 @@"noteFormatting": "筆記格式化","chatIntelligence": "聊天","dictationTranslation": "翻譯"- },- "requestTimeout": {- "label": "請求逾時時間(秒)",- "description": "放棄前等待回應的時長。自架或本機模型可能需要超過預設的 30 秒,尤其是處理較長的筆記時。"}},"noteFormatting": {diff --git a/src/services/ReasoningService.ts b/src/services/ReasoningService.tsindex 467906260..66704b20b 100644--- a/src/services/ReasoningService.ts+++ b/src/services/ReasoningService.ts@@ -14,10 +14,7 @@ import logger from "../utils/logger";import { getSettings, isCloudCleanupMode } from "../stores/settingsStore";import { wrapCleanupTranscript } from "../config/prompts";import { stripThinkingTags } from "../helpers/stripThinking.js";-import {- resolveLlmRequestTimeoutSeconds,- LLM_STREAMING_TIMEOUT_FLOOR_SECONDS,-} from "../helpers/llmRequestTimeout.js";+import { getLlmRequestTimeoutSeconds } from "../helpers/llmRequestTimeout.js";import { streamText, stepCountIs } from "ai";import { getAIModel } from "./ai/providers";import { createEnterpriseChatModel } from "./ai/enterpriseChatModel";@@ -324,9 +321,7 @@ class ReasoningService extends BaseReasoningService {}const controller = new AbortController();this.activeRequestControllers.add(controller);- const timeoutSeconds = resolveLlmRequestTimeoutSeconds(- getSettings().llmRequestTimeoutSeconds- );+ const timeoutSeconds = getLlmRequestTimeoutSeconds();const timeoutId = setTimeout(() => controller.abort(), timeoutSeconds * 1000);try {const headers: Record<string, string> = {@@ -626,10 +621,7 @@ class ReasoningService extends BaseReasoningService {headers["Authorization"] = `Bearer ${apiKey}`;}- const timeoutSeconds = Math.max(- resolveLlmRequestTimeoutSeconds(getSettings().llmRequestTimeoutSeconds),- LLM_STREAMING_TIMEOUT_FLOOR_SECONDS- );+ const timeoutSeconds = getLlmRequestTimeoutSeconds({ streaming: true });let timeoutTriggered = false;const timeoutId = setTimeout(() => {if (abortController.signal.aborted) return;diff --git a/src/services/ai/inferenceProviders/gemini.ts b/src/services/ai/inferenceProviders/gemini.tsindex 503f6039d..35100695d 100644--- a/src/services/ai/inferenceProviders/gemini.ts+++ b/src/services/ai/inferenceProviders/gemini.ts@@ -2,8 +2,7 @@ import type { InferenceProvider } from "./types";import { getCloudModel } from "../../../models/ModelRegistry";import { withRetry, createApiRetryStrategy, httpError } from "../../../utils/retry";import { API_ENDPOINTS, TOKEN_LIMITS } from "../../../config/constants";-import { getSettings } from "../../../stores/settingsStore";-import { resolveLlmRequestTimeoutSeconds } from "../../../helpers/llmRequestTimeout.js";+import { getLlmRequestTimeoutSeconds } from "../../../helpers/llmRequestTimeout.js";import { wrapCleanupTranscript } from "../../../config/prompts";import { extractApiErrorMessage } from "../apiErrorMessage";import logger from "../../../utils/logger";@@ -86,9 +85,7 @@ export const geminiProvider: InferenceProvider = {});const controller = new AbortController();- const timeoutSeconds = resolveLlmRequestTimeoutSeconds(- getSettings().llmRequestTimeoutSeconds- );+ const timeoutSeconds = getLlmRequestTimeoutSeconds();const timeoutId = setTimeout(() => controller.abort(), timeoutSeconds * 1000);try {const res = await fetch(`${API_ENDPOINTS.GEMINI}/models/${model}:generateContent`, {diff --git a/src/services/ai/inferenceProviders/openai.ts b/src/services/ai/inferenceProviders/openai.tsindex a48c1816a..648fabed1 100644--- a/src/services/ai/inferenceProviders/openai.ts+++ b/src/services/ai/inferenceProviders/openai.ts@@ -11,7 +11,7 @@ import {isTruncatedFinishReason,} from "../chatRequestBody";import { detectEndpointDialect } from "../thinkingSuppressionDialects";-import { resolveLlmRequestTimeoutSeconds } from "../../../helpers/llmRequestTimeout.js";+import { getLlmRequestTimeoutSeconds } from "../../../helpers/llmRequestTimeout.js";import { extractApiErrorMessage } from "../apiErrorMessage";import { wrapCleanupTranscript } from "../../../config/prompts";@@ -215,9 +215,7 @@ export const openaiProvider: InferenceProvider = {for (const { url: endpoint, type } of endpointCandidates) {const controller = new AbortController();- const timeoutSeconds = resolveLlmRequestTimeoutSeconds(- getSettings().llmRequestTimeoutSeconds- );+ const timeoutSeconds = getLlmRequestTimeoutSeconds();const timeoutId = setTimeout(() => controller.abort(), timeoutSeconds * 1000);try {const maxTokens =diff --git a/src/services/ai/inferenceProviders/tinfoil.ts b/src/services/ai/inferenceProviders/tinfoil.tsindex a49b70278..26f5b5d51 100644--- a/src/services/ai/inferenceProviders/tinfoil.ts+++ b/src/services/ai/inferenceProviders/tinfoil.ts@@ -4,8 +4,7 @@ import { withRetry, createApiRetryStrategy } from "../../../utils/retry";import logger from "../../../utils/logger";import { applyChatCompletionsParams, isTruncatedFinishReason } from "../chatRequestBody";import { getTinfoilChatClient } from "../tinfoilClient";-import { getSettings } from "../../../stores/settingsStore";-import { resolveLlmRequestTimeoutSeconds } from "../../../helpers/llmRequestTimeout.js";+import { getLlmRequestTimeoutSeconds } from "../../../helpers/llmRequestTimeout.js";import { wrapCleanupTranscript } from "../../../config/prompts";export const tinfoilProvider: InferenceProvider = {@@ -40,10 +39,8 @@ export const tinfoilProvider: InferenceProvider = {const requestBody: Record<string, unknown> = { model, messages };applyChatCompletionsParams(requestBody, { model, provider: "tinfoil", config, maxTokens });- // Configurable timeout per attempt like sibling providers; SDK-internal- // retries off so withRetry stays the single retry layer.- const timeoutMs =- resolveLlmRequestTimeoutSeconds(getSettings().llmRequestTimeoutSeconds) * 1000;+ // Keep SDK-internal retries off so withRetry stays the single retry layer.+ const timeoutMs = getLlmRequestTimeoutSeconds() * 1000;const response = await withRetry(() =>client.chat.completions.create(requestBody as any, {diff --git a/src/stores/settingsStore.ts b/src/stores/settingsStore.tsindex d04f1866c..c6059ad6e 100644--- a/src/stores/settingsStore.ts+++ b/src/stores/settingsStore.ts@@ -260,7 +260,6 @@ const BOOLEAN_SETTINGS = new Set(["floatingIconAutoHide","startMinimized","meetingProcessDetection",- "meetingAutoEndEnabled","speakerDiarizationEnabled","dictationSileroEnabled","noteRecordingSileroEnabled",@@ -299,7 +298,6 @@ const NUMERIC_SETTINGS = new Set(["micWarmHoldSeconds","audioRetentionDays","transcriptRetentionDays",- "llmRequestTimeoutSeconds","whisperVadThreshold","whisperVadMinSpeechDurationMs","whisperVadMinSilenceDurationMs",@@ -611,7 +609,6 @@ export interface SettingsStatemcalPrimaryOnly: boolean;appleCalendarConnected: boolean;meetingProcessDetection: boolean;- meetingAutoEndEnabled: boolean;speakerDiarizationEnabled: boolean;dictationSileroEnabled: boolean;noteRecordingSileroEnabled: boolean;@@ -635,10 +632,6 @@ export interface SettingsStateremoteTranscriptionModel: string;cleanupMode: InferenceMode;cleanupRemoteUrl: string;- // Abort timeout for LLM requests (cleanup, note formatting, agent tool calls,- // self-hosted LAN calls), in seconds. Clamped to a sane range at the point of- // use, and floored at 60s for streaming — see src/helpers/llmRequestTimeout.js.- llmRequestTimeoutSeconds: number;meetingTranscriptionMode: InferenceMode;meetingUseLocalWhisper: boolean;@@ -741,7 +734,6 @@ export interface SettingsStatesetRemoteTranscriptionModel: (model: string) => void;setCleanupMode: (mode: InferenceMode) => void;setCleanupRemoteUrl: (url: string) => void;- setLlmRequestTimeoutSeconds: (seconds: number) => void;setMeetingTranscriptionMode: (mode: InferenceMode) => void;setMeetingUseLocalWhisper: (value: boolean) => void;@@ -915,7 +907,6 @@ export interface SettingsStatesetMcalPrimaryOnly: (value: boolean) => void;setAppleCalendarConnected: (value: boolean) => void;setMeetingProcessDetection: (value: boolean) => void;- setMeetingAutoEndEnabled: (value: boolean) => void;setSpeakerDiarizationEnabled: (value: boolean) => void;setDictationSileroEnabled: (value: boolean) => void;setNoteRecordingSileroEnabled: (value: boolean) => void;@@ -1340,7 +1331,6 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({mcalPrimaryOnly: readBoolean("mcalPrimaryOnly", true),appleCalendarConnected: readBoolean("appleCalendarConnected", false),meetingProcessDetection: readBoolean("meetingProcessDetection", true),- meetingAutoEndEnabled: readBoolean("meetingAutoEndEnabled", true),speakerDiarizationEnabled: readBoolean("speakerDiarizationEnabled", true),// Off by default: VAD on pause-heavy dictations can strip the speech and make// Whisper hallucinate the dictionary prompt as the transcript (#1454).@@ -1401,7 +1391,6 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({return "openwhispr" as InferenceMode;})(),cleanupRemoteUrl: readString("cleanupRemoteUrl", ""),- llmRequestTimeoutSeconds: readNumber("llmRequestTimeoutSeconds", 30),meetingTranscriptionMode: (() => {const v = readString("meetingTranscriptionMode", "openwhispr");@@ -1499,7 +1488,6 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({setRemoteTranscriptionModel: createStringSetter("remoteTranscriptionModel"),setCleanupMode: createStringSetter("cleanupMode") as (mode: InferenceMode) => void,setCleanupRemoteUrl: createStringSetter("cleanupRemoteUrl"),- setLlmRequestTimeoutSeconds: createNumberSetter("llmRequestTimeoutSeconds"),setMeetingTranscriptionMode: createStringSetter("meetingTranscriptionMode") as (mode: InferenceMode@@ -2100,14 +2088,6 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({},setAppleCalendarConnected: createBooleanSetter("appleCalendarConnected"),setMeetingProcessDetection: createBooleanSetter("meetingProcessDetection"),- setMeetingAutoEndEnabled: (value: boolean) => {- if (isBrowser) localStorage.setItem("meetingAutoEndEnabled", String(value));- useSettingsStore.setState({ meetingAutoEndEnabled: value });- // Takes effect immediately — a live countdown is dismissed when turned off.- if (isBrowser) {- window.electronAPI?.meetingDetectionSetPreferences?.({ autoEnd: value });- }- },setSpeakerDiarizationEnabled: (value: boolean) => {if (isBrowser) localStorage.setItem("speakerDiarizationEnabled", String(value));useSettingsStore.setState({ speakerDiarizationEnabled: value });@@ -3152,7 +3132,6 @@ export async function initializeSettings(): Promise<void> {const currentState = useSettingsStore.getState();await window.electronAPI.meetingDetectionSetPreferences?.({processDetection: currentState.meetingProcessDetection,- autoEnd: currentState.meetingAutoEndEnabled,});} catch (err) {logger.warn(diff --git a/test/helpers/llmRequestTimeout.test.js b/test/helpers/llmRequestTimeout.test.jsindex 460e1f523..40d205f77 100644--- a/test/helpers/llmRequestTimeout.test.js+++ b/test/helpers/llmRequestTimeout.test.js@@ -3,60 +3,16 @@ const assert = require("node:assert/strict");const load = () => import("../../src/helpers/llmRequestTimeout.js");-test("uses the configured value when it's within range", async () => {- const { resolveLlmRequestTimeoutSeconds } = await load();- assert.equal(resolveLlmRequestTimeoutSeconds(90), 90);-});--test("falls back to the 30s default when unset or invalid", async () => {- const { resolveLlmRequestTimeoutSeconds } = await load();- assert.equal(resolveLlmRequestTimeoutSeconds(undefined), 30);- assert.equal(resolveLlmRequestTimeoutSeconds(NaN), 30);-});--test("clamps below the 10s floor", async () => {- const { resolveLlmRequestTimeoutSeconds } = await load();- assert.equal(resolveLlmRequestTimeoutSeconds(1), 10);-});--test("clamps 0 and negative values to the 10s floor rather than disabling", async () => {- const { resolveLlmRequestTimeoutSeconds } = await load();- assert.equal(resolveLlmRequestTimeoutSeconds(0), 10);- assert.equal(resolveLlmRequestTimeoutSeconds(-5), 10);-});--test("clamps above the 600s ceiling", async () => {- const { resolveLlmRequestTimeoutSeconds } = await load();- assert.equal(resolveLlmRequestTimeoutSeconds(9999), 600);-});+test("non-streaming LLM requests use the fixed 30-second timeout", async () => {+ const { getLlmRequestTimeoutSeconds } = await load();-test("exposes the 60s streaming timeout floor", async () => {- const { LLM_STREAMING_TIMEOUT_FLOOR_SECONDS } = await load();- assert.equal(LLM_STREAMING_TIMEOUT_FLOOR_SECONDS, 60);+ assert.equal(typeof getLlmRequestTimeoutSeconds, "function");+ assert.equal(getLlmRequestTimeoutSeconds(), 30);});-test("streaming's floor keeps a low configured value at 60s", async () => {- const { resolveLlmRequestTimeoutSeconds, LLM_STREAMING_TIMEOUT_FLOOR_SECONDS } = await load();- const streamingTimeout = Math.max(- resolveLlmRequestTimeoutSeconds(30),- LLM_STREAMING_TIMEOUT_FLOOR_SECONDS- );- assert.equal(streamingTimeout, 60);-});--test("streaming's floor lets a high configured value raise it above 60s", async () => {- const { resolveLlmRequestTimeoutSeconds, LLM_STREAMING_TIMEOUT_FLOOR_SECONDS } = await load();- const streamingTimeout = Math.max(- resolveLlmRequestTimeoutSeconds(120),- LLM_STREAMING_TIMEOUT_FLOOR_SECONDS- );- assert.equal(streamingTimeout, 120);-});+test("streaming LLM requests keep their fixed 60-second timeout", async () => {+ const { getLlmRequestTimeoutSeconds } = await load();-test("millisecond conversion for SDK timeouts (tinfoil) honors default and override", async () => {- const { resolveLlmRequestTimeoutSeconds } = await load();- // The Tinfoil provider passes resolveLlmRequestTimeoutSeconds(x) * 1000 as the- // SDK per-attempt timeout; pin the arithmetic for the default and an override.- assert.equal(resolveLlmRequestTimeoutSeconds(undefined) * 1000, 30_000);- assert.equal(resolveLlmRequestTimeoutSeconds(90) * 1000, 90_000);+ assert.equal(typeof getLlmRequestTimeoutSeconds, "function");+ assert.equal(getLlmRequestTimeoutSeconds({ streaming: true }), 60);});diff --git a/test/helpers/meetingDetectionEngineAutoEnd.test.js b/test/helpers/meetingDetectionEngineAutoEnd.test.jsindex ae06998ef..a1657f51e 100644--- a/test/helpers/meetingDetectionEngineAutoEnd.test.js+++ b/test/helpers/meetingDetectionEngineAutoEnd.test.js@@ -531,16 +531,13 @@ test("keep recording after countdown expiry reports a stale session", async () =engine.stop();});-test("the autoEnd preference disables the feature mid-recording and re-enabling arms a fresh session", async () => {- const {- audioActivityDetector,- clock,- dismissedCountdowns,- engine,- micState,- owner,- shownCountdowns,- } = createEngine();+test("a legacy autoEnd preference cannot disable eligible meeting auto-end", async () => {+ const { audioActivityDetector, clock, engine, micState, owner, shownCountdowns } = createEngine();+ engine.setPreferences({ audioDetection: false, processDetection: false, autoEnd: false });+ assert.deepEqual(engine.getPreferences(), {+ processDetection: false,+ audioDetection: false,+ });await engine.beginRecordingSession({sessionId: "meeting-1",@@ -548,43 +545,15 @@ test("the autoEnd preference disables the feature mid-recording and re-enablingownerWebContents: owner(),systemAudioAvailable: true,});+ assert.equal(audioActivityDetector.running, true);+ assert.equal(clock.activeIntervals(), 1);+clock.advance(OWNERSHIP_MIN_ACTIVE_MS);micState(true, false);assert.equal(shownCountdowns.length, 1);engine.setPreferences({ autoEnd: false });- assert.deepEqual(dismissedCountdowns, ["meeting-1"]);- assert.equal(clock.activeIntervals(), 0, "ticker released while disabled");- clock.advance(2 * COUNTDOWN_MS);- micState(true, true);- micState(true, false);- assert.equal(shownCountdowns.length, 1, "nothing prompts while disabled");-- audioActivityDetector.externalMicState = { reliable: true, externalMicActive: false };- engine.setPreferences({ autoEnd: true });- await Promise.resolve();- clock.advance(SILENCE_WINDOW_MS);- assert.equal(shownCountdowns.length, 2, "re-enabled → fresh session in fallback mode");- assert.equal(shownCountdowns[1].reason, "silence");- engine.stop();-});--test("a session started while autoEnd is off does not arm and does not retain the detectors", async () => {- const { audioActivityDetector, clock, engine, micState, owner, shownCountdowns } = createEngine();- engine.setPreferences({ audioDetection: false, processDetection: false, autoEnd: false });-- await engine.beginRecordingSession({- sessionId: "meeting-1",- autoEndEligible: true,- ownerWebContents: owner(),- systemAudioAvailable: true,- });- micState(true, false);- clock.advance(2 * SILENCE_WINDOW_MS);-- assert.equal(audioActivityDetector.running, false);- assert.deepEqual(shownCountdowns, []);- assert.equal(clock.activeIntervals(), 0);+ assert.equal(clock.activeIntervals(), 1);engine.stop();});