Skip to content

Commit 297e4ae

Browse files
cosminachoclaude
andauthored
fix: remove X-UiPath-LLMGateway-AllowFull4xxResponse from default hea… (#51)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4dcdccf commit 297e4ae

9 files changed

Lines changed: 19 additions & 9 deletions

File tree

.claude/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Before every commit and before opening a PR, always run:
103103
ruff check && ruff format --check && pytest tests
104104
```
105105

106-
All three must pass. Fix any lint, format, or test failures before committing. This applies when working as an AI assistant too — run the checks, fix failures, then commit.
106+
All three must pass. Fix any lint, format, or test failures before committing. This applies when working as an AI assistant too — run the checks, fix failures, then commit and push.
107107

108108
---
109109

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to `uipath_llm_client` (core package) will be documented in this file.
44

5+
## [1.5.10] - 2026-03-26
6+
7+
### Changed
8+
- Removed `X-UiPath-LLMGateway-AllowFull4xxResponse` from default request headers to avoid PII leakage in logs
9+
510
## [1.5.9] - 2026-03-26
611

712
### Fix

packages/uipath_langchain_client/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to `uipath_langchain_client` will be documented in this file.
44

5+
## [1.5.10] - 2026-03-26
6+
7+
### Changed
8+
- Removed `X-UiPath-LLMGateway-AllowFull4xxResponse` from default request headers to avoid PII leakage in logs
9+
510
## [1.5.9] - 2026-03-26
611

712
### Fix

packages/uipath_langchain_client/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ readme = "README.md"
66
requires-python = ">=3.11"
77
dependencies = [
88
"langchain>=1.2.13",
9-
"uipath-llm-client>=1.5.9",
9+
"uipath-llm-client>=1.5.10",
1010
]
1111

1212
[project.optional-dependencies]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__title__ = "UiPath LangChain Client"
22
__description__ = "A Python client for interacting with UiPath's LLM services via LangChain."
3-
__version__ = "1.5.9"
3+
__version__ = "1.5.10"

packages/uipath_langchain_client/src/uipath_langchain_client/base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class UiPathBaseLLMClient(BaseModel, ABC):
108108
default_headers: Mapping[str, str] | None = Field(
109109
default_factory=lambda: {
110110
"X-UiPath-LLMGateway-TimeoutSeconds": "295", # server side timeout, default is 10, maximum is 300
111-
"X-UiPath-LLMGateway-AllowFull4xxResponse": "true", # allow full 4xx responses (default is false)
111+
# "X-UiPath-LLMGateway-AllowFull4xxResponse": "true", # allow full 4xx responses (default is false) — removed from default to avoid PII leakage in logs
112112
},
113113
description="Default request headers to include in requests",
114114
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__title__ = "UiPath LLM Client"
22
__description__ = "A Python client for interacting with UiPath's LLM services."
3-
__version__ = "1.5.9"
3+
__version__ = "1.5.10"

src/uipath/llm_client/httpx_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class UiPathHttpxClient(Client):
7474
_streaming_header: str = "X-UiPath-Streaming-Enabled"
7575
_default_headers: Mapping[str, str] = {
7676
"X-UiPath-LLMGateway-TimeoutSeconds": "295", # server side timeout, default is 10, maximum is 300
77-
"X-UiPath-LLMGateway-AllowFull4xxResponse": "true", # allow full 4xx responses (default is false)
77+
# "X-UiPath-LLMGateway-AllowFull4xxResponse": "true", # allow full 4xx responses (default is false) — removed from default to avoid PII leakage in logs
7878
}
7979

8080
def __init__(
@@ -207,7 +207,7 @@ class UiPathHttpxAsyncClient(AsyncClient):
207207
_streaming_header: str = "X-UiPath-Streaming-Enabled"
208208
_default_headers: Mapping[str, str] = {
209209
"X-UiPath-LLMGateway-TimeoutSeconds": "295", # server side timeout, default is 10, maximum is 300
210-
"X-UiPath-LLMGateway-AllowFull4xxResponse": "true", # allow full 4xx responses (default is false)
210+
# "X-UiPath-LLMGateway-AllowFull4xxResponse": "true", # allow full 4xx responses (default is false) — removed from default to avoid PII leakage in logs
211211
}
212212

213213
def __init__(

tests/core/test_base_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ def test_client_has_default_headers(self):
886886

887887
client = UiPathHttpxClient(base_url="https://example.com")
888888
assert "X-UiPath-LLMGateway-TimeoutSeconds" in client.headers
889-
assert "X-UiPath-LLMGateway-AllowFull4xxResponse" in client.headers
889+
assert "X-UiPath-LLMGateway-AllowFull4xxResponse" not in client.headers
890890
client.close()
891891

892892
def test_client_merges_custom_headers(self):
@@ -970,7 +970,7 @@ def test_async_client_has_default_headers(self):
970970

971971
client = UiPathHttpxAsyncClient(base_url="https://example.com")
972972
assert "X-UiPath-LLMGateway-TimeoutSeconds" in client.headers
973-
assert "X-UiPath-LLMGateway-AllowFull4xxResponse" in client.headers
973+
assert "X-UiPath-LLMGateway-AllowFull4xxResponse" not in client.headers
974974

975975
def test_async_client_with_retry_config(self):
976976
"""Test async client creates retryable async transport."""

0 commit comments

Comments
 (0)