Skip to content

anthropic: Add support for thinking toggle#51946

Merged
bennetbo merged 3 commits intomainfrom
anthropic-thinking-toggle
Mar 19, 2026
Merged

anthropic: Add support for thinking toggle#51946
bennetbo merged 3 commits intomainfrom
anthropic-thinking-toggle

Conversation

@bennetbo
Copy link
Copy Markdown
Member

@bennetbo bennetbo commented Mar 19, 2026

This adds support for the thinking toggle + reasoning effort for the Anthropic provider

Release Notes:

  • anthropic: Added support for selecting reasoning effort

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 19, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 19, 2026
Co-authored-by: Marshall Bowers <[email protected]>
@github-actions github-actions bot added size/M and removed size/M labels Mar 19, 2026
Co-authored-by: Marshall Bowers <[email protected]>
@github-actions github-actions bot added size/M and removed size/M labels Mar 19, 2026
@bennetbo bennetbo marked this pull request as ready for review March 19, 2026 16:32
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team, osyvokon and rtfeldman and removed request for a team March 19, 2026 16:32
@bennetbo bennetbo merged commit 68d9607 into main Mar 19, 2026
31 checks passed
@bennetbo bennetbo deleted the anthropic-thinking-toggle branch March 19, 2026 16:43
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 20, 2026
This adds support for the thinking toggle + reasoning effort for the
Anthropic provider

Release Notes:

- anthropic: Added support for selecting reasoning effort

---------

Co-authored-by: Marshall Bowers <[email protected]>
toshmukhamedov pushed a commit to toshmukhamedov/zed that referenced this pull request Mar 20, 2026
This adds support for the thinking toggle + reasoning effort for the
Anthropic provider

Release Notes:

- anthropic: Added support for selecting reasoning effort

---------

Co-authored-by: Marshall Bowers <[email protected]>
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 23, 2026
This adds support for the thinking toggle + reasoning effort for the
Anthropic provider

Release Notes:

- anthropic: Added support for selecting reasoning effort

---------

Co-authored-by: Marshall Bowers <[email protected]>
@dfrj-gh
Copy link
Copy Markdown

dfrj-gh commented Apr 1, 2026

Where on earth is this? :)

osyvokon pushed a commit that referenced this pull request Apr 14, 2026
…refactor (#52975)

PR #51946 broke `Model::Custom` thinking behavior: `mode()`,
`supports_thinking()`, and `supports_adaptive_thinking()` all inferred
capabilities from hardcoded built-in model lists, so any `Custom`
variant always fell back to `Default` regardless of its configured
`mode` field.

### Fixes

- **`Model::mode()`** — `Custom` now short-circuits to `mode.clone()`
before the built-in inference logic
- **`Model::supports_thinking()`** — `Custom` returns `true` when `mode`
is `Thinking { .. }` or `AdaptiveThinking`
- **`Model::supports_adaptive_thinking()`** — `Custom` returns `true`
when `mode` is `AdaptiveThinking`

Built-in model behavior is unchanged.

### Tests

Three regression tests added covering the three `Custom` mode cases:
explicit `Thinking`, `AdaptiveThinking`, and `Default` (which must
disable both flags).

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed custom Anthropic models losing their configured
thinking/adaptive-thinking mode after the thinking-toggle refactor
(#51946)

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
nathansobo pushed a commit that referenced this pull request Apr 14, 2026
…refactor (#52975)

PR #51946 broke `Model::Custom` thinking behavior: `mode()`,
`supports_thinking()`, and `supports_adaptive_thinking()` all inferred
capabilities from hardcoded built-in model lists, so any `Custom`
variant always fell back to `Default` regardless of its configured
`mode` field.

### Fixes

- **`Model::mode()`** — `Custom` now short-circuits to `mode.clone()`
before the built-in inference logic
- **`Model::supports_thinking()`** — `Custom` returns `true` when `mode`
is `Thinking { .. }` or `AdaptiveThinking`
- **`Model::supports_adaptive_thinking()`** — `Custom` returns `true`
when `mode` is `AdaptiveThinking`

Built-in model behavior is unchanged.

### Tests

Three regression tests added covering the three `Custom` mode cases:
explicit `Thinking`, `AdaptiveThinking`, and `Default` (which must
disable both flags).

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed custom Anthropic models losing their configured
thinking/adaptive-thinking mode after the thinking-toggle refactor
(#51946)

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants