Skip to content

Commit 9e04a37

Browse files
fix: increase default timeout
1 parent fe88cf5 commit 9e04a37

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -784,9 +784,9 @@ The logger will record:
784784

785785
All requests automatically include the following default headers:
786786

787-
| Header | Value | Description |
788-
|--------|-------|-------------|
789-
| `X-UiPath-LLMGateway-TimeoutSeconds` | `295` | Server-side timeout for LLM Gateway |
787+
| Header | Value | Description |
788+
|--------|--------|-------------|
789+
| `X-UiPath-LLMGateway-TimeoutSeconds` | `895` | Server-side timeout for LLM Gateway |
790790
| `X-UiPath-LLMGateway-AllowFull4xxResponse` | `true` | Returns full error response bodies for 4xx errors |
791791

792792
### Authentication Auto-Refresh

src/uipath/llm_client/utils/headers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from uipath.llm_client.settings.constants import ApiType, RoutingMode
88

99
UIPATH_DEFAULT_REQUEST_HEADERS: dict[str, str] = {
10-
"X-UiPath-LLMGateway-TimeoutSeconds": "295", # server side timeout, default is 10, maximum is 300
10+
"X-UiPath-LLMGateway-TimeoutSeconds": "895", # server side timeout
1111
"X-UiPath-LLMGateway-AllowFull4xxResponse": "false", # allow full 4xx responses (default is false) — kept false to avoid PII leakage in logs
1212
}
1313

tests/langchain/features/test_default_headers_merge.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_no_user_headers_preserves_class_defaults(self):
3535
with patch.dict(os.environ, LLMGW_ENV, clear=True):
3636
chat = UiPathChat(model="gpt-4o", settings=LLMGatewaySettings())
3737
headers = chat.uipath_sync_client.headers
38-
assert headers.get("x-uipath-llmgateway-timeoutseconds") == "295"
38+
assert headers.get("x-uipath-llmgateway-timeoutseconds") == "895"
3939
assert headers.get("x-uipath-llmgateway-allowfull4xxresponse") == "false"
4040

4141
def test_user_headers_do_not_remove_class_defaults(self):
@@ -46,7 +46,7 @@ def test_user_headers_do_not_remove_class_defaults(self):
4646
default_headers={"x-my-custom": "value"},
4747
)
4848
headers = chat.uipath_sync_client.headers
49-
assert headers.get("x-uipath-llmgateway-timeoutseconds") == "295"
49+
assert headers.get("x-uipath-llmgateway-timeoutseconds") == "895"
5050
assert headers.get("x-uipath-llmgateway-allowfull4xxresponse") == "false"
5151
assert headers.get("x-my-custom") == "value"
5252

@@ -69,6 +69,6 @@ def test_async_client_also_merges(self):
6969
default_headers={"x-my-custom": "async-value"},
7070
)
7171
headers = chat.uipath_async_client.headers
72-
assert headers.get("x-uipath-llmgateway-timeoutseconds") == "295"
72+
assert headers.get("x-uipath-llmgateway-timeoutseconds") == "895"
7373
assert headers.get("x-uipath-llmgateway-allowfull4xxresponse") == "false"
7474
assert headers.get("x-my-custom") == "async-value"

0 commit comments

Comments
 (0)