Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(backend): Support aiohttp.BasicAuth in `make_request` (#10283)

seer-by-sentry[bot]47f503f223b3
diff --git a/autogpt_platform/backend/backend/util/request.py b/autogpt_platform/backend/backend/util/request.py
index 08ac08ec50..7c7c684c48 100644
--- a/autogpt_platform/backend/backend/util/request.py
+++ b/autogpt_platform/backend/backend/util/request.py
@@ -353,6 +353,10 @@ class Requests:
max_redirects: int = 10,
**kwargs,
) -> Response:
+ # Convert auth tuple to aiohttp.BasicAuth if necessary
+ if "auth" in kwargs and isinstance(kwargs["auth"], tuple):
+ kwargs["auth"] = aiohttp.BasicAuth(*kwargs["auth"])
+
if files is not None:
if json is not None:
raise ValueError(