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.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(realtime): thinking pause is pipeline-only — realtime turn end is the model's call
Personal Jarvis Maintainer1d208f1d1980
diff --git a/docs/product/personalize-and-connect/settings-and-appearance.md b/docs/product/personalize-and-connect/settings-and-appearance.mdindex addef17ced..6c69c5211c 100644--- a/docs/product/personalize-and-connect/settings-and-appearance.md+++ b/docs/product/personalize-and-connect/settings-and-appearance.md@@ -46,7 +46,7 @@ that have their own guides.| **App settings** | Launch the app when you sign in | The operating-system startup entry is added or removed immediately || **Privacy permissions** | Microphone, screen, accessibility, and input access on macOS | Permission changes may require **Restart now** || **Wake Word** | Activation, phrase, spoken language, and detection engine | Usually live when desktop voice is ready; otherwise on the next voice start |-| **Thinking pause**, **Volume**, and **Audio devices** | End-of-speech timing, spoken volume, microphone, and speaker | Live with the Pipeline running; otherwise on the next start |+| **Thinking pause**, **Volume**, and **Audio devices** | End-of-speech timing (Pipeline mode only — in Realtime mode the voice model detects the end of your turn itself), spoken volume, microphone, and speaker | Live with the Pipeline running; otherwise on the next start || **Voice Keybinds** | Call and Hangup shortcuts | Live with the voice Pipeline running; otherwise after a restart || **System Prompt** | The assistant's general style and behavior | On the next message; no restart || **Bar & Overlay** | Display style, idle visibility, music muting, and short sound effects | A mix of live changes and restart-required display swaps |diff --git a/jarvis/plugins/realtime/gemini_live.py b/jarvis/plugins/realtime/gemini_live.pyindex 6d2154d7c1..4e95f3f7a4 100644--- a/jarvis/plugins/realtime/gemini_live.py+++ b/jarvis/plugins/realtime/gemini_live.py@@ -421,18 +421,26 @@ class GeminiLiveProvider:voice_name=voice))+ # An unset window (None/0) omits realtime_input_config entirely so+ # Gemini's native automatic activity detection decides the turn end;+ # only an explicit override forces a fixed silence window.+ silence_ms = getattr(cfg, "silence_duration_ms", None)live_config = types.LiveConnectConfig(response_modalities=[types.Modality.AUDIO],system_instruction=str(getattr(cfg, "instructions", "") or "") or None,input_audio_transcription=types.AudioTranscriptionConfig(),output_audio_transcription=types.AudioTranscriptionConfig(),- realtime_input_config=types.RealtimeInputConfig(- automatic_activity_detection=types.AutomaticActivityDetection(- disabled=False,- silence_duration_ms=int(- getattr(cfg, "silence_duration_ms", 1_500) or 1_500- ),- )+ **(+ {+ "realtime_input_config": types.RealtimeInputConfig(+ automatic_activity_detection=types.AutomaticActivityDetection(+ disabled=False,+ silence_duration_ms=int(silence_ms),+ )+ )+ }+ if silence_ms+ else {}),**({diff --git a/jarvis/plugins/realtime/openai_realtime.py b/jarvis/plugins/realtime/openai_realtime.pyindex a1ae421289..b9740f4afb 100644--- a/jarvis/plugins/realtime/openai_realtime.py+++ b/jarvis/plugins/realtime/openai_realtime.py@@ -197,10 +197,12 @@ def _session_payload(cfg: Any) -> dict[str, Any]:# OpenAI's documented manual-response VAD mode."interrupt_response": False,}- if turn_detection == "server_vad":- turn_detection_config["silence_duration_ms"] = int(- getattr(cfg, "silence_duration_ms", 1_500) or 1_500- )+ # An unset window (None/0) keeps OpenAI's native server-VAD default so the+ # realtime model decides the turn end itself; only an explicit override is+ # forwarded.+ silence_ms = getattr(cfg, "silence_duration_ms", None)+ if turn_detection == "server_vad" and silence_ms:+ turn_detection_config["silence_duration_ms"] = int(silence_ms)payload: dict[str, Any] = {"type": "realtime",diff --git a/jarvis/realtime/protocol.py b/jarvis/realtime/protocol.pyindex 53b82fbfdb..2d7c5c7290 100644--- a/jarvis/realtime/protocol.py+++ b/jarvis/realtime/protocol.py@@ -63,10 +63,14 @@ class RealtimeSessionConfig:# GA Realtime schema rejects requesting text and audio simultaneously.modalities: tuple[str, ...] = ("audio",)turn_detection: str = "server_vad" # "server_vad" | "semantic_vad"- # Shared with SpeechConfig.vad_silence_ms (the Settings "Thinking pause").- # Providers must wait for this much detected silence before committing the- # user's turn, so a natural pause cannot start model reasoning early.- silence_duration_ms: int = 1500+ # None (the default) = the provider's NATIVE turn detection decides when+ # the user's turn ends. The Settings "Thinking pause"+ # (SpeechConfig.vad_silence_ms) endpoints the classic pipeline only —+ # forcing it into realtime sessions made the realtime model wait the full+ # window after every utterance, which reads as "done speaking but still+ # listening" (maintainer directive 2026-07-21). An explicit int still+ # overrides the provider default for callers that need a fixed window.+ silence_duration_ms: int | None = Nonetools: tuple[dict[str, Any], ...] = ()# Bounded transcript of the call so far, oldest first, as# ``{"role": "user" | "assistant", "text": ...}`` mappings. A freshdiff --git a/jarvis/realtime/session.py b/jarvis/realtime/session.pyindex 1757a02501..3268dec41a 100644--- a/jarvis/realtime/session.py+++ b/jarvis/realtime/session.py@@ -16,6 +16,7 @@ import randomimport reimport timefrom dataclasses import dataclass, field+from datetime import datetimefrom typing import Anyfrom uuid import uuid4@@ -63,9 +64,6 @@ _MAX_UNSCRUBBED_AUDIO_MS = 15_000_PROVIDER_HANDSHAKE_TOTAL_TIMEOUT_S = 12.0_AUDIO_SEND_TIMEOUT_S = 2.0_TOOL_TRANSCRIPT_WAIT_S = 3.0-_THINKING_PAUSE_DEFAULT_MS = 1_500-_THINKING_PAUSE_MIN_MS = 500-_THINKING_PAUSE_MAX_MS = 5_000# Grace window for the model to finish its goodbye after an end_call tool# call; if the provider never sends turn_complete, hang up anyway._END_CALL_GRACE_S = 10.0@@ -353,20 +351,6 @@ def _requires_jarvis_action(text: str) -> bool:return plan_turn(text).requires_orchestrator-def _configured_thinking_pause_ms(config: Any) -> int:- """Return the validated shared Pipeline/Realtime silence window."""- raw = getattr(- getattr(config, "speech", None),- "vad_silence_ms",- _THINKING_PAUSE_DEFAULT_MS,- )- try:- value = int(raw)- except (TypeError, ValueError):- value = _THINKING_PAUSE_DEFAULT_MS- return max(_THINKING_PAUSE_MIN_MS, min(_THINKING_PAUSE_MAX_MS, value))--def _delegate_result_prompt(text: str,*,@@ -628,6 +612,18 @@ def _session_instructions(from jarvis.brain.persona_loader import load_effective_persona_promptpersona = load_effective_persona_prompt().strip()+ # The block is re-sent with every per-turn session update, so this stays+ # current across long sessions. Without it the model must either+ # hallucinate calendar answers or delegate a trivial "what day is+ # tomorrow" through the orchestrator (12-34 s of silence — live+ # complaint 2026-07-21); the shared turn planner keeps such calendar+ # trivia native on the strength of this line.+ now = datetime.now().astimezone()+ clock_line = (+ f"Current local date and time: {now.strftime('%A, %Y-%m-%d %H:%M')} "+ f"({now.tzname() or 'local time'}). Answer date, weekday, and "+ "time-of-day questions directly from this — never guess."+ )language_name = _LANGUAGE_NAMES.get(language, "the user's language")input_language_name = _LANGUAGE_NAMES.get(input_language)if input_language_name:@@ -660,6 +656,7 @@ def _session_instructions(tool_directive,_REALTIME_SAFETY_APPENDIX,input_directive,+ clock_line,("Runtime identity: this voice session is using the Realtime engine"+ (f", provider {provider}" if provider else "")@@ -1098,7 +1095,10 @@ class RealtimeVoiceSession:input_sample_rate=input_rate,output_sample_rate=output_rate,modalities=("audio",),- silence_duration_ms=_configured_thinking_pause_ms(self._config),+ # silence_duration_ms stays at its None default: the realtime+ # model's native turn detection decides when the user is done.+ # The Settings "Thinking pause" endpoints the classic pipeline+ # only (maintainer directive 2026-07-21).tools=self._declared_tools(),# Empty at the first open of a call; after an in-place# transport rebuild (or a mid-call cross-family fallback) itdiff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.jsonindex b5a7228dbf..d8fe3e8a50 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json@@ -1118,7 +1118,7 @@"settings_view": {"silence_window": {"title": "Denkpause",- "description": "Wie lange {name} in Stille wartet, bevor er das Gesagte abschickt. Höher stellen, um mehr Zeit zum Innehalten und Zu-Ende-Denken zu haben.",+ "description": "Wie lange {name} in Stille wartet, bevor er das Gesagte abschickt. Höher stellen, um mehr Zeit zum Innehalten und Zu-Ende-Denken zu haben. Gilt für den Pipeline-Sprachmodus — im Realtime-Modus erkennt das Sprachmodell das Ende deines Satzes selbst.","unit_seconds": "s","reset": "Auf Standard zurücksetzen (1,5 s)","saved_toast": "Denkpause auf {0} gesetzt.",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.jsonindex 30978cffc8..6b33df65ef 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json@@ -1119,7 +1119,7 @@"settings_view": {"silence_window": {"title": "Thinking pause",- "description": "How long {name} waits in silence before it sends what you said. Raise it to give yourself more time to pause and finish a thought.",+ "description": "How long {name} waits in silence before it sends what you said. Raise it to give yourself more time to pause and finish a thought. Applies to the Pipeline voice mode — in Realtime mode the voice model detects the end of your turn itself.","unit_seconds": "s","reset": "Reset to default (1.5 s)","saved_toast": "Thinking pause set to {0}.",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.jsonindex d947fb73c3..4611d779fe 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json@@ -1118,7 +1118,7 @@"settings_view": {"silence_window": {"title": "Pausa para pensar",- "description": "Cuánto espera {name} en silencio antes de enviar lo que dijiste. Súbelo para darte más tiempo para pausar y terminar una idea.",+ "description": "Cuánto espera {name} en silencio antes de enviar lo que dijiste. Súbelo para darte más tiempo para pausar y terminar una idea. Se aplica al modo de voz Pipeline — en el modo Realtime, el modelo de voz detecta por sí mismo el final de tu turno.","unit_seconds": "s","reset": "Restablecer al valor predeterminado (1,5 s)","saved_toast": "Pausa para pensar fijada en {0}.",diff --git a/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.tsx b/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.tsxindex 62e098aa49..8388d10f03 100644--- a/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.tsx+++ b/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.tsx@@ -9,9 +9,10 @@ import { useT } from "@/i18n";* silence window (how long Jarvis waits in silence before submitting). Range* 0.5–5.0 s, step 0.1 s, default 1.5 s. The label tracks the slider live; the* PUT fires on release (pointer/key up) so a 0.1 s-step drag does not storm the- * backend. The change persists to jarvis.toml, applies live to the classic- * pipeline, and configures every newly opened Realtime provider session (a- * headless host falls back to "applies on next start").+ * backend. The change persists to jarvis.toml and applies live to the classic+ * pipeline ONLY (a headless host falls back to "applies on next start").+ * Realtime sessions deliberately ignore it — the realtime model's native turn+ * detection decides the turn end (maintainer directive 2026-07-21).*/export function SilenceWindowGroup() {const t = useT();diff --git a/tests/unit/realtime/test_gemini_live.py b/tests/unit/realtime/test_gemini_live.pyindex 692ed333ad..d2ce3cdd9b 100644--- a/tests/unit/realtime/test_gemini_live.py+++ b/tests/unit/realtime/test_gemini_live.py@@ -325,6 +325,21 @@ async def test_every_selectable_model_uses_live_audio_and_transcriptions(assert holder["client"].closed is True+async def test_default_config_keeps_native_activity_detection(+ monkeypatch: pytest.MonkeyPatch,+) -> None:+ holder = _patch_genai_client(monkeypatch)+ provider = GeminiLiveProvider(api_key="test-key")++ session = await provider.open_session(RealtimeSessionConfig(voice="Puck"))+ _selected, config = holder["client"].aio.live.connect_calls[0]+ # No forced silence window: Gemini's native automatic activity detection+ # decides the turn end (the Settings "Thinking pause" is pipeline-only).+ assert config.realtime_input_config is None+ await session.close()++@pytest.mark.asyncioasync def test_open_session_uses_current_default_model(monkeypatch: pytest.MonkeyPatch,diff --git a/tests/unit/realtime/test_openai_realtime.py b/tests/unit/realtime/test_openai_realtime.pyindex cc4b7f1e90..872a4b0322 100644--- a/tests/unit/realtime/test_openai_realtime.py+++ b/tests/unit/realtime/test_openai_realtime.py@@ -158,6 +158,24 @@ async def test_every_selectable_model_uses_the_valid_ga_session_schema(await session.close()+async def test_default_config_keeps_native_server_vad_window(+ monkeypatch: pytest.MonkeyPatch,+) -> None:+ holder = _patch_openai_client(monkeypatch)+ provider = OpenAIRealtimeProvider(api_key="test-key")++ session = await provider.open_session(+ RealtimeSessionConfig(voice="echo", language="en")+ )+ payload = holder["client"].realtime.last_conn.session_updates[0]+ turn_detection = payload["audio"]["input"]["turn_detection"]+ # No forced window: OpenAI's native server-VAD default decides the turn+ # end (the Settings "Thinking pause" endpoints the pipeline only).+ assert "silence_duration_ms" not in turn_detection+ await session.close()++@pytest.mark.asyncioasync def test_text_update_creates_tool_free_audio_response(monkeypatch: pytest.MonkeyPatch,diff --git a/tests/unit/realtime/test_protocol.py b/tests/unit/realtime/test_protocol.pyindex 3676593ee9..8c8e3e3b6a 100644--- a/tests/unit/realtime/test_protocol.py+++ b/tests/unit/realtime/test_protocol.py@@ -32,13 +32,13 @@ def test_session_config_has_selectable_model():assert cfg.voice == "echo"-def test_session_config_defaults_to_shared_thinking_pause():- from jarvis.core.config import SpeechConfig+def test_session_config_defaults_to_provider_native_turn_detection():from jarvis.realtime.protocol import RealtimeSessionConfig- assert RealtimeSessionConfig().silence_duration_ms == (- SpeechConfig().vad_silence_ms- ) == 1_500+ # None = the provider's native turn detection decides the turn end; the+ # Settings "Thinking pause" endpoints the classic pipeline only+ # (maintainer directive 2026-07-21).+ assert RealtimeSessionConfig().silence_duration_ms is Nonedef test_session_config_history_defaults_empty():diff --git a/tests/unit/realtime/test_thinking_pause.py b/tests/unit/realtime/test_thinking_pause.pyindex 0553f2a208..e4544ba454 100644--- a/tests/unit/realtime/test_thinking_pause.py+++ b/tests/unit/realtime/test_thinking_pause.py@@ -1,4 +1,11 @@-"""The Settings thinking pause must reach every realtime provider family."""+"""The Settings thinking pause must NOT leak into realtime sessions.++The "Thinking pause" (SpeechConfig.vad_silence_ms) endpoints the classic+pipeline only. Realtime providers own their native turn detection — forcing+the pipeline window into a realtime session made the model wait the full+window after every utterance ("done speaking but still listening",+maintainer directive 2026-07-21).+"""from __future__ import annotations@@ -75,7 +82,7 @@ def _config(silence_ms: int):@pytest.mark.asyncio-async def test_configured_pause_reaches_primary_and_cross_family_fallback():+async def test_pipeline_pause_never_reaches_primary_or_fallback():primary = _Provider("first-family", fail=True)fallback = _Provider("second-family")session = RealtimeVoiceSession(@@ -88,6 +95,8 @@ async def test_configured_pause_reaches_primary_and_cross_family_fallback():await session.handle_control({"type": "audio_start", "sample_rate": 16_000})- assert primary.opened_with.silence_duration_ms == 2_700- assert fallback.opened_with.silence_duration_ms == 2_700+ # Even with a long pipeline Thinking pause configured, every realtime+ # provider family opens with the provider-native default (None).+ assert primary.opened_with.silence_duration_ms is None+ assert fallback.opened_with.silence_duration_ms is Noneawait session.end(reason="test")