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(assistant): keep the vision override inert until the user picks a model (#2139)
Joshua7a4a6a53747f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 144a669e6..7c3eb4baa 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -71,6 +71,10 @@ A follow-up to 1.10.0 built from everything that landed since. Notes open straig- **List and search endpoints reject bad `limit` and `folder_id` values.** The local CLI bridge converted query parameters with `Number()`, so `?limit=abc` or `?folder_id=-1` became `NaN` or a negative number that flowed straight into SQL and returned an empty 200 rather than an error. Those parameters must now be positive integers and anything else is a 400 `validation_error`, in line with the bridge's error contract. (#2015, thanks @hsusul)+### Assistant++- **Voice Assistant on OpenWhispr Cloud with a stray "Separate vision model" switch.** On a managed workspace, an override that was switched on but never given a model was shown with an invented provider and model, and every screenshot command went to that provider without a key, failing with "OpenAI API key not configured". Workspace policy no longer invents a target for an override the user never configured, and a chosen override that policy moves to another provider is cleared rather than repointed, so it asks to be picked again. A failed assistant request is now written to the debug log.+## [1.10.0] - 2026-09-11The desktop app gets a new look: an inset content container with a top bar and ⌘K search, a redesigned Home and note editor, the Yowza brand font and Nucleo icons, and one brand-blue glass surface for every primary action, onboarding included. Notes start recording the moment you create them, offer an AI summary when a recording ends, and gain Detailed Notes and Follow-up email as built-in actions. Orukeet arrives as the recommended local speech-to-text model and local models run up to three times faster on Apple silicon. Managed enterprise speech-to-text lands for workspaces on Azure OpenAI or AI Foundry, transcription gains streaming from Deepgram, AssemblyAI and Gemini Live plus Cohere Transcribe as a local engine, gpt-transcribe becomes the OpenAI default, onboarding was rebuilt and reordered, Insights gains an opt-in leaderboard and backfilled history, updates install themselves, Arabic joins as the eleventh UI language, and Astra and Fable 5.1 join the reasoning models.diff --git a/src/components/chat/useChatStreaming.ts b/src/components/chat/useChatStreaming.tsindex 73f5de813..4af52bd6e 100644--- a/src/components/chat/useChatStreaming.ts+++ b/src/components/chat/useChatStreaming.ts@@ -5,6 +5,7 @@ import { isEnterpriseProvider } from "../../models/ModelRegistry";import { providerSupportsImages } from "../../services/ai/inferenceProviders";import { getSettings, useSettingsStore } from "../../stores/settingsStore";import { resolveChatStreamingInference } from "../../helpers/dictationAgentInference.js";+import logger from "../../utils/logger";import {isAgentAllowed,isLlmSelectionAllowed,@@ -565,6 +566,18 @@ export function useChatStreaming({));} else {+ logger.error(+ "Assistant request failed",+ {+ scope: llmConfig.scope,+ mode: llmMode,+ provider: llmConfig.provider,+ model: llmConfig.model,+ attachScreenContext,+ error: (error as Error).message,+ },+ "reasoning"+ );announceResponse();setMessages((prev) =>prev.map((m) =>diff --git a/src/components/settings/InferenceConfigEditor.tsx b/src/components/settings/InferenceConfigEditor.tsxindex cc13fe050..70702da69 100644--- a/src/components/settings/InferenceConfigEditor.tsx+++ b/src/components/settings/InferenceConfigEditor.tsx@@ -9,6 +9,7 @@ import {selectPolicyEffectiveSettings,selectResolvedLLMConfig,setResolvedLLMConfig,+ type ResolvedLLMConfig,} from "../../stores/settingsStore";import { usePolicyModeOptions, usePolicySnapshot } from "../../hooks/usePolicy";import { InferenceModeSelector } from "../ui/SettingsSection";@@ -18,7 +19,11 @@ import EnterpriseSection from "../EnterpriseSection";import OpenAICompatiblePanel from "../OpenAICompatiblePanel";import { Toggle } from "../ui/toggle";import type { InferenceMode } from "../../types/electron";-import type { InferenceScope } from "../../config/inferenceScopes";+import {+ INFERENCE_SCOPES,+ type InferenceScope,+ type InferenceScopeDefinition,+} from "../../config/inferenceScopes";import {isProviderValidForMode,getCloudModel,@@ -56,9 +61,15 @@ export default function InferenceConfigEditor({const startOnboarding = useStartOnboarding();const policyState = usePolicySnapshot();const config = useSettingsStore(- useShallow((settings) =>- selectResolvedLLMConfig(selectPolicyEffectiveSettings(settings, policyState), scope)- )+ useShallow((settings): ResolvedLLMConfig => {+ const effective = selectPolicyEffectiveSettings(settings, policyState);+ const resolved = selectResolvedLLMConfig(effective, scope);+ const definition: InferenceScopeDefinition = INFERENCE_SCOPES[scope];+ // Inherited runtime defaults are not an explicit selection in an optional picker.+ return definition.optional+ ? { ...resolved, model: effective[definition.storeKeys.model] as string }+ : resolved;+ }));const isSignedIn = useSettingsStore((s) => s.isSignedIn);const enterpriseSetupMode = useSettingsStore((s) => s.enterpriseSetupMode);diff --git a/src/config/inferenceScopes.ts b/src/config/inferenceScopes.tsindex 889cffbe0..fbaacdcbd 100644--- a/src/config/inferenceScopes.ts+++ b/src/config/inferenceScopes.ts@@ -17,6 +17,15 @@ export interface InferenceScopeDefinition {fallbackScope?: string;/** Server-side fallback chain OpenWhispr Cloud answers this scope on. */cloudPurpose: CloudReasonPurpose;+ /**+ * Inert until the user picks its own model, inheriting the fallback scope+ * meanwhile. Policy never invents that choice, and a policy that moves the+ * chosen provider clears the model so the override asks to be picked again:+ * an invented target would switch the override on and capture requests for+ * a provider with no key. Only for scopes whose every offered mode needs a+ * model, since a cloud mode counts as chosen with none.+ */+ optional?: true;}export const INFERENCE_SCOPES = {@@ -61,6 +70,7 @@ export const INFERENCE_SCOPES = {disableThinking: "dictationAgentVisionDisableThinking",},fallbackScope: "dictationAgent",+ optional: true,},noteFormatting: {cloudPurpose: "noteFormatting",diff --git a/src/stores/settingsStore.ts b/src/stores/settingsStore.tsindex 4ffa00a4d..56abf7e9e 100644--- a/src/stores/settingsStore.ts+++ b/src/stores/settingsStore.ts@@ -3030,7 +3030,10 @@ export function selectPolicyEffectiveSettings() as Record<InferenceScope, ResolvedLLMConfig>;for (const scope of Object.keys(INFERENCE_SCOPES) as InferenceScope[]) {- const definition = INFERENCE_SCOPES[scope];+ const definition: InferenceScopeDefinition = INFERENCE_SCOPES[scope];+ // An optional override with no model of its own is not a choice to clamp.+ const rawModel = state[definition.storeKeys.model] as string | undefined;+ if (definition.optional && !rawModel?.trim()) continue;const config = resolvedConfigs[scope];const selection = resolveEffectivePolicySelection(policyState,@@ -3040,6 +3043,12 @@ export function selectPolicyEffectiveSettings();if (!selection) continue;+ if (definition.optional && selection.mode !== config.mode) {+ // A forbidden override goes inert; Cloud would count as chosen even without a model.+ writable[definition.storeKeys.model] = "";+ continue;+ }+writable[definition.storeKeys.mode] = selection.mode;if (definition.storeKeys.cloudMode) {writable[definition.storeKeys.cloudMode] =@@ -3069,10 +3078,15 @@ export function selectPolicyEffectiveSettings(selection.mode === "local") {const providerChanged = selection.mode !== config.mode || provider !== config.provider;- writable[definition.storeKeys.model] =- !providerChanged && config.model- ? config.model- : defaultLlmModel(selection.mode, provider, state.bedrockRegion);+ if (providerChanged && definition.optional) {+ // A repointed override is no longer the user's choice: inert until they pick again.+ writable[definition.storeKeys.model] = "";+ } else {+ writable[definition.storeKeys.model] =+ !providerChanged && config.model+ ? config.model+ : defaultLlmModel(selection.mode, provider, state.bedrockRegion);+ }}}diff --git a/test/stores/policyEffectiveVisionOverride.test.js b/test/stores/policyEffectiveVisionOverride.test.jsnew file mode 100644index 000000000..d49dae009--- /dev/null+++ b/test/stores/policyEffectiveVisionOverride.test.js@@ -0,0 +1,199 @@+const test = require("node:test");+const assert = require("node:assert/strict");+const path = require("node:path");+const { createRendererServer, installBrowserGlobals } = require("../lib/rendererTestHarness");++// A managed org that permits BYOK. In v1.10.0 the policy overlay treated the+// never-configured vision override like any other BYOK scope and handed it the+// first allowed provider plus that provider's default model, which switched the+// override on and sent every screenshot command to OpenAI with no key.+const managedByokPolicy = (allowedByokProviders) => ({+ status: "managed",+ appVersion: "1.10.0",+ policy: {+ version: 1,+ transcription: {+ allowedModes: ["openwhispr", "providers", "local", "self-hosted"],+ allowedByokProviders: ["openai"],+ },+ llm: {+ allowedModes: ["openwhispr", "providers", "local", "self-hosted", "enterprise"],+ allowedByokProviders,+ allowedEnterpriseProviders: [],+ },+ features: { agentEnabled: true, webSearchEnabled: true, screenContextEnabled: true },+ sharing: { externalLinkSharing: "allowed" },+ dataRetention: {+ audioRetentionMaxDays: null,+ localHistoryMode: "user_choice",+ cloudBackupAllowed: true,+ },+ minAppVersion: null,+ },+});++// Assistant on OpenWhispr Cloud, screen context on, "Separate vision model"+// switched on but never given a provider or model.+const unconfiguredOverride = {+ _llmScopeKeysMigrated: "1",+ _dictationAgentSeeded: "1",+ dictationAgentMode: "openwhispr",+ dictationAgentCloudMode: "openwhispr",+ voiceAgentScreenContext: "true",+ useDictationAgentVisionModel: "true",+};++async function loadStore(t, initialStorage, cachePrefix) {+ installBrowserGlobals(t, { initialStorage });+ const vite = await createRendererServer(t, {+ cachePrefix,+ resolveAlias: { "@": path.resolve(__dirname, "../../src") },+ });+ await vite.ssrLoadModule("/models/ModelRegistry.ts");+ const store = await vite.ssrLoadModule("/stores/settingsStore.ts");+ const inference = await vite.ssrLoadModule("/helpers/dictationAgentInference.js");+ return { ...store, ...inference, vite };+}++test("a managed policy never invents a target for an unconfigured vision override", async (t) => {+ const { useSettingsStore, selectPolicyEffectiveSettings, resolveChatStreamingInference } =+ await loadStore(t, unconfiguredOverride, "openwhispr-policy-vision-unconfigured-test-");+ const raw = useSettingsStore.getState();+ assert.equal(raw.dictationAgentVisionModel, "", "precondition: nothing chosen");++ const effective = selectPolicyEffectiveSettings(+ { ...raw, isSignedIn: true },+ managedByokPolicy(["openai", "anthropic", "gemini"])+ );++ await t.test("the override keeps no provider or model", () => {+ assert.equal(effective.dictationAgentVisionProvider, "");+ assert.equal(effective.dictationAgentVisionModel, "");+ });++ await t.test("a screenshot command stays on the cloud with its screenshot", () => {+ const { config, attachScreenContext } = resolveChatStreamingInference(effective, {+ inferenceScope: "dictationAgent",+ hasScreenContext: true,+ isProviderImageWired: () => true,+ });++ assert.equal(config.scope, "dictationAgent");+ assert.equal(config.mode, "openwhispr");+ assert.equal(attachScreenContext, true);+ });+});++test("a forbidden vision mode cannot redirect a local assistant to Cloud", async (t) => {+ const { useSettingsStore, selectPolicyEffectiveSettings, resolveChatStreamingInference } =+ await loadStore(+ t,+ {+ ...unconfiguredOverride,+ dictationAgentMode: "local",+ dictationAgentProvider: "qwen",+ dictationAgentModel: "qwen3-4b-q4_k_m",+ dictationAgentVisionProvider: "gemini",+ dictationAgentVisionModel: "gemini-2.5-flash",+ },+ "openwhispr-policy-vision-mode-test-"+ );+ const raw = { ...useSettingsStore.getState(), isSignedIn: true };+ const policy = managedByokPolicy([]);+ policy.policy.llm.allowedModes = ["openwhispr", "local"];+ const effective = selectPolicyEffectiveSettings(raw, policy);+ const result = resolveChatStreamingInference(effective, {+ inferenceScope: "dictationAgent",+ hasScreenContext: true,+ isProviderImageWired: (provider) => ["openwhispr", "gemini"].includes(provider),+ });++ assert.equal(result.config.scope, "dictationAgent");+ assert.equal(result.config.mode, "local");+ assert.equal(result.attachScreenContext, false);+ assert.equal(effective.dictationAgentVisionModel, "");+ assert.equal(raw.dictationAgentVisionModel, "gemini-2.5-flash");++ const restored = selectPolicyEffectiveSettings(raw, managedByokPolicy(["gemini"]));+ const restoredResult = resolveChatStreamingInference(restored, {+ inferenceScope: "dictationAgent",+ hasScreenContext: true,+ isProviderImageWired: (provider) => provider === "gemini",+ });+ assert.equal(restoredResult.config.scope, "dictationAgentVision");+ assert.equal(restoredResult.config.provider, "gemini");+ assert.equal(restoredResult.config.model, "gemini-2.5-flash");+ assert.equal(restoredResult.attachScreenContext, true);+});++test("the vision picker shows no Active model after policy clears its selection", async (t) => {+ const React = require("react");+ const { renderToStaticMarkup } = require("react-dom/server");+ const { vite } = await loadStore(+ t,+ {+ ...unconfiguredOverride,+ dictationAgentMode: "providers",+ dictationAgentProvider: "openai",+ dictationAgentModel: "gpt-5-mini",+ dictationAgentVisionProvider: "gemini",+ dictationAgentVisionModel: "gemini-2.5-flash",+ },+ "openwhispr-policy-vision-picker-test-"+ );+ const { usePolicyStore } = await vite.ssrLoadModule("/stores/policyStore.ts");+ // Server rendering reads Zustand's initial snapshot rather than getState().+ Object.assign(usePolicyStore.getInitialState(), managedByokPolicy(["openai"]));+ const { default: InferenceConfigEditor } = await vite.ssrLoadModule(+ "/components/settings/InferenceConfigEditor.tsx"+ );+ const { default: i18n } = await vite.ssrLoadModule("/i18n.ts");+ const renderEditor = (scope) =>+ renderToStaticMarkup(+ React.createElement(InferenceConfigEditor, { scope, allowedModes: ["providers"] })+ );++ const visionMarkup = renderEditor("dictationAgentVision");+ assert.ok(visionMarkup.includes("GPT-5 Mini"), "the model list is actually rendered");+ assert.ok(!visionMarkup.includes(`>${i18n.t("common.active")}<`));+ assert.ok(renderEditor("dictationAgent").includes(`>${i18n.t("common.active")}<`));+});++test("a policy that moves a configured override's provider clears its model", async (t) => {+ const { useSettingsStore, selectPolicyEffectiveSettings, resolveChatStreamingInference } =+ await loadStore(+ t,+ {+ ...unconfiguredOverride,+ dictationAgentMode: "providers",+ dictationAgentProvider: "anthropic",+ dictationAgentModel: "claude-sonnet-4-5",+ dictationAgentVisionProvider: "gemini",+ dictationAgentVisionModel: "gemini-2.5-flash",+ },+ "openwhispr-policy-vision-clamped-test-"+ );++ // Anthropic stays allowed, so the assistant itself is untouched; only the+ // override's Gemini choice is outside the policy.+ const effective = selectPolicyEffectiveSettings(+ useSettingsStore.getState(),+ managedByokPolicy(["openai", "anthropic"])+ );++ await t.test("the picker lands on the allowed provider with nothing chosen", () => {+ assert.equal(effective.dictationAgentVisionProvider, "openai");+ assert.equal(effective.dictationAgentVisionModel, "");+ });++ await t.test("the override goes inert instead of routing to a keyless default", () => {+ const { config } = resolveChatStreamingInference(effective, {+ inferenceScope: "dictationAgent",+ hasScreenContext: true,+ isProviderImageWired: () => true,+ });++ assert.equal(config.scope, "dictationAgent");+ assert.equal(config.provider, "anthropic");+ });+});