Skip to content
Merged
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

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

## [1.5.5] - 2026-03-19

### Fix
- Fix headers for Platform Settings

## [1.5.3] - 2026-03-18

### Fix
Expand Down
5 changes: 5 additions & 0 deletions packages/uipath_langchain_client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

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

## [1.5.5] - 2026-03-19

### Fix headers
- Fix headers

## [1.5.4] - 2026-03-19

### Fix
Expand Down
2 changes: 1 addition & 1 deletion packages/uipath_langchain_client/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"langchain>=1.2.12",
"uipath-llm-client>=1.5.3",
"uipath-llm-client>=1.5.5",
]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__title__ = "UiPath LangChain Client"
__description__ = "A Python client for interacting with UiPath's LLM services via LangChain."
__version__ = "1.5.4"
__version__ = "1.5.5"
2 changes: 1 addition & 1 deletion src/uipath/llm_client/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__title__ = "UiPath LLM Client"
__description__ = "A Python client for interacting with UiPath's LLM services."
__version__ = "1.5.3"
__version__ = "1.5.5"
10 changes: 10 additions & 0 deletions src/uipath/llm_client/settings/platform/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ class PlatformBaseSettings(UiPathBaseSettings):

# Tracing configuration
process_key: str | None = Field(default=None, validation_alias="UIPATH_PROCESS_KEY")
folder_key: str | None = Field(default=None, validation_alias="UIPATH_FOLDER_KEY")
job_key: str | None = Field(default=None, validation_alias="UIPATH_JOB_KEY")
trace_id: str | None = Field(default=None, validation_alias="UIPATH_TRACE_ID")

@model_validator(mode="after")
def validate_environment(self) -> Self:
Expand Down Expand Up @@ -128,12 +130,20 @@ def build_auth_headers(
) -> Mapping[str, str]:
"""Build authentication and routing headers for API requests."""
headers: dict[str, str] = {}
if self.organization_id:
headers["X-UiPath-Internal-AccountId"] = self.organization_id
if self.tenant_id:
headers["X-UiPath-Internal-TenantId"] = self.tenant_id
if self.agenthub_config:
headers["X-UiPath-AgentHub-Config"] = self.agenthub_config
if self.process_key:
headers["X-UiPath-ProcessKey"] = self.process_key
if self.folder_key:
headers["X-UiPath-FolderKey"] = self.folder_key
if self.job_key:
headers["X-UiPath-JobKey"] = self.job_key
if self.trace_id:
headers["X-UiPath-TraceId"] = self.trace_id
return headers

@override
Expand Down
8 changes: 7 additions & 1 deletion tests/core/test_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,11 @@ def test_build_auth_headers_has_default_config(self, platform_env_vars, mock_pla
with patch.dict(os.environ, platform_env_vars, clear=True):
settings = PlatformSettings()
headers = settings.build_auth_headers()
assert headers == {"X-UiPath-AgentHub-Config": "agentsruntime"}
assert headers == {
"X-UiPath-Internal-AccountId": "test-org-id",
"X-UiPath-Internal-TenantId": "test-tenant-id",
"X-UiPath-AgentHub-Config": "agentsruntime",
}

def test_build_auth_headers_with_tracing(self, platform_env_vars, mock_platform_auth):
"""Test build_auth_headers includes tracing headers when set."""
Expand Down Expand Up @@ -655,6 +659,8 @@ def test_build_auth_headers_empty_when_no_optional(self, platform_env_vars, mock
settings.agenthub_config = ""
settings.process_key = None
settings.job_key = None
settings.organization_id = None
settings.tenant_id = None
headers = settings.build_auth_headers()
assert headers == {}

Expand Down