Skip to content

Unified provider layout with four inference modes#570

Merged
gabrielste1n merged 6 commits intomainfrom
feature/unified-provider-layout
Apr 12, 2026
Merged

Unified provider layout with four inference modes#570
gabrielste1n merged 6 commits intomainfrom
feature/unified-provider-layout

Conversation

@gabrielste1n
Copy link
Copy Markdown
Collaborator

Summary

Replaces the old two-option Cloud / Custom Setup selector across all three settings sections (Speech to Text, AI Text Enhancement, Agent Mode) with a unified four-mode inference selector:

  • OpenWhispr — just works, no setup
  • Cloud Providers — bring your own API key (OpenAI, Groq, Anthropic, etc.)
  • Local — on-device models via whisper.cpp / llama.cpp, fully private
  • Self-Hosted — your own server on your network (whisper-server, Ollama, LM Studio)

Self-Hosted mode closes #561 — users can now point OpenWhispr at a remote whisper-server or LLM endpoint on their LAN without spawning a local process. Audio and text stay on the network.

What changed

New unified UI — a shared InferenceModeSelector component renders the four-mode radio card group identically across Speech to Text, AI Text Enhancement, and Agent Mode settings. Each mode conditionally shows the relevant sub-panel (cloud provider picker, local model picker, or self-hosted URL input).

Self-hosted transcription — when selected, the app connects to a remote whisper-server via whisperServer.connectRemote(), health-checks it, then sends audio to its /inference endpoint. Falls back to local/cloud if unreachable. The SelfHostedPanel component provides the URL input.

Self-hosted reasoning & agent chat — routes through the existing ReasoningService pipeline with a new lanUrl override in ReasoningConfig. The agent's self-hosted URL is independent from the intelligence section's URL, so they can point at different servers.

Backwards-compatible migrationmigrateProviderSettings() and migrateAgentMode() map old localStorage values (cloudTranscriptionMode, cloudReasoningMode, cloudAgentMode, useLocalWhisper) to the new InferenceMode type. Existing settings are preserved. Old BYOK fallback paths still work for migrated custom-provider users.

Preview feature removed — the TranscriptionPreviewOverlay floating window, all its IPC channels, audio worklet plumbing, and window management code have been removed in favor of the new architecture.

Key files

  • src/components/ui/SettingsSection.tsx — shared InferenceModeSelector
  • src/components/SelfHostedPanel.tsx — URL input for self-hosted mode
  • src/components/SettingsPage.tsx — unified Speech to Text & AI Models sections
  • src/components/settings/AgentModeSettings.tsx — unified Agent Mode section
  • src/stores/settingsStore.ts — new mode fields + migrations
  • src/services/ReasoningService.tsisLanReasoningMode() helper + lanUrl config override
  • src/helpers/whisperServer.jsconnectRemote() for LAN whisper-server
  • src/helpers/ipcHandlers.js — LAN transcription routing in transcribe-audio

Closes #561

Replace the confusing two-level provider hierarchy (OpenWhispr Cloud /
Custom Setup with nested Cloud/Local toggle) with four explicit modes:
OpenWhispr Cloud, Cloud Providers, On Device, and Self-Hosted.

Settings model: add transcriptionMode/reasoningMode (InferenceMode union),
remoteTranscriptionType/remoteReasoningType (SelfHostedType union), and
remote URL fields. One-time migration maps existing settings to new modes.

UI: ModeSelector segmented control (reuses ProviderTabs sliding-indicator
pattern), SelfHostedPanel with OpenAI Compatible / LAN sub-tabs.
TranscriptionModelPicker and ReasoningModelSelector accept optional mode
prop to hide internal mode toggles and Custom tab when parent controls mode.

Backend: whisperServer.js gains connectRemote(url) for LAN whisper-server
connections with health checks and automatic hostname routing.
ReasoningService.ts adds processWithLan() for LAN llama.cpp endpoints.
New transcribe-lan-whisper IPC channel with preload bridge.

i18n: mode labels, toast messages, and self-hosted strings added to all
10 locale files.
… selector

