Skip to content

Commit 6e4a887

Browse files
committed
fix(llm): fix boto3 metadata endpoint
1 parent cc98864 commit 6e4a887

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.5.8"
3+
version = "0.5.9"
44
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath_langchain/chat/bedrock.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ def _check_bedrock_dependencies() -> None:
3838
_check_bedrock_dependencies()
3939

4040
import boto3
41+
from botocore import UNSIGNED
42+
from botocore.config import Config
4143
from langchain_aws import (
4244
ChatBedrock,
4345
ChatBedrockConverse,
@@ -90,6 +92,7 @@ def get_client(self):
9092
region_name="none",
9193
aws_access_key_id="none",
9294
aws_secret_access_key="none",
95+
config=Config(signature_version=UNSIGNED),
9396
)
9497
client.meta.events.register(
9598
"before-send.bedrock-runtime.*", self._modify_request
@@ -167,6 +170,7 @@ def __init__(
167170
client = passthrough_client.get_client()
168171
kwargs["client"] = client
169172
kwargs["model"] = model_name
173+
kwargs.setdefault("region_name", "none")
170174
super().__init__(**kwargs)
171175
self.model = model_name
172176

@@ -214,5 +218,6 @@ def __init__(
214218
client = passthrough_client.get_client()
215219
kwargs["client"] = client
216220
kwargs["model"] = model_name
221+
kwargs.setdefault("region_name", "none")
217222
super().__init__(**kwargs)
218223
self.model = model_name

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)