fix: remove unsupported anthropic_beta flag from Bedrock Converse API#11969
Open
ewalsh wants to merge 1 commit intocontinuedev:mainfrom
Open
fix: remove unsupported anthropic_beta flag from Bedrock Converse API#11969ewalsh wants to merge 1 commit intocontinuedev:mainfrom
ewalsh wants to merge 1 commit intocontinuedev:mainfrom
Conversation
The Bedrock provider was unconditionally sending `anthropic_beta: ["fine-grained-tool-streaming-2025-05-14"]` in additionalModelRequestFields for all Claude models. The Bedrock Converse API does not support Anthropic beta flags, causing all Claude requests to fail with "invalid beta flag". Fixes continuedev#8297
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Bedrock provider was unconditionally sending anthropic_beta: ["fine-grained-tool-streaming-2025-05-14"] in additionalModelRequestFields for all Claude models. The Bedrock Converse API does not support Anthropic beta flags, causing all Claude requests to fail with "invalid beta flag".
Fixes #8297
Description
Removed the anthropic_beta field from additionalModelRequestFields in the Bedrock Converse API request builder (core/llm/llms/Bedrock.ts).
The fine-grained-tool-streaming-2025-05-14 beta flag is an Anthropic direct API feature that is not supported by the Bedrock Converse API. Bedrock validates additionalModelRequestFields and rejects unrecognised beta flags, causing all Claude model requests via Bedrock to fail.
Confirmed affected in v1.2.18 and v1.2.21.
AI Code Review
Team members only: AI review runs automatically when PR is opened or marked ready for review
Team members can also trigger a review by commenting @continue-review
Checklist
I've read the contributing guide
The relevant docs, if any, have been updated or created
The relevant tests, if any, have been updated or created
Screen recording or screenshot
Before fix: All Claude requests via Bedrock fail with:
The model returned the following errors: invalid beta flag
Copy
After fix: Claude requests via Bedrock Converse API succeed as expected.
Tests
No new tests added. The fix is a single line removal. Verified manually by invoking Claude models (anthropic.claude-3-haiku-20240307-v1:0, eu.anthropic.claude-sonnet-4-20250514-v1:0) via the Bedrock provider — requests succeed after the change.
Summary by cubic
Removed the unsupported
anthropic_beta: ["fine-grained-tool-streaming-2025-05-14"]from Bedrock Converse APIadditionalModelRequestFieldsto stop "invalid beta flag" errors and restore Claude requests via Bedrock.Written for commit b81b419. Summary will update on new commits.