hermes - 💡(How to fix) Fix `/reasoning max` rejected by frontend even though Anthropic adapter already supports it end-to-end

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Anthropic's adaptive-thinking exposes five effort levels on Claude 4.6+ / 4.7:

low < medium < high < xhigh < max

agent/anthropic_adapter.py already supports all five — ADAPTIVE_EFFORT_MAP (line ~64) maps "max" straight through to output_config.effort, and there is an xhigh → max downgrade path for pre-4.7 models. But the user-facing surface stops at xhigh, so /reasoning max, agent.reasoning_effort: max in config.yaml, and any CLI/gateway path that goes through parse_reasoning_effort() all reject max and silently fall back to the default.

In other words: the backend is ready, but the frontend validator and UI strings drop the input on the floor. There is no way for a user to opt into the max effort level without patching Hermes themselves.

Root Cause

Today users who want the maximum adaptive-thinking budget on 4.6/4.7 have to either:

  1. Patch Hermes locally (which I'm currently doing — a 20-line diff across hermes_constants.py / gateway/run.py / hermes_cli/commands.py / 18 locales), or
  2. Lie via /reasoning xhigh on a 4.6 model and rely on the silent xhigh → max downgrade path, which is fragile and undocumented from the user's POV.

Neither is great. The fix is a small, additive whitelist change with zero behavior change for any input that was previously valid.

Fix Action

Fix / Workaround

In other words: the backend is ready, but the frontend validator and UI strings drop the input on the floor. There is no way for a user to opt into the max effort level without patching Hermes themselves.

  1. Patch Hermes locally (which I'm currently doing — a 20-line diff across hermes_constants.py / gateway/run.py / hermes_cli/commands.py / 18 locales), or
  2. Lie via /reasoning xhigh on a 4.6 model and rely on the silent xhigh → max downgrade path, which is fragile and undocumented from the user's POV.

If a maintainer prefers a fresh, minimal change instead, the smallest possible patch is literally:

Code Example

low < medium < high < xhigh < max

---

/reasoning max

---

🧠 ✓ Reasoning effort set to `max` (saved to config)

---

⚠️ Unknown argument: `max`

Valid levels: none, minimal, low, medium, high, xhigh
Display: show, hide
Persist: add `--global` to save beyond this session

---

# hermes_constants.py
-VALID_REASONING_EFFORTS = ("minimal", "low", "medium", "high", "xhigh")
+VALID_REASONING_EFFORTS = ("minimal", "low", "medium", "high", "xhigh", "max")
RAW_BUFFERClick to expand / collapse

Summary

Anthropic's adaptive-thinking exposes five effort levels on Claude 4.6+ / 4.7:

low < medium < high < xhigh < max

agent/anthropic_adapter.py already supports all five — ADAPTIVE_EFFORT_MAP (line ~64) maps "max" straight through to output_config.effort, and there is an xhigh → max downgrade path for pre-4.7 models. But the user-facing surface stops at xhigh, so /reasoning max, agent.reasoning_effort: max in config.yaml, and any CLI/gateway path that goes through parse_reasoning_effort() all reject max and silently fall back to the default.

In other words: the backend is ready, but the frontend validator and UI strings drop the input on the floor. There is no way for a user to opt into the max effort level without patching Hermes themselves.

Steps to reproduce

On a clean v0.14.0 checkout, on an Anthropic 4.6+/4.7 model:

/reasoning max

Expected:

🧠 ✓ Reasoning effort set to `max` (saved to config)

Actual:

⚠️ Unknown argument: `max`

Valid levels: none, minimal, low, medium, high, xhigh
Display: show, hide
Persist: add `--global` to save beyond this session

Same result via hermes config set agent.reasoning_effort max — the value writes to config.yaml, but next session parse_reasoning_effort("max") returns None and the agent runs at the default (medium).

Where the gap actually lives

The short list ("minimal", "low", "medium", "high", "xhigh") is hardcoded in at least these places:

  • hermes_constants.pyVALID_REASONING_EFFORTS constant
  • gateway/run.py/reasoning handler allowed-set
  • hermes_cli/commands.py/reasoning subcommand tuple (drives tab completion)
  • locales/*.yamlstatus and unknown_arg strings in all 18 locale files
  • (per existing PRs) hermes_cli/main.py setup-wizard canonical order, gateway/platforms/discord.py slash-command description, batch_runner valid_efforts, LM Studio _LM_VALID_EFFORTS

Backend evidence that max is the real intended top level:

  • agent/anthropic_adapter.py:64ADAPTIVE_EFFORT_MAP = {"max": "max", "xhigh": "xhigh", "high": "high", ...}
  • agent/anthropic_adapter.py:2041-2042 — on models that don't accept xhigh, code intentionally downgrades to max, i.e. max is the documented strongest level for Opus/Sonnet 4.6

Why this matters

Today users who want the maximum adaptive-thinking budget on 4.6/4.7 have to either:

  1. Patch Hermes locally (which I'm currently doing — a 20-line diff across hermes_constants.py / gateway/run.py / hermes_cli/commands.py / 18 locales), or
  2. Lie via /reasoning xhigh on a 4.6 model and rely on the silent xhigh → max downgrade path, which is fragile and undocumented from the user's POV.

Neither is great. The fix is a small, additive whitelist change with zero behavior change for any input that was previously valid.

Existing PRs (please consider before opening a new one)

I searched issues and PRs before filing this. There is no dedicated tracking issue today, but there are two open PRs that already implement this fix and have been sitting without review:

  • #14717 — feat(config): expose "max" as a valid reasoning effort level by @AndreKurait (opened 2026-04-23, P3). Covers hermes_constants, gateway handler, CLI commands tuple, setup-wizard picker order, Discord slash command, plus a TestParseReasoningEffort test class (18 tests pass).
  • #25401 — feat(reasoning): expose "max" effort level for Anthropic 4.6/4.7 adaptive thinking by @Vic563 (opened 2026-05-14, P3). Broader scope: also touches all 16 locale files, batch_runner, LM Studio _LM_VALID_EFFORTS, Gemini 3 Flash/Pro mapping, Codex Responses clamp (max → high), auxiliary_client, the bundled skill, and docs. New tests in test_hermes_constants and test_codex_transport.

Both PRs report all relevant tests passing.

I'm filing this as a tracking issue purely so the bug has a discoverable home and the two PRs have something to "Fixes #" against — please treat this as "+1 from a real user, please pick whichever PR you prefer and merge it", not as a request for a third parallel implementation.

Environment

  • Hermes Agent: v0.14.0 (commit a91a57fa5)
  • Platform: macOS 26.3, Python 3.x (Apple Silicon)
  • Model in use: Anthropic Claude Opus 4.7 (also reproduced on Sonnet 4.6 with xhigh-not-supported path)
  • Provider: anthropic provider with api_mode: anthropic_messages
  • Surface tested: gateway /reasoning command (Telegram), CLI prompt, and hermes config set agent.reasoning_effort

Suggested resolution

Merge either #14717 or #25401 (I'd lean toward #25401 since its locale + Codex/LM Studio/Gemini coverage is more complete, but #14717's narrower diff is easier to review). No third PR needed.

If a maintainer prefers a fresh, minimal change instead, the smallest possible patch is literally:

# hermes_constants.py
-VALID_REASONING_EFFORTS = ("minimal", "low", "medium", "high", "xhigh")
+VALID_REASONING_EFFORTS = ("minimal", "low", "medium", "high", "xhigh", "max")

…plus the four mirrored sites listed above and the 18 locale strings. The existing two PRs already do this work.

Thanks for maintaining Hermes 🙏

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING