Skip to content

feat: add Betas support for Anthropic provider options#151

Open
taigrr wants to merge 1 commit intocharmbracelet:mainfrom
taigrr:feat/1m-context
Open

feat: add Betas support for Anthropic provider options#151
taigrr wants to merge 1 commit intocharmbracelet:mainfrom
taigrr:feat/1m-context

Conversation

@taigrr
Copy link

@taigrr taigrr commented Feb 27, 2026

Summary

  • Adds a Betas field to ProviderOptions for specifying beta features via the anthropic-beta header
  • Needed for features like the 1M context window on AWS Bedrock (context-1m-2025-08-07)
  • Betas are passed as request options via option.WithHeaderAdd() and the bedrock middleware automatically moves them into the anthropic_beta JSON body field

Related PRs

  • charmbracelet/catwalk: taigrr/catwalk#151 (adds 1M model variants)
  • charmbracelet/crush: taigrr/crush#2321 (wires betas through config)

Test plan

  • go build ./... passes
  • go test ./providers/anthropic/... passes
  • Manual test with Bedrock 1M context model

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>
@andreynering andreynering self-requested a review February 27, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants