feat: add support for thinking level 'max' (#283)#286
Merged
Conversation
Extends the valid thinking levels from ("", low, medium, high)
to include "max", which gives reasoning models the widest feasible
reasoning budget.
Changes:
- core/llm.py: accept "max" in _reasoning_kwargs() so it enables
thinking instead of silently disabling it
- core/agents.py: add "max" to _LLM_THINKING_LEVELS tuple so agent
override validation accepts it
- core/config.py: update all 8 doc comments to include | "max"
- agent_editor.html: add "Max" option in the thinking level dropdown
- base.html: include "max" in the default levelOptions() list so the
datalist offers it for all providers
- docs: update subagents.mdx valid values
6 tasks
Contributor
Author
|
Pushed fix — shortened the line to stay under 100 chars. CI re-running now. |
Contributor
Author
|
CI green on the linting fix (commit 922a4fb). The changes requested by @mattmezza are addressed — requesting re-review. |
Contributor
Author
|
@mattmezza CI green — ready for re-review |
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.
Problem
The thinking level currently supports only
""(off),"low","medium", and"high". Some reasoning models benefit from even more thinking depth. Adding a"max"level gives the model the widest feasible reasoning budget.The
_reasoning_kwargs()method incore/llm.pysilently returns{}for any value outside("low", "medium", "high"), so"max"was being silently ignored.Solution
core/llm.py: Add"max"to the valid levels in_reasoning_kwargs()so it passes through as a thinking/reasoning effort value to all providerscore/agents.py: Add"max"to_LLM_THINKING_LEVELStuple so per-agent LLM overrides accept itcore/config.py: Update all 8thinking_levelfield doc comments to document| "max"agent_editor.html,base.html): Add "Max" option to the per-agent dropdown and to the global LLM config datalistsubagents.mdx): Update valid valuesAcceptance criteria
LLMClient("anthropic", "x", thinking_level="max")._reasoning_kwargs()returns{"thinking": {"type": "adaptive"}, "output_config": {"effort": "max"}}LLMClient("openai", "x", thinking_level="max")._reasoning_kwargs()returns{"reasoning_effort": "max"}_as_llm_config({"thinking_level": "max"})returns{"thinking_level": "max"}Closes #283