From e2b8740fcf546ff7161cbb93b1909cceef07fcf0 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Mon, 2 Mar 2026 00:32:28 -0800 Subject: [PATCH] fix: load_cli_config() now carries over non-default config keys load_cli_config() only merged keys present in its hardcoded defaults dict, silently dropping user-added keys like platform_toolsets (saved by 'hermes tools'), provider_routing, memory, honcho, etc. Added a second pass to carry over all file_config keys that aren't in defaults, so 'hermes tools' changes actually take effect in CLI mode. The gateway was unaffected (reads YAML directly via yaml.safe_load). --- cli.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cli.py b/cli.py index 09ec28eb..028a96c5 100755 --- a/cli.py +++ b/cli.py @@ -229,7 +229,8 @@ def load_cli_config() -> Dict[str, Any]: # Old format: model is a dict with default/base_url defaults["model"].update(file_config["model"]) - # Deep merge other keys with defaults + # Deep merge file_config into defaults. + # First: merge keys that exist in both (deep-merge dicts, overwrite scalars) for key in defaults: if key == "model": continue # Already handled above @@ -239,6 +240,12 @@ def load_cli_config() -> Dict[str, Any]: else: defaults[key] = file_config[key] + # Second: carry over keys from file_config that aren't in defaults + # (e.g. platform_toolsets, provider_routing, memory, honcho, etc.) + for key in file_config: + if key not in defaults and key != "model": + defaults[key] = file_config[key] + # Handle root-level max_turns (backwards compat) - copy to agent.max_turns if "max_turns" in file_config and "agent" not in file_config: defaults["agent"]["max_turns"] = file_config["max_turns"]