Skip to content

feat(bedrock): support performance latency config#1514

Open
wilyan09007 wants to merge 1 commit intoanthropics:mainfrom
wilyan09007:issue-971-bedrock-low-latency
Open

feat(bedrock): support performance latency config#1514
wilyan09007 wants to merge 1 commit intoanthropics:mainfrom
wilyan09007:issue-971-bedrock-low-latency

Conversation

@wilyan09007
Copy link
Copy Markdown

What

Adds performance_config_latency support to the Bedrock sync and async clients, mapping the configured value to the X-Amzn-Bedrock-PerformanceConfig-Latency header for both regular and streaming message invocations.

The option is preserved through copy() and can be overridden or cleared on copied clients.

Why

Fixes #971.

Bedrock exposes low-latency inference through the performance latency header, but the SDK did not provide a first-class way to set it.

Verification / How to test

  • uv run ruff check src\anthropic\lib\bedrock\_client.py tests\lib\test_bedrock.py
  • uv run pyright src\anthropic\lib\bedrock\_client.py
  • uv run --extra bedrock pytest tests\lib\test_bedrock.py -k "performance_config_latency or messages_retries or application_inference_profile or api_key_auth"
  • git diff --check HEAD~1..HEAD

@wilyan09007 wilyan09007 requested a review from a team as a code owner May 8, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bedrock: support low-latency configuration

1 participant