Repository navigation
feat(core): reasoning effort setting, sent as reasoning_effort - #502
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Nov 4, 2026
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 (description of the change)
Reasoning effort setting (#457):
--effort <minimal|low|medium|high>on run/chat/resume/mission,TOLE_REASONING_EFFORTenv, configreasoning_effort(flag > env > config > user config > default unset). Validated at parse; unknown values fail loudly with the accepted list.fact/reasoning_effort(mirrorsfact/model): the session's register beats the process default, so a session keeps its level across resume and a future TUI can change it mid-session.reasoning_efforton OpenAI-compatible chat completions ONLY when set; unset = today's request body byte-for-byte (wire-shape stability, eval-tested both ways).reasoning_effort-> ONE degraded retry without it; the rejection is recorded (tole_degradedin the step usage row, not counted as a provider step) and the parameter is dropped for the provider's later calls. Other 400s and repeat rejections do not loop.parse_reasoning_effort,with_reasoning_efforton the provider,last_degradedaccessors; failover + transcript/turn carry the field additively. A register setter (TUI/thinking) is deliberately NOT here — that lands with epic: tole-tui — pi-style terminal UI #464/feat(tui): model picker, thinking level, slash-command menu #461.Why (the problem you're solving)
Closes #457 — tole never sent a reasoning/thinking level; the model's effort could not be chosen or seen, and the TUI epic (#464, Phase 0) needs it.
Testing (how you verified this works)
parse_reasoning_effort,with_reasoning_effort,last_degraded,session_effort,effort_error, new config/settings fields), then passed after implementation.reasoning_effortexactly when set and is unchanged otherwise; register round-trips across resume (session_effort_e2e, new, includes the register-beats-default case); 400-rejection retry covered by a mock test (one retry, no loop; other 400s / no-effort-set / failed-retry each tested not to loop);tole config checkshows the effective value + source.cargo fmt --all -- --checkclean;cargo clippy --workspace --all-targets -- -D warningsclean;cargo test --workspace --no-fail-fast1018/0 (first run had 5verify_packageport-range flakes from parallel sibling worktrees — pass isolated + clean re-run);cargo test -p tole-core -p tole-cli --no-default-features887/0;cargo build -p tole-cli --no-default-featuresOK.reasoning_effort— a 422-style rejection is NOT retried (issue said 400; recorded here as the contract). Standard rooms: onlyuteke-conventionsread in full (others' listings exceeded the tool; fell back to AGENTS.md/CONTRIBUTING.md). No live-provider round trip (mock only), no ACP surface.reasoning_tokensusage reporting and streamed reasoning deltas untouched.