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: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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

## [1.17.1] - 2026-07-17

### Added
- `ModelNotFoundError` — raised by `UiPathBaseSettings.get_model_info` when a model name is absent from the discovery API response. It subclasses both `ValueError` (so existing `except ValueError` handlers are unaffected) and `UiPathError` (so it is catchable across the UiPath LLM error taxonomy), and carries the new `UiPathLLMErrorCode.MODEL_NOT_FOUND` code. This lets callers distinguish a genuine discovery-miss from the other `ValueError`s the factory/settings code can raise (unsupported vendor, missing `agenthub_config`, invalid kwargs) instead of matching on message text.
- `UiPathLLMErrorCode.MODEL_NOT_FOUND` semantic error code.

## [1.17.0] - 2026-07-14

### Changed
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.17.1] - 2026-07-17

### Changed
- Picks up core `uipath-llm-client` 1.17.1, which adds `ModelNotFoundError` (raised by `get_model_info` on a discovery-miss) and the `UiPathLLMErrorCode.MODEL_NOT_FOUND` code. Bumped the `uipath-llm-client` floor to `>=1.17.1`.

## [1.17.0] - 2026-07-14

### Changed
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.15,<2.0.0",
"uipath-llm-client>=1.17.0,<2.0.0",
"uipath-llm-client>=1.17.1,<2.0.0",
]

[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.17.0"
__version__ = "1.17.1"
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.17.0"
__version__ = "1.17.1"
5 changes: 3 additions & 2 deletions src/uipath/llm_client/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from pydantic_settings import BaseSettings, SettingsConfigDict

from uipath.llm_client.settings.constants import ApiFlavor, ApiType, RoutingMode, VendorType
from uipath.llm_client.utils.exceptions import ModelNotFoundError


class UiPathAPIConfig(BaseModel):
Expand Down Expand Up @@ -204,7 +205,7 @@ def get_model_info(
The first matching model info dictionary.

Raises:
ValueError: If no matching model is found.
ModelNotFoundError: If no matching model is found.
"""
available_models = self.get_available_models()

Expand Down Expand Up @@ -239,7 +240,7 @@ def get_model_info(
]

if not matching_models:
raise ValueError(
raise ModelNotFoundError(
f"Model {model_name} not found. "
f"Available models are: {[m['modelName'] for m in available_models]}"
)
Expand Down
20 changes: 20 additions & 0 deletions src/uipath/llm_client/utils/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class UiPathLLMErrorCode(StrEnum):
"""

UNSUPPORTED_MIME_TYPE = "UNSUPPORTED_MIME_TYPE"
MODEL_NOT_FOUND = "MODEL_NOT_FOUND"


class UiPathError(Exception):
Expand Down Expand Up @@ -95,6 +96,24 @@ def __init__(
self.detail = detail


class ModelNotFoundError(UiPathError, ValueError):
"""Raised when a model name is absent from the discovery API response.

This is a client-side lookup failure — the model was never returned by the
discovery endpoint — and is therefore distinct from the HTTP-status
``UiPath*Error`` classes (e.g. :class:`UiPathNotFoundError`, which is an
actual HTTP 404 carrying a response).

Subclasses ``ValueError`` so existing ``except ValueError`` handlers keep
working, and :class:`UiPathError` so it is catchable alongside every other
UiPath LLM error and carries the stable
:attr:`UiPathLLMErrorCode.MODEL_NOT_FOUND` code.
"""

def __init__(self, detail: str | None = None) -> None:
UiPathError.__init__(self, detail, error_code=UiPathLLMErrorCode.MODEL_NOT_FOUND)


class UiPathAPIError(UiPathError, HTTPStatusError):
"""Base exception for all UiPath API errors.

Expand Down Expand Up @@ -466,6 +485,7 @@ def wrap_provider_errors() -> Iterator[None]:
__all__ = [
"UiPathError",
"UiPathLLMErrorCode",
"ModelNotFoundError",
"UiPathAPIError",
"UiPathBadRequestError",
"UiPathAuthenticationError",
Expand Down
Loading