Skip to content

feat: add reasoning parameter to ChatBedrockAnthropic()#286

Merged
cpsievert merged 3 commits intomainfrom
feat/bedrock-reasoning
May 7, 2026
Merged

feat: add reasoning parameter to ChatBedrockAnthropic()#286
cpsievert merged 3 commits intomainfrom
feat/bedrock-reasoning

Conversation

@cpsievert
Copy link
Copy Markdown
Collaborator

Summary

  • Adds reasoning parameter to ChatBedrockAnthropic() for parity with ChatAnthropic()
  • Same signature (int | ThinkingConfigEnabledParam), same coercion logic, same docstring
  • Also fixes the cache docstring which incorrectly described the default as "5m" when it's actually "none"

Motivated by tidyverse/ellmer#965 which added reasoning support to ellmer's Bedrock provider. chatlas already handled the wire format (since AnthropicBedrockProvider inherits from AnthropicProvider), but the convenience parameter was missing.

Test plan

  • Added test_reasoning to test_provider_bedrock.py with a recorded VCR cassette
  • Test verified with live Bedrock credentials
  • pyright passes with 0 errors
  • Existing Anthropic tests still pass

ChatAnthropic() already had a reasoning parameter for extended thinking,
but ChatBedrockAnthropic() was missing it despite using the same
underlying Anthropic SDK client and inheriting from AnthropicProvider.
@cpsievert
Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Co-authored-by: cpsievert <1365941+cpsievert@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 7, 2026

@copilot resolve the merge conflicts in this pull request

Resolved and pushed in commit eea42b0. Merge conflicts are fixed by merging latest origin/main and reconciling CHANGELOG.md so both sets of unreleased entries are retained. No UI changes were made.

@cpsievert cpsievert merged commit 8a6d61b into main May 7, 2026
9 checks passed
@cpsievert cpsievert deleted the feat/bedrock-reasoning branch May 7, 2026 23:39
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.

2 participants