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
15 changes: 13 additions & 2 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,23 @@ Follow the existing format — newest version first, grouped by date:

---

## Pre-commit / Pre-PR Checklist

Before every commit and before opening a PR, always run:

```bash
ruff check && ruff format --check && pytest tests
```

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.

---

## PR Guidelines

### Before Opening a PR

- Run `ruff check`, `ruff format --check`, and `pyright` — all must pass.
- Run `pytest tests` — all tests must pass.
- Run the pre-commit checklist above — all must pass.
- Apply versioning rules above: the CI workflow (`ci_change_version.yml`) enforces that any changed source files must have a corresponding version bump and changelog entry.

### PR Scope
Expand Down
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.9] - 2026-03-26

### Fix
- Use `availableOperationCodes` field (instead of `operationCodes`) when validating BYOM operation codes

## [1.5.8] - 2026-03-26

### 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.9] - 2026-03-26

### Fix
- Remove `fix_host_header` event hooks from `UiPathChatOpenAI`; host header management is handled by the underlying httpx client

## [1.5.8] - 2026-03-26

### 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.13",
"uipath-llm-client>=1.5.8",
"uipath-llm-client>=1.5.9",
]

[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.8"
__version__ = "1.5.9"
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.8"
__version__ = "1.5.9"
2 changes: 1 addition & 1 deletion src/uipath/llm_client/settings/llmgateway/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def get_available_models(self) -> list[dict[str, Any]]:
@override
def validate_byo_model(self, model_info: dict[str, Any]) -> None:
byom_details = model_info.get("byomDetails", {})
operation_codes = byom_details.get("operationCodes", [])
operation_codes = byom_details.get("availableOperationCodes", [])
if self.operation_code and self.operation_code not in operation_codes:
raise ValueError(
f"The operation code {self.operation_code} is not allowed for the model {model_info['modelName']}"
Expand Down
10 changes: 5 additions & 5 deletions tests/core/test_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,7 @@ def test_valid_operation_code(self, llmgw_env_vars):
settings.operation_code = "code1"
model_info = {
"modelName": "custom-model",
"byomDetails": {"operationCodes": ["code1", "code2"]},
"byomDetails": {"availableOperationCodes": ["code1", "code2"]},
}
settings.validate_byo_model(model_info) # Should not raise

Expand All @@ -1943,7 +1943,7 @@ def test_invalid_operation_code_raises(self, llmgw_env_vars):
settings.operation_code = "invalid-code"
model_info = {
"modelName": "custom-model",
"byomDetails": {"operationCodes": ["code1", "code2"]},
"byomDetails": {"availableOperationCodes": ["code1", "code2"]},
}
with pytest.raises(ValueError, match="operation code"):
settings.validate_byo_model(model_info)
Expand All @@ -1954,7 +1954,7 @@ def test_auto_picks_first_operation_code(self, llmgw_env_vars):
settings.operation_code = None
model_info = {
"modelName": "custom-model",
"byomDetails": {"operationCodes": ["auto-code"]},
"byomDetails": {"availableOperationCodes": ["auto-code"]},
}
settings.validate_byo_model(model_info)
assert settings.operation_code == "auto-code"
Expand All @@ -1965,7 +1965,7 @@ def test_auto_picks_first_with_warning_for_multiple(self, llmgw_env_vars):
settings.operation_code = None
model_info = {
"modelName": "custom-model",
"byomDetails": {"operationCodes": ["code1", "code2"]},
"byomDetails": {"availableOperationCodes": ["code1", "code2"]},
}
with patch("uipath.llm_client.settings.llmgateway.settings.logging") as mock_logging:
settings.validate_byo_model(model_info)
Expand All @@ -1978,7 +1978,7 @@ def test_no_operation_codes_no_change(self, llmgw_env_vars):
settings.operation_code = None
model_info = {
"modelName": "custom-model",
"byomDetails": {"operationCodes": []},
"byomDetails": {"availableOperationCodes": []},
}
settings.validate_byo_model(model_info)
assert settings.operation_code is None
Expand Down