fix(reasoning): align max and ultra controls with model limits - #61648
fix(reasoning): align max and ultra controls with model limits#61648alanwilhelm wants to merge 5 commits into
Conversation
1d5e259 to
e9c3474
Compare
e9c3474 to
25bd6c4
Compare
|
I reproduced one remaining Copilot-specific gap on this branch: Telegram accepts |
|
Scope note: this PR is the single canonical unit for the max/ultra reasoning workstream — it includes the provider-capability projection slice (Gemini, LM Studio, Anthropic manual, GitHub/Copilot/Kimi, Codex) that briefly lived as #61772/#61834; both are closed-consolidated here. WebUI picker work remains with #61625 and the command surface with #61638 as before. |
What does this PR do?
Aligns
maxandultraacross Hermes reasoning controls and prevents unsupported values from reaching provider APIs.Hermes now uses the ordered contract
minimal < low < medium < high < xhigh < max < ultra: when a provider or model does not support the requested level, request shaping selects the strongest advertised level at or below it.ultraremains a Hermes client level. Direct non-app-server requests normalize it tomaxbefore provider-specific projection; Codex app-server preserves literalultraonly when live catalog capabilities allow it, enabling native proactive delegation on GPT-5.6 Sol/Terra. This PR does not implement the public Responses Multi-agent beta.Related Issue
Addresses #61634
Type of Change
Changes Made
Controls and persistence
VALID_REASONING_EFFORTSfor CLI/TUI autocomplete, CLI help/errors, setup ordering, gateway validation/status/errors, and dashboard delegation config.maxandultravalues across desktop model controls, global defaults, delegation settings, and status labels.--reasoning_disabledand--reasoning_effort noneuse{"enabled": false}.Provider and runtime projection
mediumbranches.high; LM Studio requests to the strongest advertised option; Anthropic legacy/manualmax/ultrato the 32,000-tokenxhighbudget; and GitHub Models/Copilot/Kimi high-end requests tohighwhen that is their ceiling.high; GPT-5.2+ andgpt-5.1-codex-maxtoxhigh; GPT-5.6 tomax.high; Grok 4.20 multi-agent toxhigh; unsupported Grok models receive no effort field.model/listauthoritative when a selected model (including Hermes synthetic-proaliases) has live capability evidence. Static family ceilings are used only when catalog evidence is unavailable./reasoning nonesends explicit JSONnullto clear a prior effort override and resume the model default; it is not presented as fully disabling app-server reasoning.Existing work and overlap
maxpicker andreasoning.modework remain out of scope; this PR does not edit its WebUI files.auto-effort work remains out of scope., as required by the repository's contributor-attribution check for the follow-up fix commit.
Reviewer Map
hermes_constants.py,agent/codex_runtime.py,agent/model_metadata.py,agent/transports/codex*.pyagent/transports/chat_completions.py,agent/lmstudio_reasoning.py,agent/anthropic_adapter.py,plugins/model-providers/{copilot,kimi-coding}max/ultravocabulary and accurate app-server reset semanticsscripts/release.pyHow to Test
Focused implementation and directly surrounding files:
Static checks for the 18 touched Python source/test files:
CI-style
tycomparison against incoming head25bd6c4: 293 diagnostics on both sides, zero new issues. Independent read-only review of the readiness diff found no code blockers.The contributor-attribution workflow logic passes locally after adding the required author mapping.
ruff check scripts/release.py,python -m py_compile scripts/release.py, andgit diff --checkalso pass.The preceding head's unchanged UI slice also passed desktop typecheck, focused Vitest (14 tests), Prettier, and all required CI checks. Manual app-server readback on
codex-cli 0.144.0confirmed Sol/Terra keepultra, Luna maps tomax, and absent extended capability maps to the strongest supported lower effort.Platform: Pop!_OS 24.04, Linux 6.18.7, x86_64.
Checklist
Code
Documentation & Housekeeping
cli-config.yaml.exampleis updatedCONTRIBUTING.md/AGENTS.md: N/A; no workflow or architecture contract changedScreenshots / Logs
N/A. Command completion, config, transport payloads, and app-server protocol behavior are covered by tests and the manual readback above.