Skip to content

fix(cli): model-aware reasoning controls — report reasoning as uncontrollable on fixed-thinking routes#44112

Open
AIalliAI wants to merge 1 commit into
NousResearch:mainfrom
AIalliAI:fix/44030-model-aware-reasoning-controls
Open

fix(cli): model-aware reasoning controls — report reasoning as uncontrollable on fixed-thinking routes#44112
AIalliAI wants to merge 1 commit into
NousResearch:mainfrom
AIalliAI:fix/44030-model-aware-reasoning-controls

Conversation

@AIalliAI

Copy link
Copy Markdown
Contributor

What does this PR do?

Makes the Desktop model picker's Thinking toggle and reasoning-effort dial model-aware, as requested in #44030.

The Desktop submenu already gates those controls on the capabilities map from build_models_payload(capabilities=True) — but _apply_capabilities() in hermes_cli/inventory.py answered the wrong question: "does this model reason?" (models.dev reasoning flag) instead of "can Hermes steer its reasoning?".

On the direct DeepSeek route the runtime never sends reasoning controls — no extra_body.reasoning, no reasoning_effort, no thinking toggle (see run_agent._supports_reasoning_extra_body() and the transport kwargs builders in agent/transports/chat_completions.py). Thinking mode there is fixed by model choice (deepseek-chat vs deepseek-reasoner / deepseek-v4-flash). models.dev still catalogs those models as reasoning-capable (they do reason), so the picker offered a placebo toggle and effort dial — exactly the behavior reported: show_reasoning=false has no effect and effort levels are ignored.

With reasoning: false in the capability map, the existing Desktop gating (ModelEditSubmenu's reasoning prop) hides the toggle and dial and shows "No options", matching the issue's expected behavior ("gray out or hide controls that the current model doesn't support"). The TUI picker consumes the same map and benefits equally.

Related Issue

Fixes #44030

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • hermes_cli/inventory.py — add _REASONING_FIXED_PROVIDERS (currently deepseek) and report reasoning: false for those routes in _apply_capabilities(), before the models.dev fallback. Steerable routes keep the existing models.dev gating and the permissive default for uncatalogued models.
  • apps/desktop/src/app/shell/model-menu-panel.tsx — skip the reasoning-effort meta label ("Medium" etc.) on the current-model row when caps.reasoning is false, so the row doesn't claim an effort level the route ignores.
  • tests/hermes_cli/test_inventory.py — regression tests: DeepSeek models report reasoning=false even when models.dev says supports_reasoning=true; steerable routes still follow models.dev; uncatalogued models keep the permissive true default.

How to Test

  1. pytest tests/hermes_cli/test_inventory.py -q — 26 passed (3 new).
  2. Configure the direct DeepSeek provider with deepseek-v4-flash, open the Desktop model menu → the model's Edit submenu no longer offers the Thinking toggle / effort dial, and the current-model row no longer shows an effort label.
  3. Any OpenRouter/Nous reasoning model → toggle and dial still present, unchanged.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass (tests/hermes_cli/: 2368 passed; one pre-existing, unrelated failure in test_gateway_service.py::TestSystemdServiceRefresh that also fails on clean main on this machine)
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 26.5 (Darwin 25.5.0); desktop change verified with tsc -p . --noEmit and eslint

Documentation & Housekeeping

  • I've updated relevant documentation (docstrings) — _apply_capabilities docstring updated
  • I've updated cli-config.yaml.example if I added/changed config keys — N/A (no config changes)
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — N/A
  • I've considered cross-platform impact (Windows, macOS) — pure capability-map / UI-gating change, no platform-specific code
  • I've updated tool descriptions/schemas if I changed tool behavior — N/A

🤖 Generated with Claude Code

…ders

The Desktop model picker gates its Thinking toggle and effort dial on
the capabilities map from build_models_payload(capabilities=True), but
_apply_capabilities() answered a different question — "does this model
reason?" (models.dev) instead of "can Hermes steer its reasoning?".

On the direct DeepSeek route the runtime never sends reasoning controls
(no extra_body.reasoning / reasoning_effort / thinking toggle — see
run_agent._supports_reasoning_extra_body); thinking mode is fixed by
model choice (deepseek-chat vs deepseek-reasoner / deepseek-v4-flash).
models.dev still catalogs those models as reasoning-capable, so the
picker offered a placebo toggle and effort dial.

Report reasoning=False for such routes so the Desktop submenu hides the
controls (its existing gating), and skip the effort meta label on the
current-model row for the same reason.

Fixes NousResearch#44030

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard provider/deepseek DeepSeek API labels Jun 11, 2026
@AIalliAI

Copy link
Copy Markdown
Contributor Author

Requesting maintainer review — this is ready to land from my side. Standalone fork CI is pending first-run approval here; the rollup branch in #44061 carrying this session's batch is fully green on upstream CI (all test shards, typecheck, e2e).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have provider/deepseek DeepSeek API type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hermes Desktop: reasoning/show-thinking controls should be model-aware

2 participants