Skip to content

fix(bedrock): use the Bedrock Messages API version by default - #2032

Open
charan-rathore wants to merge 1 commit into
anthropics:mainfrom
charan-rathore:fix/bedrock-api-version-2031
Open

charan-rathore wants to merge 1 commit into
anthropics:mainfrom
charan-rathore:fix/bedrock-api-version-2031

Conversation

@charan-rathore

Copy link
Copy Markdown

Fixes #2031

Restore bedrock-2023-05-31 as the default anthropic_version for Bedrock Messages requests. Bedrock rejects the current Messages API version for existing Claude models such as Sonnet 4.5 and Opus 4.6. Callers can still override the value through extra_body; other clients keep using the current Messages API version.

Tests:

  • Added a mocked request regression test. It fails on main with 2026-10-21 and passes with the Bedrock default.
  • tests/lib/test_bedrock.py: 47 passed, including the sync and async extra_body override tests.

Prepared with Codex assistance; regression tests were run locally.

@charan-rathore
charan-rathore requested a review from a team as a code owner October 23, 2026 02:59
Fixes anthropics#2031

Signed-off-by: Charan Rathore <180254320+charan-rathore@users.noreply.github.com>
@charan-rathore
charan-rathore force-pushed the fix/bedrock-api-version-2031 branch from 54c6a29 to 070fb63 Compare October 23, 2026 03:02

This branch has not been deployed

No deployments
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.

AnthropicBedrock 2.x sends anthropic_version: 2026-10-21, which Bedrock rejects for Claude Sonnet 4.5, Opus 4.5 and Opus 4.6

1 participant