Skip to content

Add support for thinking level 'max' #283

Description

@mattmezza

Problem / Motivation

The thinking level currently supports only "" (off), "low", "medium", and "high". Some reasoning models — particularly the latest Claude and o-series models — benefit from even more thinking depth. Adding a "max" level gives the model the widest feasible reasoning budget, using as many tokens as possible for chain-of-thought before responding.

Current state

The thinking level is validated in LLMClient._reasoning_kwargs() (core/llm.py):

level = self.thinking_level
if level not in ("low", "medium", "high"):
    return {}
if self.provider == "anthropic":
    return {"thinking": {"type": "adaptive"}, "output_config": {"effort": level}}
return {"reasoning_effort": level}

Only low/medium/high pass through. Any other value (including max) falls into the return {} branch — it silently disables thinking instead of using maximum depth.

Config fields that reference valid levels:

  • AgentConfig.thinking_level (line 96)
  • MemoryConfig.extraction_thinking_level (line 281)
  • MemoryConfig.consolidation_thinking_level (line 282)
  • TaskReflectionConfig.thinking_level (line 302)
  • ReplyDecisionConfig.thinking_level (line 309)
  • CompactionConfig.thinking_level (line 326)
  • GoalDecompositionConfig.thinking_level (line 345)
  • SubagentSummaryConfig.thinking_level (line 522)

All share the same doc comment: "" (off) | "low" | "medium" | "high".

Proposed solution

1. Update _reasoning_kwargs()

Add "max" to the allowed set:

if level not in ("low", "medium", "high", "max"):
    return {}

2. Update config doc comments

Change from:

"" (off) | "low" | "medium" | "high"

to:

"" (off) | "low" | "medium" | "high" | "max"

On all 8 thinking_level fields.

3. API / model behaviour

The thinking_level value is passed through as-is to the provider — Anthropic gets output_config.effort=value and OpenAI-compatible providers get reasoning_effort=value. Providers that don't support "max" for these parameters will fall back to their maximum supported effort level (typically "high"). No behavioural regression for existing values.

4. Admin UI

The LLM tab and other places that offer a thinking level selector (e.g. subagent summary settings, memory config) should advertise "max" as an option. If a dropdown is used, add the value; if a free-text input is used, no change needed.

Config field comment updates are the minimum viable change — UI updates are a nice-to-have but not blocked by the backend.

Acceptance criteria

  • _reasoning_kwargs() passes "max" through to the provider instead of returning {}
  • All 8 thinking_level config field doc comments list "max" as a valid value
  • Anthropic API calls with thinking_level="max" send output_config.effort="max"
  • OpenAI-compatible calls with thinking_level="max" send reasoning_effort="max"
  • No regression for existing "low", "medium", "high", or "" values
  • Admin UI options updated if dropdown-based

Metadata

Metadata

Assignees

Labels

in-progressIt means someone is working on thisnewNew addition

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions