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: refresh selectable provider model catalogs

Ruben Lütke305a8ce4ef49
diff --git a/jarvis/brain/model_catalog.py b/jarvis/brain/model_catalog.py
index 43c6c272a5..83d6c91345 100644
--- a/jarvis/brain/model_catalog.py
+++ b/jarvis/brain/model_catalog.py
@@ -20,7 +20,9 @@ Design goals (maintainer mandate 2026-06-20):
Cache: ``data/model_catalog_cache.json``, default TTL 6 h (shorter than the
frontier resolver's 24 h — fresher is better for a list the user browses), with
-``force_refresh`` to bypass it on an explicit "refresh" click.
+``force_refresh`` to bypass it on an explicit "refresh" click. OpenRouter is a
+special case: its public catalog changes daily, so its cache lifetime is capped
+at five minutes even when the general TTL is longer.
"""
from __future__ import annotations
@@ -40,6 +42,15 @@ log = logging.getLogger(__name__)
DEFAULT_TTL_HOURS = 6
+# OpenRouter publishes model drops much more frequently than the direct
+# providers. A six-hour cache made a valid new model look absent even though the
+# public ``/models`` response already contained it. Cap only this volatile,
+# unauthenticated catalog; callers can still use ``force_refresh`` for an
+# immediate fetch, and an explicitly shorter global TTL continues to win.
+_PROVIDER_TTL_CAP_SECONDS: dict[str, float] = {
+ "openrouter": 5 * 60,
+}
+
# The API-key brain providers whose catalogs we can enumerate. Codex is excluded
# on purpose: it authenticates via the ChatGPT login / a generic OpenAI key and
# its model id is largely ignored by the ``codex exec`` CLI path — it has no own
@@ -118,24 +129,41 @@ CURATED_MODELS: dict[str, list[ModelInfo]] = {
("claude-haiku-4-5-20251001", "Claude Haiku 4.5"),
]),
"openai": _curated([
+ ("gpt-5.6-sol", "GPT-5.6 Sol (preview)"),
+ ("gpt-5.6-terra", "GPT-5.6 Terra (preview)"),
+ ("gpt-5.6-luna", "GPT-5.6 Luna (preview)"),
+ ("gpt-5.6", "GPT-5.6 (Sol alias, preview)"),
("gpt-5.5", "GPT-5.5"),
("gpt-5.5-pro", "GPT-5.5 Pro"),
- ("gpt-5.5-mini", "GPT-5.5 Mini"),
+ ("gpt-5.4", "GPT-5.4"),
+ ("gpt-5.4-pro", "GPT-5.4 Pro"),
+ ("gpt-5.4-mini", "GPT-5.4 Mini"),
+ ("gpt-5.4-nano", "GPT-5.4 Nano"),
]),
"gemini": _curated([
+ ("gemini-3.5-flash", "Gemini 3.5 Flash"),
("gemini-3.1-pro-preview", "Gemini 3.1 Pro"),
- ("gemini-3-pro", "Gemini 3 Pro"),
("gemini-3-flash-preview", "Gemini 3 Flash"),
- ("gemini-3.5-flash", "Gemini 3.5 Flash"),
+ ("gemini-3.1-flash-lite", "Gemini 3.1 Flash-Lite"),
+ ("gemini-2.5-pro", "Gemini 2.5 Pro"),
+ ("gemini-2.5-flash", "Gemini 2.5 Flash"),
("gemini-flash-lite-latest", "Gemini Flash Lite"),
]),
"openrouter": _curated([
+ ("anthropic/claude-fable-5", "Claude Fable 5"),
("anthropic/claude-opus-4.8", "Claude Opus 4.8"),
- ("anthropic/claude-sonnet-4.6", "Claude Sonnet 4.6"),
+ ("anthropic/claude-sonnet-5", "Claude Sonnet 5"),
("anthropic/claude-haiku-4.5", "Claude Haiku 4.5"),
- ("openai/gpt-5.5", "GPT-5.5"),
- ("google/gemini-3-pro-preview", "Gemini 3 Pro"),
- ("x-ai/grok-4.3", "Grok 4.3"),
+ ("openai/gpt-5.6-sol-pro", "GPT-5.6 Sol Pro"),
+ ("openai/gpt-5.6-sol", "GPT-5.6 Sol"),
+ ("openai/gpt-5.6-terra-pro", "GPT-5.6 Terra Pro"),
+ ("openai/gpt-5.6-terra", "GPT-5.6 Terra"),
+ ("openai/gpt-5.6-luna-pro", "GPT-5.6 Luna Pro"),
+ ("openai/gpt-5.6-luna", "GPT-5.6 Luna"),
+ ("google/gemini-3.5-flash", "Gemini 3.5 Flash"),
+ ("google/gemini-3.1-pro-preview", "Gemini 3.1 Pro"),
+ ("x-ai/grok-4.20", "Grok 4.20"),
+ ("deepseek/deepseek-v4-pro", "DeepSeek V4 Pro"),
]),
# NVIDIA NIM — the offline fallback when the live /v1/models catalog is
# unreachable. NVIDIA-hosted current families (Nemotron leads: it is NVIDIA's
@@ -143,10 +171,14 @@ CURATED_MODELS: dict[str, list[ModelInfo]] = {
# model still shows up automatically.
"nvidia": _curated([
("nvidia/llama-3.1-nemotron-ultra-253b-v1", "Nemotron Ultra 253B"),
- ("nvidia/llama-3.3-nemotron-super-49b-v1", "Nemotron Super 49B"),
- ("meta/llama-3.3-70b-instruct", "Llama 3.3 70B"),
- ("deepseek-ai/deepseek-r1", "DeepSeek R1"),
- ("qwen/qwen2.5-coder-32b-instruct", "Qwen2.5 Coder 32B"),
+ ("nvidia/llama-3.3-nemotron-super-49b-v1.5", "Nemotron Super 49B v1.5"),
+ ("deepseek-ai/deepseek-v4-pro", "DeepSeek V4 Pro"),
+ ("deepseek-ai/deepseek-v4-flash", "DeepSeek V4 Flash"),
+ ("moonshotai/kimi-k2.6", "Kimi K2.6"),
+ ("z-ai/glm-5.2", "GLM-5.2"),
+ ("qwen/qwen3.5-397b-a17b", "Qwen3.5 397B A17B"),
+ ("meta/llama-4-maverick-17b-128e-instruct", "Llama 4 Maverick"),
+ ("mistralai/mistral-large-3-675b-instruct-2512", "Mistral Large 3"),
]),
}
@@ -196,19 +228,32 @@ TTS_CATALOG: dict[str, tuple[str, list[ModelInfo]]] = {
("pNInz6obpgDQGcFmaJgB", "Adam — American, classic AI voice"),
])),
"gemini-flash-tts": ("voice", _ids([
- "Charon", "Kore", "Aoede", "Orus", "Iapetus",
- "Rasalgethi", "Algenib", "Algieba", "Fenrir",
+ "Charon", "Kore", "Orus", "Iapetus", "Rasalgethi", "Algenib",
+ "Algieba", "Fenrir", "Aoede", "Zephyr", "Puck", "Leda",
+ "Callirrhoe", "Autonoe", "Enceladus", "Umbriel", "Despina",
+ "Erinome", "Laomedeia", "Achernar", "Alnilam", "Schedar",
+ "Gacrux", "Pulcherrima", "Achird", "Zubenelgenubi", "Vindemiatrix",
+ "Sadachbia", "Sadaltager", "Sulafat",
+ ])),
+ "grok-voice": ("voice", _ids([
+ "leo", "rex", "sal", "ara", "eve", "carina", "zagan", "helix",
+ "orion", "luna", "iris", "altair", "zenith", "perseus", "helios",
+ "lux", "kepler", "rigel", "cosmo", "celeste", "ursa", "sirius",
+ "lumen", "castor", "naksh", "atlas",
])),
- "grok-voice": ("voice", _ids(["leo", "rex", "sal", "ara", "eve"])),
"openai-tts": ("voice", _ids([
"alloy", "ash", "ballad", "coral", "echo",
- "fable", "onyx", "nova", "sage", "shimmer",
+ "fable", "onyx", "nova", "sage", "shimmer", "verse", "marin", "cedar",
])),
"google-neural2": ("voice", _ids([
"en-US-Neural2-A", "en-US-Neural2-C", "en-US-Neural2-D", "en-US-Neural2-F",
"de-DE-Neural2-B", "de-DE-Neural2-C", "de-DE-Neural2-D", "de-DE-Neural2-F",
])),
- "cartesia": ("model", _ids(["sonic-3.5", "sonic-2", "sonic-turbo"])),
+ "cartesia": ("model", _curated([
+ ("sonic-3.5", "Sonic 3.5 (stable)"),
+ ("sonic-3", "Sonic 3"),
+ ("sonic-3-latest", "Sonic 3 latest (preview track)"),
+ ])),
# OpenRouter TTS (the last-resort gateway) — the model picker offers ONLY the
# four allowlisted, production-grade speech models. The five open-source slop
# models (Kokoro, Orpheus, CSM-1B, both Zonos) are UNLISTED per the hard
@@ -237,24 +282,23 @@ TTS_CATALOG: dict[str, tuple[str, list[ModelInfo]]] = {
# the picker). The currently-hardcoded adapter default is always FIRST in each
# model list — the safe fallback an unset pick resolves to.
#
-# openai-realtime — verified 2026-07-08 against
-# developers.openai.com/api/docs/models/all (cross-checked against the
-# installed ``openai`` SDK's beta realtime session ``model`` Literal, which
-# lists the same gpt-realtime family). ``gpt-realtime`` is OpenAI's current GA
-# default (matches ``_MODEL`` in ``jarvis/plugins/realtime/openai_realtime.py``);
-# ``gpt-realtime-2.1``/``-2.1-mini`` are the newest reasoning-capable siblings
-# (released 2026-07-06); ``gpt-realtime-mini`` is the established cost-efficient
-# sibling. ``gpt-realtime-translate``/``gpt-realtime-whisper`` are deliberately
-# excluded — single-purpose speech-translation / transcription models, not
-# general duplex voice-agent models this adapter's protocol targets.
+# openai-realtime — verified 2026-07-10 against the official Realtime model
+# guide and endpoint-support table. ``gpt-realtime`` remains the adapter default
+# (matches ``_MODEL`` in ``jarvis/plugins/realtime/openai_realtime.py``), while
+# 2.1/2.1-mini, 2, 1.5, and mini remain selectable general voice-agent models.
+# ``gpt-realtime-translate``/``gpt-realtime-whisper`` are deliberately excluded:
+# they target dedicated translation/transcription sessions, not the general
+# duplex voice-agent protocol implemented by this adapter.
REALTIME_MODELS: dict[str, list[ModelInfo]] = {
"openai-realtime": _curated([
("gpt-realtime", "GPT Realtime (default)"),
("gpt-realtime-2.1", "GPT Realtime 2.1"),
("gpt-realtime-2.1-mini", "GPT Realtime 2.1 Mini"),
+ ("gpt-realtime-2", "GPT Realtime 2"),
+ ("gpt-realtime-1.5", "GPT Realtime 1.5"),
("gpt-realtime-mini", "GPT Realtime Mini"),
]),
- # gemini-live — verified 2026-07-08 against ai.google.dev/gemini-api/docs/models
+ # gemini-live — verified 2026-07-10 against ai.google.dev/gemini-api/docs/models
# (the Live API model list). ``gemini-3.1-flash-live-preview`` is the current
# flagship (matches ``_MODEL`` in ``jarvis/plugins/realtime/gemini_live.py``);
# ``gemini-2.5-flash-native-audio-preview-12-2025`` is the current 2.5-series
@@ -262,6 +306,10 @@ REALTIME_MODELS: dict[str, list[ModelInfo]] = {
# ``gemini-2.0-flash-live-preview`` family is marked for shutdown — omitted.
"gemini-live": _curated([
("gemini-3.1-flash-live-preview", "Gemini 3.1 Flash Live (default)"),
+ (
+ "gemini-2.5-flash-native-audio-latest",
+ "Gemini 2.5 Flash Native Audio (latest alias)",
+ ),
(
"gemini-2.5-flash-native-audio-preview-12-2025",
"Gemini 2.5 Flash Native Audio",
@@ -270,29 +318,39 @@ REALTIME_MODELS: dict[str, list[ModelInfo]] = {
}
# Realtime voice catalogs — stable prebuilt-voice names (curated, not live).
-# openai-realtime: verified 2026-07-08 against the installed ``openai`` SDK's
-# beta realtime session ``voice`` Literal — the 8 GA prebuilt voices.
-# gemini-live: verified 2026-07-08 — the 8 prebuilt voices exposed to
-# ``types.PrebuiltVoiceConfig.voice_name`` for the Live API's half-cascade /
-# native-audio models (a strict subset of the ~30-voice Gemini TTS catalog).
+# openai-realtime: verified 2026-07-10 against the official Realtime
+# conversations guide — ten current voices, including Marin and Cedar.
+# gemini-live: verified 2026-07-10 against the Live API capabilities guide,
+# which now permits the complete 30-voice Gemini prebuilt roster.
REALTIME_VOICES: dict[str, list[ModelInfo]] = {
"openai-realtime": _ids([
"alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse",
+ "marin", "cedar",
]),
"gemini-live": _ids([
"Puck", "Charon", "Kore", "Fenrir", "Aoede", "Orus", "Leda", "Zephyr",
+ "Callirrhoe", "Autonoe", "Enceladus", "Iapetus", "Umbriel", "Algieba",
+ "Despina", "Erinome", "Algenib", "Rasalgethi", "Laomedeia", "Achernar",
+ "Alnilam", "Schedar", "Gacrux", "Pulcherrima", "Achird", "Zubenelgenubi",
+ "Vindemiatrix", "Sadachbia", "Sadaltager", "Sulafat",
]),
}
# STT model catalogs (the ``[stt] model`` is a single global value).
STT_CATALOG: dict[str, list[ModelInfo]] = {
- "groq-api": _ids(["whisper-large-v3", "whisper-large-v3-turbo", "distil-whisper-large-v3-en"]),
+ "groq-api": _ids(["whisper-large-v3", "whisper-large-v3-turbo"]),
# "faster-whisper" (local) was removed as a user-selectable STT provider in
# v1.0.1 — see the note in provider_spec.py. The wake-word local Whisper and
# the key-free STT fallback do NOT use this catalog (they read [stt].wake_*
# / construct FasterWhisperProvider directly), so no wake/fallback breakage.
- "openai-api": _ids(["gpt-4o-transcribe", "gpt-4o-mini-transcribe", "whisper-1"]),
+ "openai-api": _ids([
+ "gpt-4o-transcribe",
+ "gpt-4o-mini-transcribe",
+ "gpt-4o-mini-transcribe-2025-12-15",
+ "gpt-4o-transcribe-diarize",
+ "whisper-1",
+ ]),
"deepgram": _ids(["nova-3", "nova-2", "nova-2-general", "enhanced", "base"]),
# OpenRouter STT — the model picker offers ONLY transcription models. This
# curated snapshot mirrors the live `?output_modalities=transcription` list
@@ -330,13 +388,17 @@ def _build_provider_catalog() -> dict[str, CatalogSpec]:
# added below as curated-only — no /v1/models over their OAuth logins.
for p in CATALOG_PROVIDERS:
cat[p] = CatalogSpec("brain", "model", tuple(CURATED_MODELS.get(p, ())), live=True)
- # Codex — subagent model catalog for the ChatGPT-login worker; no /v1/models
- # over OAuth, so curated only. Its model is the OpenAI/codex gpt-5.5 family.
+ # Codex — Jarvis-Agent model catalog for the ChatGPT-login worker; no
+ # /v1/models over OAuth, so curated only. The concrete GPT-5.6 choices are
+ # the current Codex lineup; the still-supported GPT-5.5/5.4 choices remain
+ # available for users who intentionally prefer their established behavior.
cat["codex"] = CatalogSpec("brain", "model", tuple(_curated([
+ ("gpt-5.6-sol", "GPT-5.6 Sol"),
+ ("gpt-5.6-terra", "GPT-5.6 Terra"),
+ ("gpt-5.6-luna", "GPT-5.6 Luna"),
("gpt-5.5", "GPT-5.5"),
- ("gpt-5.5-pro", "GPT-5.5 Pro"),
- ("gpt-5.5-codex", "GPT-5.5 Codex"),
- ("gpt-5.5-mini", "GPT-5.5 Mini"),
+ ("gpt-5.4", "GPT-5.4"),
+ ("gpt-5.4-mini", "GPT-5.4 Mini"),
])), live=False)
# Antigravity — subagent model catalog for the official agy/gemini CLI
# (OAuth login); no /v1/models over OAuth, so curated only. Flash first =
@@ -599,7 +661,7 @@ def _output_modalities(entry: dict) -> tuple[str, ...] | None:
_NON_BRAIN_MARKERS: tuple[str, ...] = (
"veo", "imagen", "lyria", "nano-banana", "dall-e", "dalle", "sora",
"whisper", "transcrib", "speech", "tts", "-audio", "audio-",
- "embed", "image", "moderation", "rerank", "-live", "guard",
+ "embed", "image", "moderation", "rerank", "realtime", "-live", "guard",
)
@@ -744,6 +806,8 @@ def _squash(text: str) -> str:
STARRED_MODELS: frozenset[str] = frozenset({
_squash("claude-opus-4.8"), # Opus 4.8
_squash("claude-opus-4.8-fast"), # Opus 4.8 (Fast)
+ _squash("gpt-5.6"), # GPT-5.6 alias (direct OpenAI)
+ _squash("gpt-5.6-sol"), # GPT-5.6 flagship (OpenAI/OpenRouter)
_squash("gpt-5.5"), # GPT-5.5
_squash("gemini-3.5-flash"), # Gemini 3.5 Flash
_squash("claude-fable-5"), # Fable 5
@@ -985,8 +1049,12 @@ class ModelCatalog:
json.dumps(data, indent=2), encoding="utf-8",
)
- def _is_fresh(self, fetched_at: float) -> bool:
- return (time.time() - fetched_at) < self._ttl_seconds
+ def _is_fresh(self, provider: str, fetched_at: float) -> bool:
+ ttl_seconds = min(
+ self._ttl_seconds,
+ _PROVIDER_TTL_CAP_SECONDS.get(provider, self._ttl_seconds),
+ )
+ return (time.time() - fetched_at) < ttl_seconds
@staticmethod
def _present(provider: str, models: list[ModelInfo]) -> tuple[ModelInfo, ...]:
@@ -1024,7 +1092,7 @@ class ModelCatalog:
async with self._lock:
cached = self._cache.get(provider)
- if cached and not force_refresh and self._is_fresh(cached[0]):
+ if cached and not force_refresh and self._is_fresh(provider, cached[0]):
return CatalogResult(
provider, self._present(provider, cached[1]), "cache", cached[0], "model",
)
diff --git a/jarvis/plugins/tts/curated_catalog.py b/jarvis/plugins/tts/curated_catalog.py
index b9da56e604..be9afc3473 100644
--- a/jarvis/plugins/tts/curated_catalog.py
+++ b/jarvis/plugins/tts/curated_catalog.py
@@ -104,8 +104,12 @@ _CATALOG: tuple[ModelEntry, ...] = (
voices=tuple(
VoiceEntry(v)
for v in (
- "Charon", "Kore", "Aoede", "Orus", "Iapetus",
- "Rasalgethi", "Algenib", "Algieba", "Fenrir",
+ "Charon", "Kore", "Orus", "Iapetus", "Rasalgethi", "Algenib",
+ "Algieba", "Fenrir", "Aoede", "Zephyr", "Puck", "Leda",
+ "Callirrhoe", "Autonoe", "Enceladus", "Umbriel", "Despina",
+ "Erinome", "Laomedeia", "Achernar", "Alnilam", "Schedar",
+ "Gacrux", "Pulcherrima", "Achird", "Zubenelgenubi",
+ "Vindemiatrix", "Sadachbia", "Sadaltager", "Sulafat",
)
),
),
@@ -131,7 +135,15 @@ _CATALOG: tuple[ModelEntry, ...] = (
languages=("de", "en", "es"),
latency_class="realtime",
streaming=True,
- voices=tuple(VoiceEntry(v) for v in ("leo", "rex", "sal", "ara", "eve")),
+ voices=tuple(
+ VoiceEntry(v)
+ for v in (
+ "leo", "rex", "sal", "ara", "eve", "carina", "zagan", "helix",
+ "orion", "luna", "iris", "altair", "zenith", "perseus",
+ "helios", "lux", "kepler", "rigel", "cosmo", "celeste", "ursa",
+ "sirius", "lumen", "castor", "naksh", "atlas",
+ )
+ ),
),
# ---- OpenRouter (last-resort gateway) — only the four vetted KEEP ids ----
ModelEntry(
diff --git a/jarvis/plugins/tts/gemini_flash_tts.py b/jarvis/plugins/tts/gemini_flash_tts.py
index d36ba97974..7b90ecc8c5 100644
--- a/jarvis/plugins/tts/gemini_flash_tts.py
+++ b/jarvis/plugins/tts/gemini_flash_tts.py
@@ -67,19 +67,41 @@ def _parse_quota_cap(error_msg: str) -> str | None:
SAPI5_SAMPLE_RATE = 22_050
_SAPI5_FORMAT_22K_16MONO = 22 # SPSF_22kHz16BitMono
-# 30 prebuilt voices per the launch blog — we whitelist a curated handful.
-# Voices are language-agnostic; `language_code` or inline text determines the language.
-# Default mode: deep, formal, male voices preferred.
+# Complete 30-voice prebuilt roster from the Gemini speech-generation guide
+# (verified 2026-07-10). Voices are language-agnostic; ``language_code`` or the
+# inline text determines the language. Charon remains first/default to preserve
+# the established calm, formal Jarvis voice.
DEFAULT_VOICES: tuple[str, ...] = (
"Charon", # default — informative, calm, formal tone
- "Orus", # firm, authoritative — alternative 1
- "Iapetus", # clear, precise — alternative 2
- "Rasalgethi", # informative, warmer
- "Algenib", # gravelly, deeper
- "Algieba", # neutral, previous default
- "Kore", # warm, female
- "Fenrir", # deep, male (excitable)
- "Aoede", # lyrical, female
+ "Kore",
+ "Orus",
+ "Iapetus",
+ "Rasalgethi",
+ "Algenib",
+ "Algieba",
+ "Fenrir",
+ "Aoede",
+ "Zephyr",
+ "Puck",
+ "Leda",
+ "Callirrhoe",
+ "Autonoe",
+ "Enceladus",
+ "Umbriel",
+ "Despina",
+ "Erinome",
+ "Laomedeia",
+ "Achernar",
+ "Alnilam",
+ "Schedar",
+ "Gacrux",
+ "Pulcherrima",
+ "Achird",
+ "Zubenelgenubi",
+ "Vindemiatrix",
+ "Sadachbia",
+ "Sadaltager",
+ "Sulafat",
)
# Sentence splitter: hooks onto .!?… — with a lookbehind so abbreviations
@@ -631,7 +653,7 @@ class GeminiFlashTTS:
return part.inline_data.data
def list_voices(self, language: str | None = None) -> list[str]:
- """30 prebuilt voices are language-agnostic — we return our whitelist."""
+ """Return all 30 language-agnostic prebuilt Gemini voices."""
return list(DEFAULT_VOICES)
diff --git a/jarvis/plugins/tts/grok_voice_tts.py b/jarvis/plugins/tts/grok_voice_tts.py
index e8c9c3b6f4..ecc851d192 100644
--- a/jarvis/plugins/tts/grok_voice_tts.py
+++ b/jarvis/plugins/tts/grok_voice_tts.py
@@ -5,13 +5,9 @@ We request **raw PCM 24 kHz mono int16** — identical to the Gemini /
ElevenLabs path, so the `sounddevice` playback needs no adjustment
and no MP3 decoder is needed.
-Voice whitelist:
- - leo — authoritative, command-like (the default voice, counterpart
- to ElevenLabs "Daniel" / Gemini "Charon")
- - rex — business-confident
- - sal — neutral, balanced
- - ara — warm, friendly
- - eve — energetic (xAI default)
+Voice roster:
+ The complete public built-in roster is kept in ``DEFAULT_VOICES``. ``leo``
+ remains Jarvis's authoritative default; xAI's own default is ``eve``.
Streaming:
Real WebSocket streaming exists at xAI (`wss://api.x.ai/v1/tts`), but for
@@ -51,8 +47,9 @@ _QUOTA_COOLDOWN_S = 900.0
# anyway, so a single sentence practically never reaches the limit.
_MAX_CHARS_PER_REQUEST = 15_000
-# 5 voices per the launch blog (April 2026). Default voice = "leo"
-# (authoritative, command-like — a calm, formal register).
+# Complete public built-in roster from the xAI TTS guide (verified 2026-07-10).
+# Default voice remains "leo" (authoritative, command-like — a calm, formal
+# register) so existing installations keep the same voice.
GROK_VOICE_LEO = "leo"
GROK_VOICE_REX = "rex"
GROK_VOICE_SAL = "sal"
@@ -65,6 +62,27 @@ DEFAULT_VOICES: tuple[str, ...] = (
GROK_VOICE_SAL,
GROK_VOICE_ARA,
GROK_VOICE_EVE,
+ "carina",
+ "zagan",
+ "helix",
+ "orion",
+ "luna",
+ "iris",
+ "altair",
+ "zenith",
+ "perseus",
+ "helios",
+ "lux",
+ "kepler",
+ "rigel",
+ "cosmo",
+ "celeste",
+ "ursa",
+ "sirius",
+ "lumen",
+ "castor",
+ "naksh",
+ "atlas",
)
# Sentence splitter: identical to GeminiFlashTTS — DE+EN capital lookahead.
@@ -267,7 +285,7 @@ class GrokVoiceTTS:
yield chunk
def list_voices(self, language: str | None = None) -> list[str]:
- """5 whitelisted voices, all multilingual (20+ languages)."""
+ """Return the current public built-in xAI voices."""
return list(DEFAULT_VOICES)
# ------------------------------------------------------------------
diff --git a/jarvis/setup/wizard.py b/jarvis/setup/wizard.py
index 616e16d8c1..7e32e4179c 100644
--- a/jarvis/setup/wizard.py
+++ b/jarvis/setup/wizard.py
@@ -173,7 +173,7 @@ SECRETS: list[SecretSpec] = [
env_fallback="GROK_API_KEY",
label="xAI Grok Voice API Key (TTS)",
help_url="https://console.x.ai/",
- required_for="TTS (Grok Voice — leo/rex/sal/ara/eve)",
+ required_for="TTS (xAI built-in and custom voices)",
section="tts",
),
SecretSpec(
diff --git a/jarvis/ui/web/provider_spec.py b/jarvis/ui/web/provider_spec.py
index 96e051210a..b982bc3468 100644
--- a/jarvis/ui/web/provider_spec.py
+++ b/jarvis/ui/web/provider_spec.py
@@ -69,7 +69,7 @@ class ProviderSpec:
# provider name (AP-21), and only the *brain* tier carries it today.
recommended: bool = False
# The specific model the recommendation points at (e.g. ``gemini-3.5-flash``),
- # surfaced as an "empfohlen" marker in the model picker. ``None`` = the badge
+ # surfaced as a "recommended" marker in the model picker. ``None`` = the badge
# stands for the provider as a whole with no model preference.
recommended_model: str | None = None
# The inverse of ``recommended``: a short caution shown as a "Not recommended"
@@ -305,14 +305,15 @@ PROVIDERS: tuple[ProviderSpec, ...] = (
),
ProviderSpec(
id="grok-voice",
- label="xAI Grok Voice (leo/rex/sal/ara/eve)",
+ label="xAI Text to Speech",
tier="tts",
auth_mode="api_key",
secret_keys=("grok_api_key",),
dashboard_url="https://console.x.ai/",
credential_help=(
- "xAI API key (starts with xai-) for Grok Voice. Voices: leo, rex, "
- "sal, ara, eve."
+ "xAI API key (starts with xai-) for text to speech. The voice picker "
+ "contains the current public built-in roster and preserves Leo as "
+ "the Jarvis default."
),
),
ProviderSpec(
diff --git a/tests/unit/brain/test_current_model_catalogs.py b/tests/unit/brain/test_current_model_catalogs.py
new file mode 100644
index 0000000000..06cee66a1b
--- /dev/null
+++ b/tests/unit/brain/test_current_model_catalogs.py
@@ -0,0 +1,181 @@
+"""Current-model snapshot and cross-surface drift guards (2026-07-10)."""
+from __future__ import annotations
+
+from collections.abc import Iterable
+
+from jarvis.brain.model_catalog import (
+ CURATED_MODELS,
+ REALTIME_MODELS,
+ REALTIME_VOICES,
+ STT_CATALOG,
+ TTS_CATALOG,
+ ModelInfo,
+ catalog_spec,
+ filter_brain_models,
+ is_starred_model,
+ parse_models_response,
+)
+from jarvis.plugins.tts import curated_catalog
+from jarvis.plugins.tts.gemini_flash_tts import DEFAULT_VOICES as GEMINI_VOICES
+from jarvis.plugins.tts.grok_voice_tts import DEFAULT_VOICES as XAI_VOICES
+
+
+def _ids(models: Iterable[ModelInfo]) -> set[str]:
+ return {model.id for model in models}
+
+
+def test_openrouter_fallback_contains_the_complete_gpt_5_6_series() -> None:
+ expected = {
+ "openai/gpt-5.6-sol",
+ "openai/gpt-5.6-sol-pro",
+ "openai/gpt-5.6-terra",
+ "openai/gpt-5.6-terra-pro",
+ "openai/gpt-5.6-luna",
+ "openai/gpt-5.6-luna-pro",
+ }
+
+ assert expected <= _ids(CURATED_MODELS["openrouter"])
+ assert is_starred_model("openai/gpt-5.6-sol")
+
+
+def test_live_openrouter_response_keeps_every_gpt_5_6_text_model() -> None:
+ expected = {
+ "openai/gpt-5.6-sol",
+ "openai/gpt-5.6-sol-pro",
+ "openai/gpt-5.6-terra",
+ "openai/gpt-5.6-terra-pro",
+ "openai/gpt-5.6-luna",
+ "openai/gpt-5.6-luna-pro",
+ }
+ payload = {
+ "data": [
+ {
+ "id": model_id,
+ "name": model_id,
+ "architecture": {
+ "input_modalities": ["text", "image"],
+ "output_modalities": ["text"],
+ },
+ "supported_parameters": ["tools"],
+ }
+ for model_id in expected
+ ]
+ }
+
+ parsed = parse_models_response("openrouter", payload)
+
+ assert _ids(filter_brain_models(parsed)) == expected
+ assert all(model.input_modalities == ("text", "image") for model in parsed)
+
+
+def test_direct_openai_and_codex_catalogs_offer_current_gpt_models() -> None:
+ assert {"gpt-5.6", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"} <= _ids(
+ CURATED_MODELS["openai"]
+ )
+ assert {
+ "gpt-5.5",
+ "gpt-5.5-pro",
+ "gpt-5.4",
+ "gpt-5.4-pro",
+ "gpt-5.4-mini",
+ "gpt-5.4-nano",
+ } <= _ids(CURATED_MODELS["openai"])
+ codex = catalog_spec("codex")
+ assert codex is not None
+ assert {
+ "gpt-5.6-sol",
+ "gpt-5.6-terra",
+ "gpt-5.6-luna",
+ "gpt-5.5",
+ "gpt-5.4",
+ "gpt-5.4-mini",
+ } == _ids(codex.curated)
+ assert not any(model_id.endswith(("-pro", "-codex")) for model_id in _ids(codex.curated))
+
+
+def test_gemini_fallback_uses_current_non_media_models() -> None:
+ ids = _ids(CURATED_MODELS["gemini"])
+
+ assert {
+ "gemini-3.5-flash",
+ "gemini-3.1-pro-preview",
+ "gemini-3-flash-preview",
+ "gemini-3.1-flash-lite",
+ } <= ids
+ assert "gemini-3-pro" not in ids
+ assert "gemini-3-pro-preview" not in ids
+
+
+def test_current_stt_and_cartesia_model_rosters() -> None:
+ assert _ids(STT_CATALOG["groq-api"]) == {
+ "whisper-large-v3",
+ "whisper-large-v3-turbo",
+ }
+ assert _ids(STT_CATALOG["openai-api"]) == {
+ "gpt-4o-transcribe",
+ "gpt-4o-mini-transcribe",
+ "gpt-4o-mini-transcribe-2025-12-15",
+ "gpt-4o-transcribe-diarize",
+ "whisper-1",
+ }
+ assert _ids(TTS_CATALOG["cartesia"][1]) == {
+ "sonic-3.5",
+ "sonic-3",
+ "sonic-3-latest",
+ }
+
+
+def test_current_realtime_models_and_voices() -> None:
+ assert {
+ "gpt-realtime",
+ "gpt-realtime-mini",
+ "gpt-realtime-1.5",
+ "gpt-realtime-2",
+ "gpt-realtime-2.1",
+ "gpt-realtime-2.1-mini",
+ } == _ids(REALTIME_MODELS["openai-realtime"])
+ assert _ids(REALTIME_VOICES["openai-realtime"]) == {
+ "alloy",
+ "ash",
+ "ballad",
+ "coral",
+ "echo",
+ "sage",
+ "shimmer",
+ "verse",
+ "marin",
+ "cedar",
+ }
+ assert {
+ "gemini-3.1-flash-live-preview",
+ "gemini-2.5-flash-native-audio-latest",
+ "gemini-2.5-flash-native-audio-preview-12-2025",
+ } == _ids(REALTIME_MODELS["gemini-live"])
+ assert len(_ids(REALTIME_VOICES["gemini-live"])) == 30
+
+
+def test_gemini_voice_roster_is_identical_across_runtime_and_pickers() -> None:
+ picker = _ids(TTS_CATALOG["gemini-flash-tts"][1])
+ realtime = _ids(REALTIME_VOICES["gemini-live"])
+ allowed = {
+ voice.id
+ for voice in curated_catalog.allowed_voices(
+ "gemini-flash-tts", "gemini-3.1-flash-tts-preview"
+ )
+ }
+
+ assert len(GEMINI_VOICES) == 30
+ assert set(GEMINI_VOICES) == picker == realtime == allowed
+
+
+def test_xai_voice_roster_is_identical_across_runtime_and_picker() -> None:
+ picker = _ids(TTS_CATALOG["grok-voice"][1])
+ allowed = {
+ voice.id
+ for voice in curated_catalog.allowed_voices(
+ "grok-voice", "grok-voice-tts-1.0"
+ )
+ }
+
+ assert len(XAI_VOICES) == 26
+ assert set(XAI_VOICES) == picker == allowed
diff --git a/tests/unit/brain/test_model_catalog.py b/tests/unit/brain/test_model_catalog.py
index 2c6c007c82..f6cf41c3fa 100644
--- a/tests/unit/brain/test_model_catalog.py
+++ b/tests/unit/brain/test_model_catalog.py
@@ -42,7 +42,9 @@ class TestProviderCatalog:
assert spec is not None
assert spec.tier == "brain"
assert spec.selects == "model"
- assert any("gpt-5.5" in m.id for m in spec.curated)
+ assert {"gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"} <= {
+ m.id for m in spec.curated
+ }
def test_antigravity_is_curated_brain_provider(self) -> None:
spec = catalog_spec("antigravity")
@@ -357,6 +359,7 @@ class TestFilterBrainModels:
ModelInfo(id="dall-e-3", label="dalle"),
ModelInfo(id="whisper-1", label="whisper"),
ModelInfo(id="tts-1-hd", label="tts"),
+ ModelInfo(id="gpt-realtime-2.1", label="realtime"),
ModelInfo(id="text-embedding-3-large", label="embed"),
ModelInfo(id="sora-2", label="sora"),
]
@@ -498,6 +501,28 @@ class TestListModels:
assert result.source == "live"
assert [m.id for m in result.models] == ["gpt-5.5"]
+ @pytest.mark.asyncio
+ async def test_openrouter_cache_is_capped_at_five_minutes(
+ self, tmp_path: Path, monkeypatch
+ ) -> None:
+ cat = ModelCatalog(cache_path=tmp_path / "c.json", ttl_hours=6)
+ cat._cache["openrouter"] = (
+ time.time() - 301,
+ [ModelInfo(id="openai/gpt-5.5", label="GPT-5.5")],
+ )
+ calls: list[str] = []
+
+ async def _fetch(provider: str) -> list[ModelInfo]:
+ calls.append(provider)
+ return [ModelInfo(id="openai/gpt-5.6-sol", label="GPT-5.6 Sol")]
+
+ monkeypatch.setattr(cat, "_fetch_raw", _fetch)
+ result = await cat.list_models("openrouter")
+
+ assert calls == ["openrouter"]
+ assert result.source == "live"
+ assert [m.id for m in result.models] == ["openai/gpt-5.6-sol"]
+
@pytest.mark.asyncio
async def test_fetch_failure_falls_back_to_stale_cache(
self, tmp_path: Path, monkeypatch
@@ -683,13 +708,35 @@ class TestRealtimeCatalog:
from jarvis.brain.model_catalog import REALTIME_VOICES
ids = [v.id for v in REALTIME_VOICES["openai-realtime"]]
- assert ids == ["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"]
+ assert ids == [
+ "alloy",
+ "ash",
+ "ballad",
+ "coral",
+ "echo",
+ "sage",
+ "shimmer",
+ "verse",
+ "marin",
+ "cedar",
+ ]
def test_gemini_live_voices_match_the_prebuilt_voice_set(self) -> None:
from jarvis.brain.model_catalog import REALTIME_VOICES
- ids = set(v.id for v in REALTIME_VOICES["gemini-live"])
- assert ids == {"Puck", "Charon", "Kore", "Fenrir", "Aoede", "Orus", "Leda", "Zephyr"}
+ ids = {v.id for v in REALTIME_VOICES["gemini-live"]}
+ assert len(ids) == 30
+ assert {
+ "Puck",
+ "Charon",
+ "Kore",
+ "Fenrir",
+ "Aoede",
+ "Orus",
+ "Leda",
+ "Zephyr",
+ "Sulafat",
+ } <= ids
def test_realtime_catalogs_are_not_in_the_single_selection_catalog(self) -> None:
# Realtime is served by its own endpoint (GET/PUT /realtime-options),
diff --git a/tests/unit/web/test_realtime_provider_category.py b/tests/unit/web/test_realtime_provider_category.py
index cccd6f719c..1f87038ef4 100644
--- a/tests/unit/web/test_realtime_provider_category.py
+++ b/tests/unit/web/test_realtime_provider_category.py
@@ -138,6 +138,31 @@ def test_realtime_switch_sets_voice_mode(monkeypatch):
assert app.state.config.voice.mode == "realtime"
+def test_realtime_switch_reconnects_the_active_voice_session(monkeypatch):
+ monkeypatch.setattr(cfg_mod, "get_secret", _only_openai_key)
+ monkeypatch.setattr(config_writer, "set_realtime_provider", lambda _name: None)
+ monkeypatch.setattr(config_writer, "set_voice_mode", lambda _mode: None)
+ reasons: list[str] = []
+
+ class LivePipeline:
+ def reconnect_realtime_session(self, *, reason: str) -> bool:
+ reasons.append(reason)
+ return True
+
+ app = _app()
+ app.state.speech_pipeline = LivePipeline()
+ client = TestClient(app)
+
+ response = client.post(
+ "/api/realtime/switch",
+ json={"provider": "openai-realtime", "persist": True},
+ )
+
+ assert response.status_code == 200
+ assert response.json()["session_restarted"] is True
+ assert reasons == ["realtime_provider:openai-realtime"]
+
+
def test_realtime_switch_reports_voice_mode_not_persisted_on_write_failure(monkeypatch):
"""Bug: the [voice].mode write failure was only logged, but the response
still reported persisted=True unconditionally — the UI showed "saved"
@@ -268,6 +293,7 @@ def test_get_realtime_options_returns_curated_models_and_voices(monkeypatch):
voice_ids = {v["id"] for v in body["voices"]}
assert voice_ids == {
"alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse",
+ "marin", "cedar",
}
model_ids = [m["id"] for m in body["models"]]
assert model_ids[0] == "gpt-realtime" # the hardcoded default leads
@@ -284,6 +310,10 @@ def test_get_realtime_options_gemini_live_voices(monkeypatch):
voice_ids = {v["id"] for v in body["voices"]}
assert voice_ids == {
"Puck", "Charon", "Kore", "Fenrir", "Aoede", "Orus", "Leda", "Zephyr",
+ "Callirrhoe", "Autonoe", "Enceladus", "Iapetus", "Umbriel", "Algieba",
+ "Despina", "Erinome", "Algenib", "Rasalgethi", "Laomedeia", "Achernar",
+ "Alnilam", "Schedar", "Gacrux", "Pulcherrima", "Achird", "Zubenelgenubi",
+ "Vindemiatrix", "Sadachbia", "Sadaltager", "Sulafat",
}
assert body["models"][0]["id"] == "gemini-3.1-flash-live-preview"