Skip to content

Commit 47138aa

Browse files
Hardcode dummy credentials and region info for ChatBedrockConverse client.
1 parent 8a543a7 commit 47138aa

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

singlestoredb/ai/chat.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,21 +120,16 @@ def __init__(
120120
provided_headers = {}
121121

122122
if backend_type == 'bedrock':
123-
self._removed_aws_env: dict[str, str] = {}
124-
for _v in (
125-
'AWS_ACCESS_KEY_ID',
126-
'AWS_SECRET_ACCESS_KEY',
127-
'AWS_SESSION_TOKEN',
128-
):
129-
if _v in os.environ:
130-
self._removed_aws_env[_v] = os.environ.pop(_v)
131-
132123
token_env = os.environ.get('SINGLESTOREDB_USER_TOKEN')
133124
token = api_key if api_key is not None else token_env
134125
self._client = ChatBedrockConverse(
135126
base_url=info.connection_url,
136127
model=actual_model,
137128
streaming=streaming,
129+
region='us-east-1', # dummy value; UMG does not use this
130+
aws_access_key_id='placeholder', # dummy value; UMG does not use this
131+
aws_secret_access_key='placeholder', # dummy value; UMG does not use this
132+
cache=True,
138133
**kwargs,
139134
)
140135

0 commit comments

Comments
 (0)