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(voice): provider switch no longer asks for confirmation (reversible -> monitor)
Ruben Lütke5ab1a32261e3
diff --git a/jarvis/plugins/tool/switch_provider.py b/jarvis/plugins/tool/switch_provider.pyindex 21704e2de6..fb7a7f7a5f 100644--- a/jarvis/plugins/tool/switch_provider.py+++ b/jarvis/plugins/tool/switch_provider.py@@ -1,8 +1,16 @@"""``switch-provider`` tool — change the active brain/TTS/STT/subagent provider.-Router-tier, ``ask`` (echo-confirm). This is the voice/chat path for-"switch from Grok to Gemini", "use OpenAI for the brain", "change TTS to-Cartesia", etc.+Router-tier, ``monitor`` (runs immediately, audited — no up-front confirmation).+This is the voice/chat path for "switch from Grok to Gemini", "use OpenAI for the+brain", "change TTS to Cartesia", etc.++A provider switch is REVERSIBLE and the tool speaks an honest post-change readback+(old -> new), so an STT mishear of the provider name is caught *after* the fact —+there is no need to block on an up-front yes/no, which would violate the+anti-confirmation-fatigue mandate. Forensic 2026-06-26: with ``ask`` a voice+"switch the subagent brain to antigravity" asked "really do that?" and the+two-turn voice-confirm flow then ended the session before the user could answer.+Irreversible actions (gmail send, place a call) stay ``ask``.It switches *which provider is active* — it never sets a raw API key. The targetprovider's key must already be stored (Settings tab / wizard); if it is missing@@ -30,10 +38,12 @@ class SwitchProviderTool:"""Switch the active provider for one tier (brain/tts/stt/subagent)."""name: ClassVar[str] = "switch-provider"- # ``ask`` → the brain echoes the change ("switching brain from grok to- # gemini — confirm?") before it is applied. End-focus echo pattern lets an- # STT mishear of the provider name stand out at the end of the sentence.- risk_tier: ClassVar[str] = "ask"+ # ``monitor`` → runs immediately (audited), no up-front confirmation. A+ # provider switch is reversible and the result already carries an honest+ # old -> new readback, so an STT mishear is caught after the fact instead of+ # by nagging the user before every switch (anti-confirmation-fatigue mandate;+ # ``ask`` is the one tier in ``always_confirm_tiers``). Forensic 2026-06-26.+ risk_tier: ClassVar[str] = "monitor"description: ClassVar[str] = ("Switch which AI provider is active for a given tier: 'brain' (the main ""assistant model), 'tts' (text-to-speech voice), 'stt' (speech-to-text), or "diff --git a/tests/unit/plugins/tool/test_app_control_tools.py b/tests/unit/plugins/tool/test_app_control_tools.pyindex 370b42ac50..2173c97104 100644--- a/tests/unit/plugins/tool/test_app_control_tools.py+++ b/tests/unit/plugins/tool/test_app_control_tools.py@@ -423,11 +423,31 @@ def test_app_control_tools_have_correct_risk_tiers():from jarvis.plugins.tool.switch_provider import SwitchProviderToolassert DescribeAppSettingsTool.risk_tier == "safe"- assert SwitchProviderTool.risk_tier == "ask"+ # Forensic 2026-06-26: a voice "switch the subagent brain to antigravity"+ # asked "really do that? say yes or no" and then hung up. A provider switch+ # is REVERSIBLE and the tool already speaks an honest post-change readback+ # (old -> new), which catches an STT mishear after the fact — so it must not+ # block on an up-front confirmation (anti-confirmation-fatigue mandate).+ # "monitor" runs without confirmation but is still audited (state change).+ assert SwitchProviderTool.risk_tier == "monitor"assert ManageMcpServerTool.risk_tier == "ask"assert RevealKeyPreviewTool.risk_tier == "monitor"+def test_switch_provider_does_not_trigger_voice_confirmation():+ """A reversible provider switch must not force an up-front yes/no.++ Root cause of the 2026-06-26 voice incident: ``risk_tier="ask"`` is the one+ tier in ``always_confirm_tiers``, so the executor returned the+ VOICE_CONFIRM_SENTINEL and the brain asked before switching. "monitor" is+ not a confirm tier, so the switch runs immediately.+ """+ from jarvis.core.config import SafetyConfig+ from jarvis.plugins.tool.switch_provider import SwitchProviderTool++ assert SwitchProviderTool.risk_tier not in SafetyConfig().always_confirm_tiers++def test_provider_routes_uses_shared_credential_check(monkeypatch):"""Anti-drift: provider_routes' credential check delegates to app_control.