From de368cac54eba1be7e58ff260f332d500ccbda76 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Mon, 30 Mar 2026 14:11:39 -0700 Subject: [PATCH] fix(tools): show browser and TTS in reconfigure menu (#4041) * fix(gateway): honor default for invalid bool-like config values * refactor: simplify web backend priority detection Replace cascading boolean conditions with a priority-ordered loop. Same behavior (verified against all 16 env var combinations), half the lines, trivially extensible for new backends. * fix(tools): show browser and TTS in reconfigure menu _toolset_has_keys() returned False for toolsets with no-key providers (Local Browser, Edge TTS) because it only checked providers with env_vars. Users couldn't find these tools in the reconfigure list and had no obvious way to switch browser/TTS backends. Now treats providers with empty env_vars as always-configured, so toolsets with free/local options always appear in the reconfigure menu. --------- Co-authored-by: aydnOktay --- hermes_cli/tools_config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hermes_cli/tools_config.py b/hermes_cli/tools_config.py index 63e26d362..337b67fe8 100644 --- a/hermes_cli/tools_config.py +++ b/hermes_cli/tools_config.py @@ -597,7 +597,9 @@ def _toolset_has_keys(ts_key: str) -> bool: if cat: for provider in cat.get("providers", []): env_vars = provider.get("env_vars", []) - if env_vars and all(get_env_value(e["key"]) for e in env_vars): + if not env_vars: + return True # No-key provider (e.g. Local Browser, Edge TTS) + if all(get_env_value(e["key"]) for e in env_vars): return True return False