diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md index 48d5f81..b894315 100644 --- a/.github/ISSUE_TEMPLATE/custom.md +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -6,5 +6,3 @@ labels: '' assignees: '' --- - - diff --git a/CHANGELOG.md b/CHANGELOG.md index e987c4d..feedb2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [0.1.0] - 2025-01-XX +## [0.1.0] - 2025-07-16 ### Added - Initial release of Bedrock AgentCore Python SDK @@ -21,3 +21,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - TLS 1.2+ enforcement for all communications - AWS SigV4 signing for API authentication - Secure credential handling via AWS credential chain + +## [0.1.1] - 2025-07-23 + +### Fixed +- **Identity OAuth2 parameter name** - Fixed incorrect parameter name in GetResourceOauth2Token + - Changed `callBackUrl` to `resourceOauth2ReturnUrl` for correct API compatibility + - Ensures proper OAuth2 token retrieval for identity authentication flows + +- **Memory client region detection** - Improved region handling in MemoryClient initialization + - Now follows standard AWS SDK region detection precedence + - Uses explicit `region_name` parameter when provided + - Falls back to `boto3.Session().region_name` if not specified + - Defaults to 'us-west-2' only as last resort + +- **JSON response double wrapping** - Fixed duplicate JSONResponse wrapping issue + - Resolved issue when semaphore acquired limit is reached + - Prevents malformed responses in high-concurrency scenarios + +### Improved +- **JSON serialization consistency** - Enhanced serialization for streaming and non-streaming responses + - Added new `_safe_serialize_to_json_string` method with progressive fallbacks + - Handles datetime, Decimal, sets, and Unicode characters consistently + - Ensures both streaming (SSE) and regular responses use identical serialization logic + - Improved error handling for non-serializable objects diff --git a/pyproject.toml b/pyproject.toml index 9fd7301..ddb72bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "bedrock-agentcore" -version = "0.1.0" +version = "0.1.1" description = "An SDK for using Bedrock AgentCore" readme = "README.md" requires-python = ">=3.10" diff --git a/src/bedrock_agentcore/memory/client.py b/src/bedrock_agentcore/memory/client.py index cc3d744..f1d7352 100644 --- a/src/bedrock_agentcore/memory/client.py +++ b/src/bedrock_agentcore/memory/client.py @@ -40,7 +40,7 @@ class MemoryClient: def __init__(self, region_name: Optional[str] = None): """Initialize the Memory client.""" - self.region_name = boto3.Session().region_name or region_name or "us-west-2" + self.region_name = region_name or boto3.Session().region_name or "us-west-2" self.gmcp_client = boto3.client("bedrock-agentcore-control", region_name=self.region_name) self.gmdp_client = boto3.client("bedrock-agentcore", region_name=self.region_name) diff --git a/tests/bedrock_agentcore/memory/test_client.py b/tests/bedrock_agentcore/memory/test_client.py index 04687a2..810f5c9 100644 --- a/tests/bedrock_agentcore/memory/test_client.py +++ b/tests/bedrock_agentcore/memory/test_client.py @@ -44,7 +44,7 @@ def test_client_initialization_region_mismatch(): # When region_name is provided, environment variable should still take precedence client1 = MemoryClient(region_name="us-west-2") - assert client1.region_name == "us-east-1" # Environment wins over explicit param + assert client1.region_name == "us-west-2" # Second test - no environment variable, explicit param is used with patch("boto3.Session") as mock_session: diff --git a/uv.lock b/uv.lock index c8f9c3f..d6f8ee2 100644 --- a/uv.lock +++ b/uv.lock @@ -37,7 +37,7 @@ wheels = [ [[package]] name = "bedrock-agentcore" -version = "0.1.0" +version = "0.1.1" source = { editable = "." } dependencies = [ { name = "boto3" },