fix(custom): normalize responses api mode alias - #33604
Open
LeonSGP43 wants to merge 1 commit into
Open
Conversation
This was referenced May 28, 2026
Closed
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the focused alias and regression work. Current main has a newer plain-custom routing guard that this patch needs to account for.
Problems
- Mapping
responsestocodex_responsesinhermes_cli/runtime_provider.pyis later cleared for non-direct-OpenAI/xAI plain custom URLs by_resolve_plain_custom_api_mode()(hermes_cli/runtime_provider.py:151-161). The provider=custom return path uses that helper athermes_cli/runtime_provider.py:1178-1184, so the reported config flow would still resolve tochat_completions. - Current coverage deliberately asserts this behavior for a localhost custom relay at
tests/hermes_cli/test_runtime_provider_resolution.py:1346-1365, following commit0e4c879a3.
Suggested changes
- Please reconcile an explicit Responses opt-in with the newer relay-safety behavior, then add a config-to-runtime regression for the approved behavior. The direct constructor/debug-dump test does not cover that resolver path.
Automated hermes-sweeper review.
| normalized = raw.strip().lower() | ||
| if normalized == "responses": | ||
| normalized = "codex_responses" | ||
| if normalized in _VALID_API_MODES: |
Contributor
There was a problem hiding this comment.
On current main, this resulting codex_responses value is cleared for non-direct-OpenAI/xAI plain custom URLs by _resolve_plain_custom_api_mode() (hermes_cli/runtime_provider.py:154-161). Please reconcile that newer safety behavior and cover the plain-custom config path; this alias alone will not change its resolved request mode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
responsesapi_mode alias tocodex_responsesfor custom runtime resolutionAIAgent(api_mode="responses")and route request dumps / live requests to/responsesinstead of silently falling back to/chat/completionsTesting
Fixes #33600