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.7] - 2026-03-23

### Fix
- Added mapping api_flavor to vendor_type

## [1.5.6] - 2026-03-21

### Feature
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.7] - 2026-03-23

### Fix
- Fix factory for BYO to handle the case where vendor_type is None, but api_flavor is discovered

## [1.5.6] - 2026-03-21

### Feature
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.6",
"uipath-llm-client>=1.5.7",
]

[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.6"
__version__ = "1.5.7"
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
UiPathBaseEmbeddings,
)
from uipath_langchain_client.settings import (
_API_FLAVOR_TO_VENDOR_TYPE,
ApiFlavor,
RoutingMode,
UiPathBaseSettings,
Expand Down Expand Up @@ -139,8 +140,15 @@ def get_chat_model(
**model_kwargs,
)

discovered_vendor = model_info["vendor"].lower()
match discovered_vendor:
discovered_vendor_type = model_info.get("vendor", None)
discovered_api_flavor = model_info.get("apiFlavor", None)
if discovered_vendor_type is None and discovered_api_flavor is not None:
discovered_vendor_type = _API_FLAVOR_TO_VENDOR_TYPE.get(discovered_api_flavor, None)
if discovered_vendor_type is None:
raise ValueError("No vendor type or api flavor found in model info")
discovered_vendor_type = discovered_vendor_type.lower()

match discovered_vendor_type:
case VendorType.OPENAI:
if api_flavor == ApiFlavor.RESPONSES:
model_kwargs["use_responses_api"] = True
Expand Down Expand Up @@ -176,7 +184,7 @@ def get_chat_model(
return UiPathChatAnthropic(
model=model_name,
settings=client_settings,
vendor_type=discovered_vendor,
vendor_type=discovered_vendor_type,
byo_connection_id=byo_connection_id,
**model_kwargs,
)
Expand Down Expand Up @@ -229,7 +237,7 @@ def get_chat_model(

case _:
raise ValueError(
f"Invalid vendor type: {discovered_vendor}, we don't currently have clients that support this vendor"
f"Invalid vendor type: {discovered_vendor_type}, we don't currently have clients that support this vendor"
)


Expand Down Expand Up @@ -290,8 +298,8 @@ def get_embedding_model(
**model_kwargs,
)

discovered_vendor = model_info["vendor"].lower()
match discovered_vendor:
discovered_vendor_type = model_info["vendor"].lower()
match discovered_vendor_type:
case VendorType.OPENAI:
if is_uipath_owned:
from uipath_langchain_client.clients.openai.embeddings import (
Expand Down Expand Up @@ -340,5 +348,5 @@ def get_embedding_model(
)
case _:
raise ValueError(
f"Invalid vendor type: {discovered_vendor}, we don't currently have clients that support this vendor"
f"Invalid vendor type: {discovered_vendor_type}, we don't currently have clients that support this vendor"
)
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@
UiPathBaseSettings,
get_default_client_settings,
)
from uipath.llm_client.settings.constants import ApiFlavor, ApiType, RoutingMode, VendorType
from uipath.llm_client.settings.constants import (
_API_FLAVOR_TO_VENDOR_TYPE,
ApiFlavor,
ApiType,
RoutingMode,
VendorType,
)

__all__ = [
"get_default_client_settings",
Expand All @@ -34,4 +40,5 @@
"RoutingMode",
"ApiFlavor",
"VendorType",
"_API_FLAVOR_TO_VENDOR_TYPE",
]
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.6"
__version__ = "1.5.7"
10 changes: 10 additions & 0 deletions src/uipath/llm_client/settings/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,13 @@ class ApiFlavor(StrEnum):
CONVERSE = "converse"
INVOKE = "invoke"
ANTHROPIC_CLAUDE = "anthropic-claude"


_API_FLAVOR_TO_VENDOR_TYPE: dict[ApiFlavor, VendorType] = {
ApiFlavor.CHAT_COMPLETIONS: VendorType.OPENAI,
ApiFlavor.RESPONSES: VendorType.OPENAI,
ApiFlavor.GENERATE_CONTENT: VendorType.VERTEXAI,
ApiFlavor.ANTHROPIC_CLAUDE: VendorType.VERTEXAI,
ApiFlavor.CONVERSE: VendorType.AWSBEDROCK,
ApiFlavor.INVOKE: VendorType.AWSBEDROCK,
}