Skip to content

feat: add support for thinking level 'max' (#283)#286

Merged
mattmezza merged 2 commits into
mainfrom
kindral/thinking-level-max
Jul 10, 2026
Merged

feat: add support for thinking level 'max' (#283)#286
mattmezza merged 2 commits into
mainfrom
kindral/thinking-level-max

Conversation

@kindralai

@kindralai kindralai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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 in core/llm.py silently 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 providers
  • core/agents.py: Add "max" to _LLM_THINKING_LEVELS tuple so per-agent LLM overrides accept it
  • core/config.py: Update all 8 thinking_level field doc comments to document | "max"
  • UI (agent_editor.html, base.html): Add "Max" option to the per-agent dropdown and to the global LLM config datalist
  • Docs (subagents.mdx): Update valid values

Acceptance 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"}
  • All 8 config field doc comments updated
  • "Max" option available in per-agent LLM override dropdown
  • "Max" listed in the datalist for the global LLM config thinking level input

Closes #283

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
@kindralai
kindralai Bot requested a review from mattmezza July 10, 2026 12:37
@kindralai kindralai Bot mentioned this pull request Jul 10, 2026
6 tasks

@mattmezza mattmezza left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix linting - CI fails

@kindralai

kindralai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Pushed fix — shortened the line to stay under 100 chars. CI re-running now.

@kindralai

kindralai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

CI green on the linting fix (commit 922a4fb). The changes requested by @mattmezza are addressed — requesting re-review.

@mattmezza
mattmezza merged commit e16ee7c into main Jul 10, 2026
3 checks passed
@mattmezza
mattmezza deleted the kindral/thinking-level-max branch July 10, 2026 13:03
@kindralai

kindralai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@mattmezza CI green — ready for re-review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for thinking level 'max'

1 participant