Skip to content

Commit 833bf6d

Browse files
authored
Feat: LiteLLM integration (#58)
1 parent 7afcc72 commit 833bf6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+4403
-1077
lines changed

CHANGELOG.md

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

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

5+
## [1.8.0] - 2026-04-08
6+
7+
### Added
8+
- `UiPathLiteLLM` — provider-agnostic LLM client powered by LiteLLM
9+
- `completion` / `acompletion` for chat completions across all providers
10+
- `embedding` / `aembedding` for embeddings
11+
- Automatic model discovery from the UiPath backend — detects vendor, api_flavor, and model family
12+
- Optional `vendor_type` and `api_flavor` overrides (same pattern as LangChain factory)
13+
- Supports OpenAI (chat-completions + responses API), Gemini, Bedrock (invoke + converse), and Vertex AI Claude
14+
- All HTTP routed through UiPath httpx transport (auth, retry, headers) — no direct calls to Google/AWS/OpenAI
15+
- Explicit completion parameters with full IDE autocomplete
16+
- `litellm` as an optional dependency (`uv add uipath-llm-client[litellm]`)
17+
- `_strict_response_validation` parameter to all Anthropic client classes
18+
19+
### Changed
20+
- Updated dependency versions: `uipath-platform>=0.1.21`, `anthropic>=0.91.0`, `litellm>=1.83.4`
21+
522
## [1.7.0] - 2026-04-03
623

724
### Added

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# UiPath LLM Client
22

3-
A Python client for interacting with UiPath's LLM services. This package provides both a low-level HTTP client and framework-specific integrations (LangChain, LlamaIndex) for accessing LLMs through UiPath's infrastructure.
3+
A Python client for interacting with UiPath's LLM services. This package provides both a low-level HTTP client and a LangChain integration for accessing LLMs through UiPath's infrastructure.
44

55
## Architecture Overview
66

77
This repository is organized as a monorepo with the following packages:
88

99
- **`uipath_llm_client`** (root): Core HTTP client with authentication, retry logic, and request handling
1010
- **`uipath_langchain_client`** (packages/): LangChain-compatible chat models and embeddings
11-
- **`uipath_llamaindex_client`** (packages/): LlamaIndex-compatible integrations
1211

1312
### Supported Backends
1413

@@ -816,7 +815,7 @@ uv run pyright
816815

817816
### Testing
818817

819-
Tests use [VCR.py](https://vcrpy.readthedocs.io/) to record and replay HTTP interactions. Cassettes (recorded responses) are stored in `tests/cassettes/` using Git LFS.
818+
Tests use [VCR.py](https://vcrpy.readthedocs.io/) to record and replay HTTP interactions. Cassettes (recorded responses) are stored in `tests/cassettes.db` (SQLite) via `pytest-recording`.
820819

821820
**Important:** Tests must pass locally before submitting a PR. The CI pipeline does not make any real API requests—it only runs tests using the pre-recorded cassettes.
822821

@@ -855,7 +854,9 @@ uipath-llm-client/
855854
│ ├── clients/ # Native SDK wrappers
856855
│ │ ├── openai/ # UiPathOpenAI, UiPathAzureOpenAI, etc.
857856
│ │ ├── anthropic/ # UiPathAnthropic, UiPathAnthropicBedrock, etc.
858-
│ │ └── google/ # UiPathGoogle
857+
│ │ ├── google/ # UiPathGoogle
858+
│ │ ├── normalized/ # UiPathNormalizedClient (provider-agnostic)
859+
│ │ └── litellm/ # UiPathLiteLLM (via LiteLLM)
859860
│ ├── settings/ # Backend-specific settings & auth
860861
│ │ ├── base.py # UiPathBaseSettings, UiPathAPIConfig
861862
│ │ ├── platform/ # PlatformSettings, PlatformAuth
@@ -878,9 +879,9 @@ uipath-llm-client/
878879
│ │ ├── vertexai/ # UiPathChatAnthropicVertex
879880
│ │ ├── bedrock/ # UiPathChatBedrock, UiPathChatBedrockConverse
880881
│ │ ├── fireworks/ # UiPathChatFireworks, UiPathFireworksEmbeddings
882+
│ │ ├── litellm/ # UiPathChatLiteLLM, UiPathLiteLLMEmbeddings
881883
│ │ └── azure/ # UiPathAzureAIChatCompletionsModel
882-
│ └── uipath_llamaindex_client/ # LlamaIndex integration (planned)
883-
└── tests/ # Test suite with VCR cassettes
884+
└── tests/ # Test suite with VCR cassettes (SQLite)
884885
```
885886

886887
## License

packages/uipath_langchain_client/CHANGELOG.md

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

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

5+
## [1.8.0] - 2026-04-08
6+
7+
### Added
8+
- `UiPathChatLiteLLM` — LangChain chat model powered by LiteLLM, supporting all UiPath gateway providers
9+
- `langchain-litellm` as an optional dependency for LiteLLM integration
10+
11+
### Changed
12+
- Updated dependency versions: `anthropic[bedrock,vertex]>=0.91.0`
13+
- Version bump to match core package 1.8.0
14+
515
## [1.7.1] - 2026-04-04
616

717
### Added

packages/uipath_langchain_client/pyproject.toml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,38 @@ dynamic = ["version"]
55
readme = "README.md"
66
requires-python = ">=3.11"
77
dependencies = [
8-
"langchain>=1.2.13",
9-
"uipath-llm-client>=1.7.0",
8+
"langchain>=1.2.15",
9+
"uipath-llm-client>=1.8.0",
1010
]
1111

1212
[project.optional-dependencies]
1313
openai = [
14-
"langchain-openai>=1.1.11",
14+
"langchain-openai>=1.1.12",
1515
]
1616
google = [
1717
"langchain-google-genai>=4.2.1",
1818
]
1919
anthropic = [
2020
"langchain-anthropic>=1.4.0",
21-
"anthropic[bedrock,vertex]>=0.86.0",
21+
"anthropic[bedrock,vertex]>=0.91.0",
2222
]
2323
aws = [
24-
"langchain-aws[anthropic]>=1.4.1",
24+
"langchain-aws[anthropic]>=1.4.3",
2525
]
2626
vertexai = [
2727
"langchain-google-vertexai>=3.2.2",
2828
]
2929
azure = [
30-
"langchain-azure-ai>=1.1.1",
30+
"langchain-azure-ai>=1.2.1",
3131
]
3232
fireworks = [
3333
"langchain-fireworks>=1.1.0",
3434
]
35+
litellm = [
36+
"langchain-litellm>=0.6.4",
37+
]
3538
all = [
36-
"uipath-langchain-client[openai,aws,google,anthropic,azure,vertexai,fireworks]"
39+
"uipath-langchain-client[openai,aws,google,anthropic,azure,vertexai,fireworks,litellm]"
3740
]
3841

3942
[build-system]
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.7.1"
3+
__version__ = "1.8.0"

packages/uipath_langchain_client/src/uipath_langchain_client/clients/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""LangChain-compatible LLM client wrappers for UiPath providers."""
2+
13
from uipath_langchain_client.clients.normalized import UiPathChat, UiPathEmbeddings
24

35
__all__ = [
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
"""LangChain chat model for Anthropic Claude via UiPath.
2+
3+
Requires the ``anthropic`` optional extra::
4+
5+
uv add uipath-langchain-client[anthropic]
6+
"""
7+
18
from uipath_langchain_client.clients.anthropic.chat_models import UiPathChatAnthropic
29

310
__all__ = ["UiPathChatAnthropic"]

packages/uipath_langchain_client/src/uipath_langchain_client/clients/azure/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
"""LangChain chat models and embeddings for Azure AI via UiPath.
2+
3+
Requires the ``azure`` optional extra::
4+
5+
uv add uipath-langchain-client[azure]
6+
"""
7+
18
from uipath_langchain_client.clients.azure.chat_models import UiPathAzureAIChatCompletionsModel
29
from uipath_langchain_client.clients.azure.embeddings import UiPathAzureAIEmbeddingsModel
310

packages/uipath_langchain_client/src/uipath_langchain_client/clients/bedrock/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
"""LangChain chat models and embeddings for AWS Bedrock via UiPath.
2+
3+
Requires the ``aws`` optional extra::
4+
5+
uv add uipath-langchain-client[aws]
6+
"""
7+
18
from uipath_langchain_client.clients.bedrock.chat_models import (
29
UiPathChatAnthropicBedrock,
310
UiPathChatBedrock,

packages/uipath_langchain_client/src/uipath_langchain_client/clients/fireworks/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
"""LangChain chat models and embeddings for Fireworks AI via UiPath.
2+
3+
Requires the ``fireworks`` optional extra::
4+
5+
uv add uipath-langchain-client[fireworks]
6+
"""
7+
18
from uipath_langchain_client.clients.fireworks.chat_models import UiPathChatFireworks
29
from uipath_langchain_client.clients.fireworks.embeddings import UiPathFireworksEmbeddings
310

0 commit comments

Comments
 (0)