diff --git a/hermes_cli/config.py b/hermes_cli/config.py index 387bef667..a981b1bbb 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -569,7 +569,7 @@ DEFAULT_CONFIG = { }, # Config schema version - bump this when adding new required fields - "_config_version": 12, + "_config_version": 13, } # ============================================================================= @@ -1701,6 +1701,21 @@ def migrate_config(interactive: bool = True, quiet: bool = False) -> Dict[str, A ep = providers_dict[key] print(f" → {key}: {ep.get('api', '')}") + # ── Version 12 → 13: clear dead LLM_MODEL / OPENAI_MODEL from .env ── + # These env vars were written by the old setup wizard but nothing reads + # them anymore (config.yaml is the sole source of truth since March 2026). + # Stale entries cause user confusion — see issue report. + if current_ver < 13: + for dead_var in ("LLM_MODEL", "OPENAI_MODEL"): + try: + old_val = get_env_value(dead_var) + if old_val: + save_env_value(dead_var, "") + if not quiet: + print(f" ✓ Cleared {dead_var} from .env (no longer used — config.yaml is source of truth)") + except Exception: + pass + if current_ver < latest_ver and not quiet: print(f"Config version: {current_ver} → {latest_ver}") diff --git a/website/docs/integrations/providers.md b/website/docs/integrations/providers.md index 74d4e631a..fbfa69ade 100644 --- a/website/docs/integrations/providers.md +++ b/website/docs/integrations/providers.md @@ -230,7 +230,7 @@ model: ``` :::warning Legacy env vars -`OPENAI_BASE_URL` and `LLM_MODEL` in `.env` are **deprecated**. `OPENAI_BASE_URL` is no longer consulted for endpoint resolution — `config.yaml` is the single source of truth. The CLI ignores `LLM_MODEL` entirely (only the gateway reads it as a fallback). Use `hermes model` or edit `config.yaml` directly — both persist correctly across restarts and Docker containers. +`OPENAI_BASE_URL` and `LLM_MODEL` in `.env` are **removed**. Neither is read by any part of Hermes — `config.yaml` is the single source of truth for model and endpoint configuration. If you have stale entries in your `.env`, they are automatically cleared on the next `hermes setup` or config migration. Use `hermes model` or edit `config.yaml` directly. ::: Both approaches persist to `config.yaml`, which is the source of truth for model, provider, and base URL. diff --git a/website/docs/reference/environment-variables.md b/website/docs/reference/environment-variables.md index e8f2e8aee..7c14d9f3d 100644 --- a/website/docs/reference/environment-variables.md +++ b/website/docs/reference/environment-variables.md @@ -53,8 +53,7 @@ All variables go in `~/.hermes/.env`. You can also set them with `hermes config | `OPENCODE_GO_API_KEY` | OpenCode Go API key — $10/month subscription for open models ([opencode.ai](https://opencode.ai/auth)) | | `OPENCODE_GO_BASE_URL` | Override OpenCode Go base URL | | `CLAUDE_CODE_OAUTH_TOKEN` | Explicit Claude Code token override if you export one manually | -| `HERMES_MODEL` | Preferred model name (checked before `LLM_MODEL`, used by gateway) | -| `LLM_MODEL` | Default model name (fallback when not set in config.yaml) | +| `HERMES_MODEL` | Override model name at process level (used by cron scheduler; prefer `config.yaml` for normal use) | | `VOICE_TOOLS_OPENAI_KEY` | Preferred OpenAI key for OpenAI speech-to-text and text-to-speech providers | | `HERMES_LOCAL_STT_COMMAND` | Optional local speech-to-text command template. Supports `{input_path}`, `{output_dir}`, `{language}`, and `{model}` placeholders | | `HERMES_LOCAL_STT_LANGUAGE` | Default language passed to `HERMES_LOCAL_STT_COMMAND` or auto-detected local `whisper` CLI fallback (default: `en`) |