From 2de543c7d2197debb51181c261a71271e8497322 Mon Sep 17 00:00:00 2001 From: Kailigithub <12250313+Kailigithub@users.noreply.github.com> Date: Thu, 28 May 2026 03:52:45 +0000 Subject: [PATCH] fix: accept 'responses' as alias for 'codex_responses' in api_mode config When users set api_mode: responses in config.yaml (matching the wording shown in hermes setup option 3), the value was silently ignored because _parse_api_mode() only accepted exact values from _VALID_API_MODES. Map 'responses' to 'codex_responses' so the config behaves identically to the setup wizard selection. Closes #33600 --- hermes_cli/runtime_provider.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hermes_cli/runtime_provider.py b/hermes_cli/runtime_provider.py index 78b92dcbad95..52a4ce9f96c5 100644 --- a/hermes_cli/runtime_provider.py +++ b/hermes_cli/runtime_provider.py @@ -257,6 +257,11 @@ def _parse_api_mode(raw: Any) -> Optional[str]: """Validate an api_mode value from config. Returns None if invalid.""" if isinstance(raw, str): normalized = raw.strip().lower() + # Alias: "responses" is accepted as a shorthand for "codex_responses" + # so that api_mode: responses in config.yaml behaves identically to + # selecting option 3 in `hermes setup`. + if normalized == "responses": + return "codex_responses" if normalized in _VALID_API_MODES: return normalized return None