Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions rl_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import fire
import yaml
from hermes_constants import get_hermes_home, OPENROUTER_BASE_URL

# Load .env from ~/.hermes/.env first, then project root as dev fallback.
# User-managed env files should override stale shell exports on restart.
Expand Down Expand Up @@ -60,8 +61,6 @@
# Config Loading
# ============================================================================

from hermes_constants import get_hermes_home, OPENROUTER_BASE_URL

DEFAULT_MODEL = "anthropic/claude-opus-4.5"
DEFAULT_BASE_URL = OPENROUTER_BASE_URL

Expand Down
23 changes: 23 additions & 0 deletions tests/test_rl_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import importlib
import sys
import types


def test_rl_cli_import_bootstraps_hermes_home_without_nameerror(tmp_path, monkeypatch):
home = tmp_path / "hermes"
home.mkdir()

fake_run_agent = types.ModuleType("run_agent")
fake_run_agent.AIAgent = object

fake_rl_tool = types.ModuleType("tools.rl_training_tool")
fake_rl_tool.get_missing_keys = lambda: []

monkeypatch.setenv("HERMES_HOME", str(home))
monkeypatch.setitem(sys.modules, "run_agent", fake_run_agent)
monkeypatch.setitem(sys.modules, "tools.rl_training_tool", fake_rl_tool)

sys.modules.pop("rl_cli", None)
module = importlib.import_module("rl_cli")

assert module._hermes_home == home
Loading