diff --git a/src/jarvis/reply/engine.py b/src/jarvis/reply/engine.py index 48098b8..2052bae 100644 --- a/src/jarvis/reply/engine.py +++ b/src/jarvis/reply/engine.py @@ -1696,8 +1696,10 @@ def run_reply_engine(db: "Database", cfg, tts: Optional[Any], # Placed at the FRONT (after the persona header) so a small model gives # it primacy over the persona's "use the user's language" lines — a tail # instruction loses to those when the query itself is in another language. + # Settings-UI value (config) wins over the compose OUTPUT_LANGUAGE env so + # changing the language in the settings page actually takes effect. _lang_directive = reply_language_directive( - os.environ.get("OUTPUT_LANGUAGE") or _extra_config("output_language", ""), + _extra_config("output_language", "") or os.environ.get("OUTPUT_LANGUAGE"), getattr(cfg, "tts_engine", "piper"), ) if _lang_directive: