Skip to content
Merged
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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.0.4] - 2026-01-13

### Fixed

- Bug where streaming failures would not properly fallback to non-streaming response delivery.

### Security

- Upgraded urllib3 to `2.6.3` to mitigate [CVE-2026-21441](https://avd.aquasec.com/nvd/cve-2026-21441/)
- Upgraded react-router to `7.12.0` to mitigate [CVE-2025-59057](https://avd.aquasec.com/nvd/cve-2025-59057), [CVE-2025-68470](https://avd.aquasec.com/nvd/cve-2025-68470), [CVE-2026-21884](https://avd.aquasec.com/nvd/cve-2026-21884), [CVE-2026-22029](https://avd.aquasec.com/nvd/cve-2026-22029) and [CVE-2026-22030](https://avd.aquasec.com/nvd/cve-2026-22030)
- Upgrade werkzeug to `3.1.5` to mitigate [CVE-2026-21860](https://avd.aquasec.com/nvd/cve-2026-21860)

## [4.0.3] - 2025-12-31

### Security
Expand Down
2 changes: 1 addition & 1 deletion deployment/ecr/gaab-strands-agent/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gaab-strands-agent"
version = "4.0.3"
version = "4.0.4"
description = "GAAB Strands Agent Runtime for Amazon Bedrock AgentCore"
readme = "README.md"
requires-python = ">=3.13"
Expand Down
14 changes: 7 additions & 7 deletions deployment/ecr/gaab-strands-agent/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions deployment/ecr/gaab-strands-common/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deployment/ecr/gaab-strands-workflow-agent/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gaab-strands-workflow-agent"
version = "1.0.0"
version = "4.0.4"
description = "GAAB Strands Workflow Agent Runtime for Amazon Bedrock AgentCore"
readme = "README.md"
requires-python = ">=3.13"
Expand Down
16 changes: 8 additions & 8 deletions deployment/ecr/gaab-strands-workflow-agent/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/infrastructure/cdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@custom-bundler/unit-test": false,
"solution_id": "SO0276",
"solution_name": "generative-ai-application-builder-on-aws",
"solution_version": "v4.0.3",
"solution_version": "v4.0.4",
"app_registry_name": "GAAB",
"application_type": "AWS-Solutions",
"application_trademark_name": "Generative AI Application Builder on AWS",
Expand Down
4 changes: 2 additions & 2 deletions source/infrastructure/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/infrastructure/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amzn/gen-ai-app-builder-on-aws-infrastructure",
"version": "4.0.3",
"version": "4.0.4",
"bin": {
"infrastructure": "bin/gen-ai-app-builder.js"
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amzn/node-lambda",
"version": "4.0.3",
"version": "4.0.4",
"description": "A mock lambda implementation for CDK infrastructure unit",
"main": "index.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mock-lambda-function"
version = "4.0.3"
version = "4.0.4"
authors = [ "Amazon Web Services" ]
description = "Mock lambda implementation to unit test infrastructure code"
packages = [
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amzn/mock-typescript-lambda",
"version": "4.0.3",
"version": "4.0.4",
"description": "A mock lambda implementation for CDK infrastructure unit",
"main": "index.ts",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions source/infrastructure/test/mock-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/infrastructure/test/mock-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amzn/mock-react-app",
"version": "4.0.3",
"version": "4.0.4",
"description": "Mock Reactjs app used for unit testing constructs",
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
Expand Down
20 changes: 10 additions & 10 deletions source/lambda/agentcore-invocation/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions source/lambda/agentcore-invocation/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "agent-invocation"
version = "4.0.3"
version = "4.0.4"
authors = [ "Amazon Web Services" ]
description = "Lambda implementation for agent invocation feature"
packages = [
Expand Down Expand Up @@ -31,7 +31,7 @@ pytest-env = "1.1.5"
PyYAML = "6.0.2"
setuptools = "80.8.0"
requests = "2.32.4"
urllib3 = "2.6.1"
urllib3 = "2.6.3"
boto3-layer = { path = "../layers/aws_boto3/", develop = true }
custom_boto3_init = { path = "../layers/custom_boto3_init", develop = true }

Expand Down
21 changes: 20 additions & 1 deletion source/lambda/chat/handlers/use_case_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ class UseCaseHandler:
def __init__(self, llm_client_type: LLMChatClient.__class__):
self.llm_client_type = llm_client_type

def check_streaming_failed(self, callbacks) -> bool:
"""
Check if streaming failed by examining callbacks for has_streamed attribute.

:param callbacks: List of callback objects to check
:return: True if streaming was attempted but failed, False otherwise
"""
streaming_failed = any(
hasattr(callback, "has_streamed") and not callback.has_streamed for callback in callbacks
)
if streaming_failed:
logger.info("Streaming was enabled but failed - using fallback")
return streaming_failed

def handle_event(self, event: Dict[str, Any], context: LambdaContext) -> Dict:
"""
Create a LLMChatClient concrete object type based on the configuration in `event` and
Expand Down Expand Up @@ -85,8 +99,13 @@ def handle_event(self, event: Dict[str, Any], context: LambdaContext) -> Dict:
conversation_id=conversation_id,
message_id=llm_client.builder.message_id,
)
if not llm_client.builder.is_streaming:

# Send response via WebSocket if streaming is disabled OR if streaming failed
streaming_failed = self.check_streaming_failed(llm_client.builder.callbacks)

if not llm_client.builder.is_streaming or streaming_failed:
socket_handler.post_response_to_connection(ai_response)

socket_handler.post_token_to_connection(END_CONVERSATION_TOKEN)
loop_index = loop_index + 1

Expand Down
Loading
Loading