Skip to content

fix(gateway): surface extended reasoning efforts - #64012

Closed
karfly wants to merge 1 commit into
NousResearch:mainfrom
karfly:agent/sync-reasoning-effort-surfaces
Closed

fix(gateway): surface extended reasoning efforts#64012
karfly wants to merge 1 commit into
NousResearch:mainfrom
karfly:agent/sync-reasoning-effort-surfaces

Conversation

@karfly

@karfly karfly commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What changed

  • route the gateway /reasoning command through the canonical parse_reasoning_effort parser instead of maintaining a second whitelist
  • advertise the already-supported max and ultra effort levels in every gateway locale
  • verify that the Codex Responses transport preserves max on the wire

Why

Hermes already accepted the extended effort levels in its shared configuration parser, and the gateway handler had separately added them. However, /reasoning status and error messages still claimed that xhigh was 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 max or ultra directly from the /reasoning command guidance. Codex users also have regression coverage confirming that max reaches 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 passed
  • python -m pytest -q tests/agent/test_i18n.py tests/test_wheel_locales_e2e.py — 47 passed, 2 deselected
  • parsed every locales/*.yaml file with yaml.safe_load
  • git diff --check

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Comment

30 PRs reviewed (batch: 64044-63999). See aggregate summary at PR 64044.


Reviewed by Hermes Agent

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery provider/openai OpenAI / Codex Responses API labels Jul 14, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for tightening this surface. The current gateway handler accepts max and ultra at gateway/slash_commands.py:2762, while the user-facing status and invalid-argument strings still stop at xhigh in locales/en.yaml:204 and locales/en.yaml:211 (with the same stale strings in the other locale catalogs). Routing the handler through hermes_constants.parse_reasoning_effort matches the existing canonical validator at hermes_constants.py:794-823.

The Codex assertion is consistent with the current transport: agent/transports/codex.py:166-173 preserves max, and tests/agent/transports/test_codex_transport.py:78-86 already verifies both max → max and ultra → max for GPT-5.6 Responses requests. No blocking issues found.

Automated hermes-sweeper review.

@teknium1 teknium1 added the sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform label Jul 16, 2026
teknium1 added a commit that referenced this pull request Jul 16, 2026
_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.
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #65651 — your commit was cherry-picked onto current main with your authorship preserved in git history (4ad5036a4).

Routing the gateway handler through the canonical parse_reasoning_effort was exactly the right call — it also flagged the same drift pattern in the MoA per-slot config, which we fixed on top in the same PR. Thanks for the clean, well-tested contribution!

Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
_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.
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
_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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have provider/openai OpenAI / Codex Responses API sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants