From 8b197a7ca8d79df384d3b226d04e0d8ec45204d5 Mon Sep 17 00:00:00 2001 From: Tiago Freire Date: Wed, 1 Jul 2026 18:30:59 -0300 Subject: [PATCH] fix: include aiobotocore in the bedrock extra (#6419) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Overview `BedrockCompletion.acall()` (the async completion path used when a crew is kicked off asynchronously) requires `aiobotocore` to build its async client. The `bedrock` extra, however, only declared `boto3`. Crews configured with an AWS Bedrock model work fine under a synchronous `kickoff()`, since that path only needs `boto3`, but raise `NotImplementedError: Async support for AWS Bedrock requires aiobotocore` as soon as they're kicked off asynchronously, since `aiobotocore` was never installed. The fix adds `aiobotocore` to the `bedrock` extra, so `crewai[bedrock]` installs both the sync (`boto3`) and async (`aiobotocore`) dependencies the native Bedrock provider needs. The lockfile is regenerated to match. The exception message is also corrected — it previously pointed to a `bedrock-async` extra that never existed in `pyproject.toml`. ### Changes - `lib/crewai/pyproject.toml`: add `aiobotocore~=3.5.0` to the `bedrock` extra - `uv.lock`: regenerated to reflect the updated `bedrock` extra - `lib/crewai/src/crewai/llms/providers/bedrock/completion.py`: fix the install hint in the `NotImplementedError` message to reference the real `bedrock` extra instead of the nonexistent `bedrock-async` --- lib/crewai/pyproject.toml | 1 + lib/crewai/src/crewai/llms/providers/bedrock/completion.py | 2 +- uv.lock | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/crewai/pyproject.toml b/lib/crewai/pyproject.toml index 30c947392..66ba2b1f1 100644 --- a/lib/crewai/pyproject.toml +++ b/lib/crewai/pyproject.toml @@ -92,6 +92,7 @@ litellm = [ ] bedrock = [ "boto3~=1.42.90", + "aiobotocore~=3.5.0", ] google-genai = [ "google-genai~=1.65.0", diff --git a/lib/crewai/src/crewai/llms/providers/bedrock/completion.py b/lib/crewai/src/crewai/llms/providers/bedrock/completion.py index ef316e8f4..d10fc2ba8 100644 --- a/lib/crewai/src/crewai/llms/providers/bedrock/completion.py +++ b/lib/crewai/src/crewai/llms/providers/bedrock/completion.py @@ -492,7 +492,7 @@ class BedrockCompletion(BaseLLM): if not AIOBOTOCORE_AVAILABLE: raise NotImplementedError( "Async support for AWS Bedrock requires aiobotocore. " - 'Install with: uv add "crewai[bedrock-async]"' + 'Install with: uv add "crewai[bedrock]"' ) with llm_call_context(): diff --git a/uv.lock b/uv.lock index 93e0f8be8..61c80e7a1 100644 --- a/uv.lock +++ b/uv.lock @@ -13,7 +13,7 @@ resolution-markers = [ ] [options] -exclude-newer = "2026-06-20T16:46:21.117658Z" +exclude-newer = "2026-06-28T20:06:34.114646Z" exclude-newer-span = "P3D" [options.exclude-newer-package] @@ -1371,6 +1371,7 @@ azure-ai-inference = [ { name = "azure-identity" }, ] bedrock = [ + { name = "aiobotocore" }, { name = "boto3" }, ] docling = [ @@ -1418,6 +1419,7 @@ watson = [ requires-dist = [ { name = "a2a-sdk", marker = "extra == 'a2a'", specifier = "~=0.3.10" }, { name = "aiobotocore", marker = "extra == 'aws'", specifier = "~=3.5.0" }, + { name = "aiobotocore", marker = "extra == 'bedrock'", specifier = "~=3.5.0" }, { name = "aiocache", extras = ["memcached", "redis"], marker = "extra == 'a2a'", specifier = "~=0.12.3" }, { name = "aiofiles", specifier = "~=24.1.0" }, { name = "aiosqlite", specifier = "~=0.21.0" },