anthropic-sdk-python icon indicating copy to clipboard operation
anthropic-sdk-python copied to clipboard

fix(bedrock): preserve http_client in copy() and with_options() methods

Open ljun20160606 opened this issue 3 months ago • 0 comments

Fixes an issue where the http_client parameter was not being passed through when copying AnthropicBedrock and AsyncAnthropicBedrock instances. This caused the copied client to create a new http_client instead of reusing the existing one.

Adds comprehensive test coverage for copy() and with_options() methods including:

  • Basic copy functionality
  • AWS credential overrides
  • Default options (max_retries, timeout)
  • Default headers and query parameters
  • set_default_headers and set_default_query behavior

🤖 Generated with Claude Code

ljun20160606 avatar Oct 31 '25 13:10 ljun20160606