fix(responses): preserve explicit reasoning none - #75234
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for isolating a real wire-level regression. Current main drops the explicit disablement: agent/transports/codex.py:219-220 sets reasoning_enabled = False, and the disabled branch at :365-366 emits only include=[].
Problems
agent/transports/codex.py:253-260treats every non-xAI/non-GitHubgpt-5.6*route as known to supportreasoning.effort: "none", but_openai_responses_supports_reasoning_none()at:56-63checks only the model string. The same transport receives arbitrarybase_urlvalues fromagent/chat_completion_helpers.py:1218-1235; current issuer classification labels those routesother:<base_url>inagent/codex_responses_adapter.py:49-51. This does not satisfy the proposed fail-fast behavior for unknown Responses relays.
Suggested changes
- Include endpoint/provider capability in the allowlist, rejecting unknown
other:<base_url>routes unless support is explicitly known. - Add a
gpt-5.6unknown-base-url rejection test in addition to the direct supported-route test.
This is an automated hermes-sweeper review.
| if explicit_reasoning_none and ( | ||
| is_xai_responses | ||
| or is_github_responses | ||
| or not _openai_responses_supports_reasoning_none(model) |
There was a problem hiding this comment.
This guard only excludes xAI and GitHub; the support helper checks the model name but not base_url or provider. ResponsesApiTransport also serves arbitrary other:<base_url> routes, so a GPT-5.6-named custom relay is treated as known-supported rather than failing fast. Please make endpoint capability part of this predicate and cover an unknown-base-url rejection.
|
Addressed the review feedback in b4ac12f93. Changes:
Validation:
|
b4ac12f to
86f0fb2
Compare
Fixes #75227.
Summary
reasoning_effort: nonethrough the OpenAI Responses transport for GPT-5.6 models by sendingreasoning.effort: "none"instead of omittingreasoning.noneis requested on a Responses route/model where Hermes does not know that value is supported, instead of silently falling back to the model default.Validation
scripts/run_tests.sh tests/agent/test_codex_responses_adapter.py -qscripts/run_tests.sh tests/tui_gateway/test_reasoning_session_scope.py -qpython -m py_compile agent/transports/codex.py tests/agent/test_codex_responses_adapter.pygit diff --check