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.

fix(voice): recognize "chatgpt"/"anthropic" brand names as switch targets

Ruben Lütke321748d35703
diff --git a/jarvis/brain/manager.py b/jarvis/brain/manager.py
index 6f35b8d2a5..cae70d6fb4 100644
--- a/jarvis/brain/manager.py
+++ b/jarvis/brain/manager.py
@@ -132,6 +132,7 @@ def _estimate_usd_from_usage(
PROVIDER_ALIASES = {
"claude": "claude-api",
+ "anthropic": "claude-api",
"opus": "claude-api",
"haiku": "claude-api",
"sonnet": "claude-api",
diff --git a/jarvis/brain/voice_command_gate.py b/jarvis/brain/voice_command_gate.py
index 48a47a5652..2293da6592 100644
--- a/jarvis/brain/voice_command_gate.py
+++ b/jarvis/brain/voice_command_gate.py
@@ -24,6 +24,8 @@ from typing import Literal
_PROVIDER_ALIASES = (
"claude-api",
"openrouter",
+ "anthropic",
+ "chatgpt",
"ollama",
"gemini",
"claude",
diff --git a/tests/unit/brain/test_provider_alias_resolution.py b/tests/unit/brain/test_provider_alias_resolution.py
new file mode 100644
index 0000000000..be85bd11a3
--- /dev/null
+++ b/tests/unit/brain/test_provider_alias_resolution.py
@@ -0,0 +1,19 @@
+"""PROVIDER_ALIASES must resolve the everyday brand names a user speaks.
+
+Forensic 2026-06-27: the voice gate recognised "anthropic" / "chatgpt" as a
+provider-switch target, but the manager's alias table only mapped "chatgpt".
+"switch to anthropic" therefore passed "anthropic" straight through as a
+canonical id, which is not a configured provider — the switch failed. The
+gate's spoken aliases and the manager's resolution table must stay in lockstep.
+"""
+from __future__ import annotations
+
+from jarvis.brain.manager import PROVIDER_ALIASES
+
+
+def test_anthropic_resolves_to_claude_api() -> None:
+ assert PROVIDER_ALIASES["anthropic"] == "claude-api"
+
+
+def test_chatgpt_resolves_to_openai() -> None:
+ assert PROVIDER_ALIASES["chatgpt"] == "openai"
diff --git a/tests/unit/brain/test_voice_command_gate.py b/tests/unit/brain/test_voice_command_gate.py
index a64e81f2f5..3b75a16718 100644
--- a/tests/unit/brain/test_voice_command_gate.py
+++ b/tests/unit/brain/test_voice_command_gate.py
@@ -131,3 +131,17 @@ def test_main_provider_switch_plain_still_works() -> None:
m = match_voice_command("wechsel auf gemini")
assert m is not None and m.kind == "provider_switch"
assert m.target == "gemini"
+
+
+def test_main_provider_switch_recognizes_chatgpt_alias() -> None:
+ # "ChatGPT" is the everyday name for the OpenAI brain; the gate must catch it.
+ m = match_voice_command("nutze chatgpt")
+ assert m is not None and m.kind == "provider_switch"
+ assert m.target == "chatgpt"
+
+
+def test_main_provider_switch_recognizes_anthropic_alias() -> None:
+ # "Anthropic" is the everyday name for the claude-api brain.
+ m = match_voice_command("switch to anthropic")
+ assert m is not None and m.kind == "provider_switch"
+ assert m.target == "anthropic"