diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a50cc8ba..caf81f83a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Fixed +- Fixed an issue in `AWSBedrockLLMService` where timeout exceptions weren't + being detected. + - Fixed a `PipelineTask` issue that could prevent the application to exit if `task.cancel()` was called when the task was already finished. diff --git a/src/pipecat/services/aws/llm.py b/src/pipecat/services/aws/llm.py index f51e3864c..377848f76 100644 --- a/src/pipecat/services/aws/llm.py +++ b/src/pipecat/services/aws/llm.py @@ -61,7 +61,6 @@ from pipecat.utils.tracing.service_decorators import traced_llm try: import aioboto3 - import httpx from botocore.config import Config from botocore.exceptions import ReadTimeoutError except ModuleNotFoundError as e: @@ -1117,7 +1116,7 @@ class AWSBedrockLLMService(LLMService): # also get cancelled. use_completion_tokens_estimate = True raise - except httpx.TimeoutException: + except (ReadTimeoutError, asyncio.TimeoutError): await self._call_event_handler("on_completion_timeout") except Exception as e: logger.exception(f"{self} exception: {e}")