Skip to content

Add adaptive thinking support to the computer-use demo#411

Merged
PedramNavid merged 1 commit into
anthropics:mainfrom
lg-ant:lg/computer-use-demo-adaptive-thinking
May 28, 2026
Merged

Add adaptive thinking support to the computer-use demo#411
PedramNavid merged 1 commit into
anthropics:mainfrom
lg-ant:lg/computer-use-demo-adaptive-thinking

Conversation

@lg-ant
Copy link
Copy Markdown
Contributor

@lg-ant lg-ant commented May 28, 2026

Newer Claude models (Opus 4.6 / Sonnet 4.6 and later) reason adaptively — the model decides how much to think, steered by an effort level — instead of using a manual thinking token budget. This adds adaptive thinking support to the computer-use reference implementation:

  • Each model config declares which thinking modes it supports (adaptive / extended / off), and the sidebar offers only those modes: an effort slider for adaptive, the existing budget input for extended.
  • Adds Claude Opus 4.6, Sonnet 4.6, Opus 4.7, and Claude Opus 4.8 to the model map, and defaults the demo to claude-opus-4-8 with adaptive thinking at medium effort.
  • Model IDs resolve by longest known prefix, so undated aliases and Bedrock/Vertex forms of a known family get the right capabilities; unrecognized IDs keep all modes selectable.
  • Older models keep their existing behavior (extended thinking with a token budget).
  • Refreshes the README callout to reflect the new default model.

Verification: 51 unit tests pass, including new cases covering the request body per thinking mode and the per-model UI options; ruff and pyright clean.

Newer Claude models (Opus 4.6 / Sonnet 4.6 and later) reason adaptively,
steered by an effort level, instead of using a manual thinking token budget.
Make the thinking request mode a per-model capability, add Claude Opus 4.6,
Sonnet 4.6, Opus 4.7, and Opus 4.8 to the model map, replace the thinking
checkbox with a mode selector plus an effort slider, and default the demo to
Claude Opus 4.8.
@PedramNavid PedramNavid merged commit f37f168 into anthropics:main May 28, 2026
4 of 6 checks passed
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.

3 participants