Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/uipath/llm_client/utils/headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
6 changes: 3 additions & 3 deletions tests/langchain/features/test_default_headers_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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"

Expand All @@ -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"
Loading