#10217: docs: add Anthropic adaptive thinking documentation for Opus 4.6
docs
stale
## Summary
This PR adds documentation and tests for Anthropic's adaptive thinking feature introduced in Claude Opus 4.6.
### Background
Anthropic's Claude Opus 4.6 introduced **adaptive thinking** which replaces the deprecated `budget_tokens` approach. Instead of setting a fixed token budget, Claude dynamically decides when and how much to think.
**Old (deprecated):** `thinking: {type: "enabled", budget_tokens: N}`
**New:** `thinking: {type: "adaptive"}`
### Changes
1. **Documentation** (`docs/tools/thinking.md`):
- Added section explaining adaptive thinking for Opus 4.6+
- Documented the thinking level to effort parameter mapping
- Added examples of how to use thinking levels with Opus 4.6
2. **Tests** (`src/auto-reply/adaptive-thinking.test.ts`):
- Tests verifying thinking level to effort mapping (minimal→low, low→low, medium→medium, high→high, xhigh→max)
- Tests for Opus 4.6 model detection
- Tests ensuring thinking level normalization works correctly for adaptive thinking
### Thinking Level to Effort Mapping
| OpenClaw Level | Anthropic Effort |
|----------------|------------------|
| minimal | low |
| low | low |
| medium | medium |
| high | high |
| xhigh | max |
### Note
The actual adaptive thinking implementation is already in `@mariozechner/pi-ai` 0.52.6 (which is now in OpenClaw's HEAD). This PR adds documentation to help users understand how their thinking level choices affect Opus 4.6 behavior.
Closes #9837
---
Thanks to @TinyTb for the Opus 4.6 model catalog work in #9853!
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new documentation section describing Anthropic “adaptive thinking” for Opus 4.6+ and introduces a new Vitest file intended to validate thinking-level → effort mapping and Opus 4.6 model detection.
The docs change is self-contained in `docs/tools/thinking.md` and how OpenClaw thinking levels relate to Anthropic effort when using Opus 4.6.
The new test file, however, mostly re-tests locally re-implemented helpers that “mirror” behavior in `@mariozechner/pi-ai`, rather than exercising any OpenClaw integration code path. As written it will pass regardless of whether OpenClaw’s actual adaptive-thinking behavior changes, so it doesn’t provide meaningful regression coverage.
<h3>Confidence Score: 3/5</h3>
- This PR is mostly safe, but the added tests don’t validate the real OpenClaw behavior they claim to cover.
- Docs changes are straightforward, but the new adaptive-thinking tests primarily assert local helper functions that are not used by OpenClaw at runtime, so they can give a false sense of coverage and should be fixed before merging.
- src/auto-reply/adaptive-thinking.test.ts
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#20620: feat: add anthropic/claude-opus-4-6 to XHIGH_MODEL_REFS
by chungjchris · 2026-02-19
80.0%
#13361: fix(google-antigravity): add Opus 4.6 support and fix thinking.sign...
by SovranAMR · 2026-02-10
76.9%
#22797: Feat/auto thinking mode
by jrthib · 2026-02-21
74.2%
#15606: LLM Task: add explicit thinking level wiring
by xadenryan · 2026-02-13
74.0%
#6685: fix: suppress thinking leak for Synthetic reasoning models
by AkiLetschne · 2026-02-01
72.8%
#10831: fix(agents): set Opus 4.6 context window to 1M in forward-compat fa...
by slawt · 2026-02-07
72.6%
#13119: fix: add forward-compat for google-antigravity claude-opus-4-6 models
by sdb001 · 2026-02-10
72.4%
#12220: fix: forward-compat models now respect user-configured contextWindow
by Batuhan4 · 2026-02-09
72.3%
#6730: feat: Make OpenAI Codex CLI models usable - reasoning effort directive
by levineam · 2026-02-02
72.0%
#21614: fix: warn when thinking level xhigh falls back for unsupported models
by lbo728 · 2026-02-20
72.0%