diff --git a/README.md b/README.md index 848e045..cab9356 100644 --- a/README.md +++ b/README.md @@ -784,9 +784,9 @@ The logger will record: All requests automatically include the following default headers: -| Header | Value | Description | -|--------|-------|-------------| -| `X-UiPath-LLMGateway-TimeoutSeconds` | `295` | Server-side timeout for LLM Gateway | +| Header | Value | Description | +|--------|--------|-------------| +| `X-UiPath-LLMGateway-TimeoutSeconds` | `895` | Server-side timeout for LLM Gateway | | `X-UiPath-LLMGateway-AllowFull4xxResponse` | `true` | Returns full error response bodies for 4xx errors | ### Authentication Auto-Refresh diff --git a/src/uipath/llm_client/utils/headers.py b/src/uipath/llm_client/utils/headers.py index 0b3dfb1..87c74f4 100644 --- a/src/uipath/llm_client/utils/headers.py +++ b/src/uipath/llm_client/utils/headers.py @@ -7,7 +7,7 @@ from uipath.llm_client.settings.constants import ApiType, RoutingMode UIPATH_DEFAULT_REQUEST_HEADERS: dict[str, str] = { - "X-UiPath-LLMGateway-TimeoutSeconds": "295", # server side timeout, default is 10, maximum is 300 + "X-UiPath-LLMGateway-TimeoutSeconds": "895", # server side timeout "X-UiPath-LLMGateway-AllowFull4xxResponse": "false", # allow full 4xx responses (default is false) — kept false to avoid PII leakage in logs } diff --git a/tests/langchain/features/test_default_headers_merge.py b/tests/langchain/features/test_default_headers_merge.py index 9984b85..bc8020c 100644 --- a/tests/langchain/features/test_default_headers_merge.py +++ b/tests/langchain/features/test_default_headers_merge.py @@ -35,7 +35,7 @@ def test_no_user_headers_preserves_class_defaults(self): with patch.dict(os.environ, LLMGW_ENV, clear=True): chat = UiPathChat(model="gpt-4o", settings=LLMGatewaySettings()) headers = chat.uipath_sync_client.headers - assert headers.get("x-uipath-llmgateway-timeoutseconds") == "295" + assert headers.get("x-uipath-llmgateway-timeoutseconds") == "895" assert headers.get("x-uipath-llmgateway-allowfull4xxresponse") == "false" def test_user_headers_do_not_remove_class_defaults(self): @@ -46,7 +46,7 @@ def test_user_headers_do_not_remove_class_defaults(self): default_headers={"x-my-custom": "value"}, ) headers = chat.uipath_sync_client.headers - assert headers.get("x-uipath-llmgateway-timeoutseconds") == "295" + assert headers.get("x-uipath-llmgateway-timeoutseconds") == "895" assert headers.get("x-uipath-llmgateway-allowfull4xxresponse") == "false" assert headers.get("x-my-custom") == "value" @@ -69,6 +69,6 @@ def test_async_client_also_merges(self): default_headers={"x-my-custom": "async-value"}, ) headers = chat.uipath_async_client.headers - assert headers.get("x-uipath-llmgateway-timeoutseconds") == "295" + assert headers.get("x-uipath-llmgateway-timeoutseconds") == "895" assert headers.get("x-uipath-llmgateway-allowfull4xxresponse") == "false" assert headers.get("x-my-custom") == "async-value"