L
Most of this isn't needed because you can use Anthropic on Bedrock through Anthropic's official Python package, avoiding all the annoying differences in the APIs, and avoiding having to manually handle all the boto3 stuff :) The only thing you have to do is literally to replace "Anthropic" class client name with "AnthropicBedrock" and have the AWS ID/secret key/region in your env or provide them on initialization for that client. There are docs in GitHub README of the official Anthropic package.