fix(gateway): surface extended reasoning efforts - #64012
Conversation
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Comment
30 PRs reviewed (batch: 64044-63999). See aggregate summary at PR 64044.
Reviewed by Hermes Agent
|
Thanks for tightening this surface. The current gateway handler accepts The Codex assertion is consistent with the current transport: Automated hermes-sweeper review. |
_clean_reasoning_effort kept its own whitelist that stopped at 'max', silently dropping 'ultra' from MoA slot configs. Route it through hermes_constants.parse_reasoning_effort — the same one-source-of-truth fix the salvaged commit applies to the gateway — so future effort levels can't drift here either. Docs updated to list ultra. Follow-up to salvaged PR #64012.
|
Merged via PR #65651 — your commit was cherry-picked onto current main with your authorship preserved in git history ( Routing the gateway handler through the canonical |
_clean_reasoning_effort kept its own whitelist that stopped at 'max', silently dropping 'ultra' from MoA slot configs. Route it through hermes_constants.parse_reasoning_effort — the same one-source-of-truth fix the salvaged commit applies to the gateway — so future effort levels can't drift here either. Docs updated to list ultra. Follow-up to salvaged PR NousResearch#64012.
_clean_reasoning_effort kept its own whitelist that stopped at 'max', silently dropping 'ultra' from MoA slot configs. Route it through hermes_constants.parse_reasoning_effort — the same one-source-of-truth fix the salvaged commit applies to the gateway — so future effort levels can't drift here either. Docs updated to list ultra. Follow-up to salvaged PR NousResearch#64012.
What changed
/reasoningcommand through the canonicalparse_reasoning_effortparser instead of maintaining a second whitelistmaxandultraeffort levels in every gateway localemaxon the wireWhy
Hermes already accepted the extended effort levels in its shared configuration parser, and the gateway handler had separately added them. However,
/reasoningstatus and error messages still claimed thatxhighwas the highest valid value. This made supported levels undiscoverable and left the handler vulnerable to drifting from the shared parser again.The gateway now has one source of truth for reasoning-effort validation, while its user-facing help matches the actual accepted values.
User impact
Users can discover and select
maxorultradirectly from the/reasoningcommand guidance. Codex users also have regression coverage confirming thatmaxreaches the Responses API unchanged.Validation
python -m pytest -q tests/gateway/test_reasoning_command.py tests/test_hermes_constants.py tests/run_agent/test_run_agent_codex_responses.py -k 'reasoning or codex_preserves_supported_efforts'— 64 passedpython -m pytest -q tests/agent/test_i18n.py tests/test_wheel_locales_e2e.py— 47 passed, 2 deselectedlocales/*.yamlfile withyaml.safe_loadgit diff --check