Use adaptive thinking with Claude Opus 4.6
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 570
- Forks
- 351
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 65
Description
/app/.venv/lib/python3.12/site-packages/langchain_anthropic/chat_models.py:1410: UserWarning: Using Claude with claude-opus-4-6 and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking
See https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking#supported-models:
thinking.type: "enabled"and budget_tokens are deprecated on Opus 4.6 and Sonnet 4.6 and will be removed in a future model release. Usethinking.type: "adaptive"with the effort parameter instead. If you are already using extended thinking withbudget_tokens, it continues to work and no immediate changes are required.Older models (Sonnet 4.5, Opus 4.5, etc.) do not support adaptive thinking and require
thinking.type: "enabled"withbudget_tokens.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the warning from langchain_anthropic/chat_models.py and read the linked adaptive-thinking documentation for supported models. Locate where this project configures Claude thinking, then verify that Opus 4.6 uses adaptive thinking while older models retain enabled thinking. Done when the deprecation warning no longer appears for Opus 4.6 and model compatibility is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100