fix(cli): model-aware reasoning controls — report reasoning as uncontrollable on fixed-thinking routes#44112
Open
AIalliAI wants to merge 1 commit into
Open
Conversation
…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>
12 tasks
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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
capabilitiesmap frombuild_models_payload(capabilities=True)— but_apply_capabilities()inhermes_cli/inventory.pyanswered the wrong question: "does this model reason?" (models.devreasoningflag) instead of "can Hermes steer its reasoning?".On the direct DeepSeek route the runtime never sends reasoning controls — no
extra_body.reasoning, noreasoning_effort, no thinking toggle (seerun_agent._supports_reasoning_extra_body()and the transport kwargs builders inagent/transports/chat_completions.py). Thinking mode there is fixed by model choice (deepseek-chatvsdeepseek-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=falsehas no effect and effort levels are ignored.With
reasoning: falsein the capability map, the existing Desktop gating (ModelEditSubmenu'sreasoningprop) 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
Changes Made
hermes_cli/inventory.py— add_REASONING_FIXED_PROVIDERS(currentlydeepseek) and reportreasoning: falsefor 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 whencaps.reasoningis false, so the row doesn't claim an effort level the route ignores.tests/hermes_cli/test_inventory.py— regression tests: DeepSeek models reportreasoning=falseeven when models.dev sayssupports_reasoning=true; steerable routes still follow models.dev; uncatalogued models keep the permissivetruedefault.How to Test
pytest tests/hermes_cli/test_inventory.py -q— 26 passed (3 new).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.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass (tests/hermes_cli/: 2368 passed; one pre-existing, unrelated failure intest_gateway_service.py::TestSystemdServiceRefreshthat also fails on cleanmainon this machine)tsc -p . --noEmitand eslintDocumentation & Housekeeping
_apply_capabilitiesdocstring updatedcli-config.yaml.exampleif I added/changed config keys — N/A (no config changes)CONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/A🤖 Generated with Claude Code