agenta 0.46.0__py3-none-any.whl → 0.47.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of agenta might be problematic. Click here for more details.
agenta/sdk/middleware/auth.py
CHANGED
|
@@ -193,7 +193,7 @@ class AuthMiddleware(BaseHTTPMiddleware):
|
|
|
193
193
|
)
|
|
194
194
|
raise DenyException(
|
|
195
195
|
status_code=500,
|
|
196
|
-
content=f"Could
|
|
196
|
+
content=f"Could not verify credentials: {self.host} returned unexpected status code {response.status_code}. Please try again later or contact support if the issue persists.",
|
|
197
197
|
)
|
|
198
198
|
|
|
199
199
|
try:
|
|
@@ -202,7 +202,7 @@ class AuthMiddleware(BaseHTTPMiddleware):
|
|
|
202
202
|
log.debug(f"Agenta returned invalid JSON response: {exc}")
|
|
203
203
|
raise DenyException(
|
|
204
204
|
status_code=500,
|
|
205
|
-
content=f"Could
|
|
205
|
+
content=f"Could not verify credentials: {self.host} returned unexpected invalid JSON response. Please try again later or contact support if the issue persists.",
|
|
206
206
|
) from exc
|
|
207
207
|
|
|
208
208
|
if not isinstance(auth, dict):
|
|
@@ -211,7 +211,7 @@ class AuthMiddleware(BaseHTTPMiddleware):
|
|
|
211
211
|
)
|
|
212
212
|
raise DenyException(
|
|
213
213
|
status_code=500,
|
|
214
|
-
content=f"Could
|
|
214
|
+
content=f"Could not verify credentials: {self.host} returned unexpected invalid response format. Please try again later or contact support if the issue persists.",
|
|
215
215
|
)
|
|
216
216
|
|
|
217
217
|
effect = auth.get("effect")
|
|
@@ -239,7 +239,7 @@ class AuthMiddleware(BaseHTTPMiddleware):
|
|
|
239
239
|
)
|
|
240
240
|
raise DenyException(
|
|
241
241
|
status_code=500,
|
|
242
|
-
content=f"Could
|
|
242
|
+
content=f"Could not verify credentials: unexpected error - {str(exc)}. Please try again later or contact support if the issue persists.",
|
|
243
243
|
) from exc
|
|
244
244
|
|
|
245
245
|
except DenyException as deny:
|
|
@@ -248,5 +248,5 @@ class AuthMiddleware(BaseHTTPMiddleware):
|
|
|
248
248
|
log.debug(f"Unexpected error while verifying credentials (local): {exc}")
|
|
249
249
|
raise DenyException(
|
|
250
250
|
status_code=500,
|
|
251
|
-
content=f"Could
|
|
251
|
+
content=f"Could not verify credentials: unexpected error - {str(exc)}. Please try again later or contact support if the issue persists.",
|
|
252
252
|
) from exc
|
agenta/sdk/utils/helpers.py
CHANGED
|
@@ -33,10 +33,11 @@ def parse_url(url: str) -> str:
|
|
|
33
33
|
return internal_url
|
|
34
34
|
|
|
35
35
|
docker_network_mode = os.getenv("DOCKER_NETWORK_MODE", "").lower()
|
|
36
|
-
if
|
|
36
|
+
if docker_network_mode == "bridge":
|
|
37
37
|
return url.replace("localhost", "host.docker.internal")
|
|
38
38
|
|
|
39
|
-
if docker_network_mode == "host":
|
|
39
|
+
if not docker_network_mode or docker_network_mode == "host":
|
|
40
40
|
return url
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
# For any other network mode, return the URL unchanged
|
|
43
|
+
return url
|
|
@@ -221,7 +221,7 @@ agenta/sdk/managers/shared.py,sha256=kI3w74E4rS3YDORG2e-_r0Pz5KslTRzRBK7vgyOeaJA
|
|
|
221
221
|
agenta/sdk/managers/variant.py,sha256=A5ga3mq3b0weUTXa9HO72MGaspthGcu1uK9K5OnP738,4172
|
|
222
222
|
agenta/sdk/managers/vault.py,sha256=054ce9X_xKa2M4NtQWz-GugO6q_pYVWCP3IxbAJJcRw,337
|
|
223
223
|
agenta/sdk/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
224
|
-
agenta/sdk/middleware/auth.py,sha256=
|
|
224
|
+
agenta/sdk/middleware/auth.py,sha256=x1b6S57-7xlomkWKLqtYMt1Y6RPAO0HTGHpk3xPw2xo,10161
|
|
225
225
|
agenta/sdk/middleware/config.py,sha256=g3f81uywYCcgT_TSQxZ5O1Db9wGmPuRMlf-8WKqWqdA,7963
|
|
226
226
|
agenta/sdk/middleware/cors.py,sha256=q3r7lGkrIdMcT_vuhsburMcjG7pyl7w0ycxrIrGJ2e8,921
|
|
227
227
|
agenta/sdk/middleware/inline.py,sha256=ee8E4XBGcRSrHTvblqX1yRXuTN_sxLm7lY1jnywrBG8,901
|
|
@@ -245,11 +245,11 @@ agenta/sdk/utils/constants.py,sha256=zW3R4rjXOo2L5lz6q84l_zYuOM9u4mpPRHw_B1Dr_hI
|
|
|
245
245
|
agenta/sdk/utils/costs.py,sha256=i8C7ud__pThLS55XkN4YW8czXtGeXr2mx7jjcOFeiXg,5955
|
|
246
246
|
agenta/sdk/utils/exceptions.py,sha256=Dq3lh5Ug7IhF4nvYRXXlwhgxEuByOnT1w0uVMZx1eaM,1504
|
|
247
247
|
agenta/sdk/utils/globals.py,sha256=9ixKS8aI6ZWgsjT8WngvTg4dsnP2cKErNJngHxzdK9U,256
|
|
248
|
-
agenta/sdk/utils/helpers.py,sha256=
|
|
248
|
+
agenta/sdk/utils/helpers.py,sha256=gfvQ-2-M_tZonFJtSdC0F7CNFcHyUG1CTgGQNwxRt2g,1169
|
|
249
249
|
agenta/sdk/utils/logging.py,sha256=j4NzpFk2ilOM10sRBOxCjmansDHSx6HwMV8IAEreRb8,8386
|
|
250
250
|
agenta/sdk/utils/preinit.py,sha256=YlJL7RLfel0R7DFp-jK7OV-z4ZIQJM0oupYlk7g8b5o,1278
|
|
251
251
|
agenta/sdk/utils/singleton.py,sha256=17Ph7LGnnV8HkPjImruKita2ni03Ari5jr0jqm__4sc,312
|
|
252
252
|
agenta/sdk/utils/timing.py,sha256=nZR-kudVUtKFlHuBhztgSGxj7FVnCB4Uv6sfg-1dkrQ,1556
|
|
253
|
-
agenta-0.
|
|
254
|
-
agenta-0.
|
|
255
|
-
agenta-0.
|
|
253
|
+
agenta-0.47.0.dist-info/METADATA,sha256=2LjpV1wQBIt5iJKrEUpF-2-uA9zTtNENFrDgem725DE,31433
|
|
254
|
+
agenta-0.47.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
255
|
+
agenta-0.47.0.dist-info/RECORD,,
|
|
File without changes
|