feat: add Betas support for Anthropic provider options#151
Open
taigrr wants to merge 1 commit intocharmbracelet:mainfrom
Open
feat: add Betas support for Anthropic provider options#151taigrr wants to merge 1 commit intocharmbracelet:mainfrom
taigrr wants to merge 1 commit intocharmbracelet:mainfrom
Conversation
2 tasks
5 tasks
Adds a Betas field to ProviderOptions that allows specifying beta features to enable via the anthropic-beta header. This is needed for features like the 1M context window on AWS Bedrock (context-1m-2025-08-07). The betas are passed as request options via option.WithHeaderAdd() and the bedrock middleware in the SDK automatically moves these headers into the anthropic_beta JSON body field. 🐊 Generated with Crush Assisted-by: AWS Claude Opus 4.5 via Crush <crush@charm.land>
a557a0d to
50b146a
Compare
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.
Summary
Betasfield toProviderOptionsfor specifying beta features via theanthropic-betaheadercontext-1m-2025-08-07)option.WithHeaderAdd()and the bedrock middleware automatically moves them into theanthropic_betaJSON body fieldRelated PRs
Test plan
go build ./...passesgo test ./providers/anthropic/...passes