Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "enhancement",
"description": "Regenerate the Bedrock Runtime client with the current Smithy compact-schema API for compatibility with the shared runtime."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "feature",
"description": "Document and validate inherited request-compression configuration for the Bedrock Runtime client. Explicit gzip requires operation support; current Bedrock operations remain unsupported."
}
36 changes: 36 additions & 0 deletions clients/aws-sdk-bedrock-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,39 @@ python -m pip install aws-sdk-bedrock-runtime
the Bedrock Runtime client, available operations, and types.
- [Developer Guide](https://docs.aws.amazon.com/sdk-for-python/v4/guide/) -
configuration, authentication, and usage of the AWS SDK for Python v4.

## Request compression

Request compression reduces the bytes uploaded to an operation that advertises
gzip support. It does not reduce model input tokens. The client exposes three
configuration settings:

- `disable_request_compression`: disable automatic compression.
- `request_min_compression_size_bytes`: the automatic compression threshold,
defaulting to 10,240 bytes.
- `request_compression_encoding`: explicitly select `"gzip"` regardless of the
threshold, or leave it as `None` for automatic behavior.

For an operation with advertised gzip support, explicit configuration is:

```python
from aws_sdk_bedrock_runtime.config import AsyncBedrockRuntimeConfig

config = await AsyncBedrockRuntimeConfig.resolve(
region="us-east-1",
request_compression_encoding="gzip",
)
```

The current Bedrock Runtime service model does not advertise request compression.
Leave the explicit encoding unset for current Bedrock operations. Selecting gzip
on an unsupported operation fails before sending a request; the SDK does not
silently send an uncompressed request. Disabling compression while explicitly
selecting gzip is also invalid. Zstd is not currently supported.

The configuration cannot enable server-side compression support. Bedrock and
Mantle endpoints must accept compressed requests before applications can use it
with those endpoints.

This client covers modeled Bedrock Runtime operations. Mantle's provider-compatible
APIs use a separate client integration and need compression support there too.
Loading