Skip to content

The agent that grows with you

fix(voice): recognise deepinfra in the CLI voice gate so stt.provider=deepinfra can arm voice mode

Konstantin Khlopkov23acd4fe7151
diff --git a/tests/tools/test_voice_mode.py b/tests/tools/test_voice_mode.py
index 9386f3aa9d3..37d58216028 100644
--- a/tests/tools/test_voice_mode.py
+++ b/tests/tools/test_voice_mode.py
@@ -252,6 +252,28 @@ class TestDetectAudioEnvironment:
# check_voice_requirements
# ============================================================================
+class TestNativeSttLabelSync:
+ """Every native STT built-in must have a CLI voice-gate label.
+
+ ``BUILTIN_STT_PROVIDERS`` and ``agent.transcription_registry._BUILTIN_NAMES``
+ are kept in sync by TestBuiltinSync, but ``tools.voice_mode._NATIVE_STT_LABELS``
+ is a third copy of the same list; without this test a new built-in transcribes
+ fine on the gateway while the CLI voice gate reports it as MISSING.
+ """
+
+ def test_every_native_stt_builtin_has_voice_mode_label(self):
+ from tools.transcription_common import BUILTIN_STT_PROVIDERS
+ from tools.voice_mode import _NATIVE_STT_LABELS
+
+ missing = BUILTIN_STT_PROVIDERS - set(_NATIVE_STT_LABELS)
+ assert not missing, (
+ "tools.voice_mode._NATIVE_STT_LABELS is missing labels for native "
+ f"STT built-ins: {sorted(missing)} — the CLI voice gate would "
+ "report these providers as MISSING while the gateway transcribes "
+ "with them fine."
+ )
+
+
class TestCheckVoiceRequirements:
def test_all_requirements_met(self, monkeypatch):
monkeypatch.setattr("tools.voice_mode._audio_available", lambda: True)
diff --git a/tools/voice_mode.py b/tools/voice_mode.py
index 7e604637bdb..8e2afbcca8c 100644
--- a/tools/voice_mode.py
+++ b/tools/voice_mode.py
@@ -1485,6 +1485,7 @@ _NATIVE_STT_LABELS = {
"mistral": "Mistral Voxtral",
"xai": "xAI Grok STT",
"elevenlabs": "ElevenLabs Scribe",
+ "deepinfra": "DeepInfra",
}