fix: accept responses as alias for codex_responses in api_mode config - #33637
fix: accept responses as alias for codex_responses in api_mode config#33637Kailigithub wants to merge 1 commit into
Conversation
…nfig 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 NousResearch#33600
f53f218 to
2de543c
Compare
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused compatibility fix. Current main still lacks the responses alias in hermes_cli/runtime_provider.py:352-358, and named custom-provider resolution feeds entry values through that parser at hermes_cli/runtime_provider.py:695, :718, and :766.
Problems
- The PR adds no regression test. Please cover a real named
providers:orcustom_providers:entry withapi_mode: responsesand assert thatresolve_runtime_provider()returnscodex_responses. - The description should not imply that every bare
provider: customendpoint will use/responses. Current main deliberately dropscodex_responsesfor non-direct OpenAI/xAI bare custom relays inhermes_cli/runtime_provider.py:154-161;tests/hermes_cli/test_runtime_provider_resolution.py:1432-1447protects that behavior.
Suggested changes
- Limit the documented scope to named custom-provider configuration and add the focused resolver regression above, without weakening the bare-custom relay guard.
Automated hermes-sweeper review.
| # 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": |
There was a problem hiding this comment.
Please add a resolver-level regression for a named providers: or custom_providers: entry using api_mode: responses. In current main, bare non-OpenAI provider: custom routes deliberately discard the resulting codex_responses mode (_resolve_plain_custom_api_mode()), so a parser-only check would not verify the supported configuration path.
|
Closing as superseded by #33604 (LeonSGP43), which makes the same (Autopilot housekeeping takeover per v1.18 / v1.59 strict-supersede close protocol.) |
Problem
When
api_mode: responsesis set inconfig.yamlfor a custom provider, the value is silently ignored. Hermes always uses/chat/completionsregardless of the setting.The root cause is that
_parse_api_mode()inruntime_provider.pyonly accepts values from_VALID_API_MODES, which does not include"responses". The setup wizard (hermes setupoption 3) correctly maps"responses"→"codex_responses", but anyone who writesapi_mode: responsesdirectly in config.yaml hits this gap.Fix
Add a
"responses"→"codex_responses"alias in_parse_api_mode()so the config file behaves identically to the setup wizard selection. This is a 1-line functional change (plus comments).Testing
python3 -m py_compile hermes_cli/runtime_provider.py— passes_parse_api_mode("responses")now returns"codex_responses"Closes #33600