Skip to content

Commit d29007f

Browse files
committed
Fix Bedrock chat client setup
1 parent 86ae1ff commit d29007f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

pointblank/_utils_ai.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,12 @@ def _create_chat_instance(
185185
elif provider == "bedrock": # pragma: no cover
186186
from chatlas import ChatBedrockAnthropic
187187

188+
# ChatBedrockAnthropic creates both a sync and async client internally,
189+
# so we cannot pass a single http_client instance. Omit it and let
190+
# the Bedrock client manage its own HTTP stack.
188191
chat = ChatBedrockAnthropic(
189192
model=model_name,
190193
system_prompt=system_prompt,
191-
kwargs={"http_client": http_client},
192194
)
193195

194196
elif provider == "azure-openai": # pragma: no cover

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ dependencies = [
4444
"click>=8.0.0",
4545
"rich>=13.0.0",
4646
"pyyaml>=6.0.0",
47+
"anthropic[bedrock]>=0.68.0",
4748
]
4849
requires-python = ">=3.10"
4950

0 commit comments

Comments
 (0)