Use the existing radio button card pattern (icon + label + description +
radio circle) instead of a horizontal segmented control. This matches the
original OpenWhispr Cloud / Custom Setup design and gives each mode a
plain-English description so users immediately understand what it does.

Delete ModeSelector.tsx — no longer used. Add mode description i18n keys
(openwhisprDesc, providersDesc, localDesc, selfHostedDesc) across all 10
locale files.
…-Hosted is LAN-only

Move Custom/OpenAI-Compatible endpoints back under Cloud Providers tab
where they belong (Together AI, Fireworks, etc. are cloud services, not
self-hosted). Self-Hosted mode is now purely LAN — just a server URL
field, no sub-tabs.

Rename mode labels: "Providers" → "Cloud Providers", "On Device" →
"Local" (description carries "on-device" phrasing). Simplify
SelfHostedPanel from 107 to 33 lines. Remove unused SelfHostedType
props from SettingsPage section components.
…, DRY radio cards

- Fix self-hosted mode bug: default remoteTranscriptionType and
  remoteReasoningType to "lan" so new users selecting Self-Hosted
  actually route through the LAN whisper-server pipeline
- Extract InferenceModeSelector component to deduplicate ~100 lines of
  identical radio card JSX between TranscriptionSection and AiModelsSection
- Extract isLanReasoningMode() helper in ReasoningService to replace 5
  identical inline settings checks
- Remove dead transcribeLanWhisper IPC channel (preload, types, handler)
  that was never called from renderer code
- Use stable noop reference instead of inline () => {} in render
- Move InferenceModeSelector to shared SettingsSection.tsx for reuse
  across SettingsPage, AgentModeSettings, and future consumers
- Replace old two-card Cloud/Custom agent selector with the same
  four-mode pattern (OpenWhispr, Cloud Providers, Local, Self-Hosted)
- Add agentInferenceMode and remoteAgentUrl store fields with migration
  from cloudAgentMode
- Add lanUrl override to ReasoningConfig so agent self-hosted mode can
  pass its own URL independently of the global reasoning settings
- Thread lanUrl through processTextStreaming and processTextStreamingAI
- Update useChatStreaming to detect agent self-hosted mode and pass
  remoteAgentUrl to the reasoning pipeline
- Add agent mode translation keys to all 10 locales
Main re-introduced showTranscriptionPreview in useSettings, settingsStore,
and SettingsPage — removed again since the preview feature was replaced
by the unified provider layout in this branch.
@gabrielste1n gabrielste1n merged commit a9d29bb into main Apr 12, 2026
6 checks passed
@gabrielste1n gabrielste1n deleted the feature/unified-provider-layout branch April 12, 2026 21:13
gabrielste1n added a commit that referenced this pull request Apr 12, 2026
Resolve conflicts with unified provider layout (PR #570):
- ReasoningModelSelector: keep hoisted CLOUD_PROVIDER_IDS, add effectiveMode
- SettingsPage: keep extracted useSettingsLayout import, add InferenceModeSelector
- SettingsSection: keep extracted useSettingsLayout import, add useTranslation and InferenceMode
@rearwindowvertigo
Copy link
Copy Markdown

I don't see this implementation in 1.6.8 or 1.6.9

@gabrielste1n
Copy link
Copy Markdown
Collaborator Author

@rearwindowvertigo you should see this?
Screenshot 2026-04-16 at 4 40 55 PM

@rearwindowvertigo
Copy link
Copy Markdown

I see this in both v1.6.8 and v1.6.9
image

@gabrielste1n
Copy link
Copy Markdown
Collaborator Author

what the... @rearwindowvertigo are you logged in with or without an account?

@rearwindowvertigo
Copy link
Copy Markdown

I'm not logged in with an account

@rearwindowvertigo
Copy link
Copy Markdown

I am the edge case... I find them all I become one with the edges... ...

@gabrielste1n
Copy link
Copy Markdown
Collaborator Author

@rearwindowvertigo are you in the discord? https://discord.gg/yZWC9WTtX7

I will fix this in 1.6.10 thanks for flagging

@rearwindowvertigo
Copy link
Copy Markdown

rearwindowvertigo commented Apr 16, 2026

Yeah, I'm in the Discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for remote whisper-server URL with local fallback

2 participants