Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(frontend): add Realtime tab to API-Keys & Providers screen

Ruben Lütke3322e05f54b5
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.test.tsx
index cc5df7fa3b..8fdb9a7e81 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.test.tsx
@@ -5,6 +5,7 @@ const {
switchBrainProvider,
switchTtsProvider,
switchSttProvider,
+ switchRealtimeProvider,
refetch,
setActiveOptimistic,
PROVIDERS,
@@ -29,6 +30,7 @@ const {
switchBrainProvider: vi.fn().mockResolvedValue(undefined),
switchTtsProvider: vi.fn().mockResolvedValue({}),
switchSttProvider: vi.fn().mockResolvedValue({}),
+ switchRealtimeProvider: vi.fn().mockResolvedValue({}),
refetch: vi.fn(),
setActiveOptimistic: vi.fn(),
PROVIDERS: [
@@ -63,6 +65,7 @@ vi.mock("@/hooks/useProviders", () => ({
switchBrainProvider,
switchTtsProvider,
switchSttProvider,
+ switchRealtimeProvider,
}));
import { ApiKeysStep } from "./ApiKeysStep";
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.tsx
index 9c175f0cf9..ff8fa00122 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.tsx
@@ -9,6 +9,7 @@ import { JarvisAgentSection } from "@/components/JarvisAgentSection";
import {
useProviders,
switchBrainProvider,
+ switchRealtimeProvider,
switchTtsProvider,
switchSttProvider,
type ProviderDescriptor,
@@ -31,10 +32,13 @@ const TIERS: { tier: ProviderTier; label: string; hint: string; icon: JSX.Elemen
// Activate (select) a provider by its tier — mirrors the main Settings API-Keys
// section so onboarding lets the user pick which provider is active per class.
+// Realtime has no onboarding step of its own (see TIERS above — it stays a
+// Settings-only tier for now), but the map must stay total over ProviderTier.
const SWITCH: Record<ProviderTier, (id: string) => Promise<unknown>> = {
brain: switchBrainProvider,
tts: switchTtsProvider,
stt: switchSttProvider,
+ realtime: switchRealtimeProvider,
};
export function ApiKeysStep({ goNext, skip }: StepProps) {
diff --git a/jarvis/ui/web/frontend/src/hooks/useProviders.ts b/jarvis/ui/web/frontend/src/hooks/useProviders.ts
index 4c36d0c644..92bfcc3cc1 100644
--- a/jarvis/ui/web/frontend/src/hooks/useProviders.ts
+++ b/jarvis/ui/web/frontend/src/hooks/useProviders.ts
@@ -1,7 +1,7 @@
import { useCallback, useEffect, useState } from "react";
export type AuthMode = "api_key" | "codex" | "antigravity" | "none";
-export type ProviderTier = "brain" | "tts" | "stt";
+export type ProviderTier = "brain" | "tts" | "stt" | "realtime";
/** How using a provider is billed — mirror of provider_spec.Billing. */
export type Billing = "api" | "subscription" | "subscription_or_api" | "local";
@@ -166,15 +166,18 @@ export function useProviders() {
const onBrain = () => void refetch();
const onTts = () => void refetch();
const onStt = () => void refetch();
+ const onRealtime = () => void refetch();
window.addEventListener("jarvis:secret-configured", onSecret);
window.addEventListener("jarvis:brain-switched", onBrain);
window.addEventListener("jarvis:tts-switched", onTts);
window.addEventListener("jarvis:stt-switched", onStt);
+ window.addEventListener("jarvis:realtime-switched", onRealtime);
return () => {
window.removeEventListener("jarvis:secret-configured", onSecret);
window.removeEventListener("jarvis:brain-switched", onBrain);
window.removeEventListener("jarvis:tts-switched", onTts);
window.removeEventListener("jarvis:stt-switched", onStt);
+ window.removeEventListener("jarvis:realtime-switched", onRealtime);
};
}, [refetch]);
@@ -246,6 +249,7 @@ export function useSectionHealth() {
"jarvis:brain-switched",
"jarvis:tts-switched",
"jarvis:stt-switched",
+ "jarvis:realtime-switched",
"jarvis:subagent-switched",
"jarvis:provider-tested",
];
@@ -434,6 +438,27 @@ export async function switchSttProvider(
return body as PipelineSwitchResult;
}
+/**
+ * Switches the active full-duplex Realtime provider (speech-to-speech).
+ * Persists to jarvis.toml. Mirrors `switchSttProvider` — the pipeline is
+ * only (re)built on the next voice start, so the backend response sets
+ * `restart_required = true`.
+ */
+export async function switchRealtimeProvider(
+ providerId: string,
+): Promise<PipelineSwitchResult> {
+ const res = await fetch("/api/realtime/switch", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ provider: providerId, persist: true }),
+ });
+ const body = await res.json().catch(() => ({}));
+ if (!res.ok) {
+ throw new Error(body.detail ?? `HTTP ${res.status}`);
+ }
+ return body as PipelineSwitchResult;
+}
+
/**
* Switches the active heavy-task WORKER provider
* (`[brain.sub_jarvis].provider`). Persists across 3 layers
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index b22d571eb6..3c237f1523 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -865,16 +865,19 @@
"tier_brain": "Brain-Provider",
"tier_tts": "Voice-Output (TTS)",
"tier_stt": "Voice-Input (STT)",
+ "tier_realtime": "Realtime-Sprache",
"tier_subagent": "Jarvis-Agent (Heavy-Tasks)",
"tier_telephony": "Telefonie",
"tab_brain": "Brain",
"tab_tts": "Sprachausgabe",
"tab_stt": "Spracheingabe",
+ "tab_realtime": "Realtime",
"tab_subagents": "Jarvis-Agents",
"tab_advanced": "Erweitert",
"cat_brain_desc": "Das Modell, das Chat, Routing und Computer-Use antreibt.",
"cat_tts_desc": "Die Stimme, mit der Jarvis spricht.",
"cat_stt_desc": "Wie Jarvis deine Sprache in Text umwandelt.",
+ "cat_realtime_desc": "Die Vollduplex-Sprache-zu-Sprache-Engine (OpenAI Realtime). Nutzt deinen vorhandenen OpenAI-Key mit. Standardmäßig AUS, bis der Browser-Client angebunden ist (Phase 2).",
"cat_subagents_title": "Jarvis-Agents",
"cat_subagents_desc": "Wähle, welcher Provider schwere Hintergrund-Aufgaben übernimmt.",
"advanced_title": "Zugang & Integrationen",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 0fafbd6705..f9abaee0c6 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -865,16 +865,19 @@
"tier_brain": "Brain Provider",
"tier_tts": "Voice Output (TTS)",
"tier_stt": "Voice Input (STT)",
+ "tier_realtime": "Realtime voice",
"tier_subagent": "Jarvis-Agent (heavy tasks)",
"tier_telephony": "Telephony",
"tab_brain": "Brain",
"tab_tts": "Voice Output",
"tab_stt": "Voice Input",
+ "tab_realtime": "Realtime",
"tab_subagents": "Jarvis-Agents",
"tab_advanced": "Advanced",
"cat_brain_desc": "The model that powers chat, routing, and Computer-Use.",
"cat_tts_desc": "The voice Jarvis speaks with.",
"cat_stt_desc": "How Jarvis turns your speech into text.",
+ "cat_realtime_desc": "The full-duplex speech-to-speech engine (OpenAI Realtime). Reuses your OpenAI key. Default-OFF until the browser client is wired in (Phase 2).",
"cat_subagents_title": "Jarvis-Agents",
"cat_subagents_desc": "Choose which provider runs heavy background tasks.",
"advanced_title": "Access & Integrations",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index 251b1cae7f..0dc3de9567 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -865,16 +865,19 @@
"tier_brain": "Proveedor de IA",
"tier_tts": "Salida de voz (TTS)",
"tier_stt": "Entrada de voz (STT)",
+ "tier_realtime": "Voz en tiempo real",
"tier_subagent": "Jarvis-Agent (tareas pesadas)",
"tier_telephony": "Telefonía",
"tab_brain": "IA",
"tab_tts": "Salida de voz",
"tab_stt": "Entrada de voz",
+ "tab_realtime": "Tiempo real",
"tab_subagents": "Jarvis-Agents",
"tab_advanced": "Avanzado",
"cat_brain_desc": "El modelo que impulsa el chat, el enrutamiento y Computer-Use.",
"cat_tts_desc": "La voz con la que habla Jarvis.",
"cat_stt_desc": "Cómo convierte Jarvis tu voz en texto.",
+ "cat_realtime_desc": "El motor de voz a voz en tiempo real (dúplex completo, OpenAI Realtime). Reutiliza tu clave de OpenAI. Desactivado por defecto hasta que el cliente de navegador esté conectado (Fase 2).",
"cat_subagents_title": "Jarvis-Agents",
"cat_subagents_desc": "Elige qué proveedor ejecuta las tareas pesadas en segundo plano.",
"advanced_title": "Acceso e integraciones",
diff --git a/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx b/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
index 0daee38dc0..5b69d938f8 100644
--- a/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
+++ b/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
@@ -1,5 +1,5 @@
import { useState } from "react";
-import { AlertCircle, Bot, Brain, Check, Copy, KeyRound, Loader2, LogIn, LogOut, Mic, Phone, PlugZap, SlidersHorizontal, Terminal, Volume2, XCircle } from "lucide-react";
+import { AlertCircle, Bot, Brain, Check, Copy, KeyRound, Loader2, LogIn, LogOut, Mic, Phone, PlugZap, Radio, SlidersHorizontal, Terminal, Volume2, XCircle } from "lucide-react";
import { ViewHeader } from "@/views/ChatsView";
import { AltCredentialNote } from "@/components/AltCredentialNote";
import { ApiKeyForm } from "@/components/ApiKeyForm";
@@ -24,6 +24,7 @@ import {
type SectionHealth,
startCodexLogin,
switchBrainProvider,
+ switchRealtimeProvider,
switchSttProvider,
switchTtsProvider,
testProvider,
@@ -34,11 +35,11 @@ import { useEventStore } from "@/store/events";
import { cn } from "@/lib/utils";
import { useT } from "@/i18n";
-// The view is organised around exactly four primary categories — Brain, Voice
-// Output (TTS), Voice Input (STT) and Subagents — surfaced as a segmented tab
-// bar. Everything else (Control-API key, team key proxy, telephony, Wiki) lives
-// in a clearly separated, de-emphasized "Advanced" tab so it never competes with
-// the four core categories.
+// The view is organised around exactly five primary categories — Brain, Voice
+// Output (TTS), Voice Input (STT), Realtime and Subagents — surfaced as a
+// segmented tab bar. Everything else (Control-API key, team key proxy,
+// telephony, Wiki) lives in a clearly separated, de-emphasized "Advanced" tab
+// so it never competes with the five core categories.
type CategoryKey = ProviderTier | "subagents" | "advanced";
type LucideIcon = typeof Brain;
@@ -77,6 +78,12 @@ function makeProviderCategories(
description: t("apikeys_view.cat_stt_desc"),
icon: Mic,
},
+ realtime: {
+ tab: t("apikeys_view.tab_realtime"),
+ title: t("apikeys_view.tier_realtime"),
+ description: t("apikeys_view.cat_realtime_desc"),
+ icon: Radio,
+ },
};
}
@@ -100,7 +107,10 @@ export function ApiKeysView() {
<CategoryTabs active={active} onSelect={setActive} health={health} />
<div className="flex-1 overflow-y-auto scrollbar-jarvis p-6">
- {(active === "brain" || active === "tts" || active === "stt") && (
+ {(active === "brain" ||
+ active === "tts" ||
+ active === "stt" ||
+ active === "realtime") && (
<ProviderCategory
meta={categories[active]}
tier={active}
@@ -140,6 +150,7 @@ function CategoryTabs({
{ key: "brain", label: t("apikeys_view.tab_brain"), icon: Brain },
{ key: "tts", label: t("apikeys_view.tab_tts"), icon: Volume2 },
{ key: "stt", label: t("apikeys_view.tab_stt"), icon: Mic },
+ { key: "realtime", label: t("apikeys_view.tab_realtime"), icon: Radio },
{ key: "subagents", label: t("apikeys_view.tab_subagents"), icon: Bot },
];
return (
@@ -543,13 +554,20 @@ function ProviderCard({
: "";
pushToast("success", `Voice output → ${descriptor.label}${note}`);
window.dispatchEvent(new CustomEvent("jarvis:tts-switched"));
- } else {
+ } else if (descriptor.tier === "stt") {
const result = await switchSttProvider(descriptor.id);
const note = result.restart_required
? " (active from next voice start)"
: "";
pushToast("success", `Voice input → ${descriptor.label}${note}`);
window.dispatchEvent(new CustomEvent("jarvis:stt-switched"));
+ } else {
+ const result = await switchRealtimeProvider(descriptor.id);
+ const note = result.restart_required
+ ? " (active from next voice start)"
+ : "";
+ pushToast("success", `Realtime → ${descriptor.label}${note}`);
+ window.dispatchEvent(new CustomEvent("jarvis:realtime-switched"));
}
onChanged();
} catch (e) {