Skip to content

Commit a02b867

Browse files
authored
Fixed retries on all clients (#8)
1 parent 6733982 commit a02b867

12 files changed

Lines changed: 49 additions & 29 deletions

File tree

CHANGELOG.md

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

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

5+
## [1.0.4] - 2026-02-03
6+
7+
### Bug Fix
8+
- Adjusted retry logic, now 0 means no retries, 1 means one retry
9+
510
## [1.0.3] - 2026-02-02
611

712
### Refactor

packages/uipath_langchain_client/CHANGELOG.md

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

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

5+
## [1.0.5] - 2026-02-03
6+
7+
### Bug Fix
8+
- Fixed retry logic on all clients
9+
510
## [1.0.4] - 2026-02-03
611

712
### Bug Fix

packages/uipath_langchain_client/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ readme = "README.md"
66
requires-python = ">=3.11"
77
dependencies = [
88
"langchain>=1.2.7",
9-
"uipath-llm-client>=1.0.3",
9+
"uipath-llm-client>=1.0.4",
1010
]
1111

1212
[project.optional-dependencies]
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.0.4"
3+
__version__ = "1.0.5"

packages/uipath_langchain_client/src/uipath_langchain_client/base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class UiPathBaseLLMClient(BaseModel):
101101
description="Client-side request timeout in seconds",
102102
)
103103
max_retries: int = Field(
104-
default=1,
104+
default=0,
105105
description="Maximum number of retries for failed requests",
106106
)
107107
retry_config: RetryConfig | None = Field(

packages/uipath_langchain_client/src/uipath_langchain_client/clients/anthropic/chat_models.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _anthropic_client(
6262
api_key="PLACEHOLDER",
6363
base_url=str(self.uipath_sync_client.base_url),
6464
default_headers=dict(self.uipath_sync_client.headers),
65-
max_retries=1, # handled by the UiPathBaseLLMClient
65+
max_retries=0, # handled by the UiPathBaseLLMClient
6666
timeout=None, # handled by the UiPathBaseLLMClient
6767
http_client=self.uipath_sync_client,
6868
)
@@ -74,7 +74,7 @@ def _anthropic_client(
7474
base_url=str(self.uipath_sync_client.base_url),
7575
default_headers=dict(self.uipath_sync_client.headers),
7676
timeout=None, # handled by the UiPathBaseLLMClient
77-
max_retries=1, # handled by the UiPathBaseLLMClient
77+
max_retries=0, # handled by the UiPathBaseLLMClient
7878
http_client=self.uipath_sync_client,
7979
)
8080
case "awsbedrock":
@@ -85,7 +85,7 @@ def _anthropic_client(
8585
base_url=str(self.uipath_sync_client.base_url),
8686
default_headers=dict(self.uipath_sync_client.headers),
8787
timeout=None, # handled by the UiPathBaseLLMClient
88-
max_retries=1, # handled by the UiPathBaseLLMClient
88+
max_retries=0, # handled by the UiPathBaseLLMClient
8989
http_client=self.uipath_sync_client,
9090
)
9191
case "anthropic":
@@ -94,7 +94,7 @@ def _anthropic_client(
9494
base_url=str(self.uipath_sync_client.base_url),
9595
default_headers=dict(self.uipath_sync_client.headers),
9696
timeout=None, # handled by the UiPathBaseLLMClient
97-
max_retries=1, # handled by the UiPathBaseLLMClient
97+
max_retries=0, # handled by the UiPathBaseLLMClient
9898
http_client=self.uipath_sync_client,
9999
)
100100

@@ -108,7 +108,7 @@ def _async_anthropic_client(
108108
api_key="PLACEHOLDER",
109109
base_url=str(self.uipath_async_client.base_url),
110110
default_headers=dict(self.uipath_async_client.headers),
111-
max_retries=1, # handled by the UiPathBaseLLMClient
111+
max_retries=0, # handled by the UiPathBaseLLMClient
112112
timeout=None, # handled by the UiPathBaseLLMClient
113113
http_client=self.uipath_async_client,
114114
)
@@ -120,7 +120,7 @@ def _async_anthropic_client(
120120
base_url=str(self.uipath_async_client.base_url),
121121
default_headers=dict(self.uipath_async_client.headers),
122122
timeout=None, # handled by the UiPathBaseLLMClient
123-
max_retries=1, # handled by the UiPathBaseLLMClient
123+
max_retries=0, # handled by the UiPathBaseLLMClient
124124
http_client=self.uipath_async_client,
125125
)
126126
case "awsbedrock":
@@ -131,7 +131,7 @@ def _async_anthropic_client(
131131
base_url=str(self.uipath_async_client.base_url),
132132
default_headers=dict(self.uipath_async_client.headers),
133133
timeout=None, # handled by the UiPathBaseLLMClient
134-
max_retries=1, # handled by the UiPathBaseLLMClient
134+
max_retries=0, # handled by the UiPathBaseLLMClient
135135
http_client=self.uipath_async_client,
136136
)
137137
case _:
@@ -140,7 +140,7 @@ def _async_anthropic_client(
140140
base_url=str(self.uipath_async_client.base_url),
141141
default_headers=dict(self.uipath_async_client.headers),
142142
timeout=None, # handled by the UiPathBaseLLMClient
143-
max_retries=1, # handled by the UiPathBaseLLMClient
143+
max_retries=0, # handled by the UiPathBaseLLMClient
144144
http_client=self.uipath_async_client,
145145
)
146146

packages/uipath_langchain_client/src/uipath_langchain_client/clients/vertexai/chat_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def setup_uipath_client(self) -> Self:
3636
base_url=str(self.uipath_sync_client.base_url),
3737
default_headers=self.uipath_sync_client.headers,
3838
timeout=None, # handled by the UiPath client
39-
max_retries=1, # handled by the UiPath client
39+
max_retries=0, # handled by the UiPath client
4040
http_client=self.uipath_sync_client,
4141
)
4242
self.async_client = AsyncAnthropicVertex(
@@ -46,7 +46,7 @@ def setup_uipath_client(self) -> Self:
4646
base_url=str(self.uipath_async_client.base_url),
4747
default_headers=self.uipath_async_client.headers,
4848
timeout=None, # handled by the UiPath client
49-
max_retries=1, # handled by the UiPath client
49+
max_retries=0, # handled by the UiPath client
5050
http_client=self.uipath_async_client,
5151
)
5252
return self
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__titile__ = "UiPath LLM Client"
22
__description__ = "A Python client for interacting with UiPath's LLM services."
3-
__version__ = "1.0.3"
3+
__version__ = "1.0.4"

src/uipath_llm_client/clients/openai/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(
5151
super().__init__(
5252
api_key="PLACEHOLDER",
5353
timeout=None,
54-
max_retries=1,
54+
max_retries=0,
5555
http_client=httpx_client,
5656
)
5757

@@ -91,7 +91,7 @@ def __init__(
9191
super().__init__(
9292
api_key="PLACEHOLDER",
9393
timeout=None,
94-
max_retries=1,
94+
max_retries=0,
9595
http_client=httpx_client,
9696
)
9797

@@ -133,7 +133,7 @@ def __init__(
133133
api_version="PLACEHOLDER",
134134
api_key="PLACEHOLDER",
135135
timeout=None,
136-
max_retries=1,
136+
max_retries=0,
137137
http_client=httpx_client,
138138
)
139139

@@ -175,6 +175,6 @@ def __init__(
175175
api_version="PLACEHOLDER",
176176
api_key="PLACEHOLDER",
177177
timeout=None,
178-
max_retries=1,
178+
max_retries=0,
179179
http_client=httpx_client,
180180
)

src/uipath_llm_client/httpx_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def __init__(
152152
# Setup retry transport if not provided
153153
if transport is None:
154154
transport = RetryableHTTPTransport(
155-
max_retries=max_retries or 1,
155+
max_retries=max_retries or 0,
156156
retry_config=retry_config,
157157
logger=logger,
158158
)
@@ -272,7 +272,7 @@ def __init__(
272272
# Setup retry transport if not provided
273273
if transport is None:
274274
transport = RetryableAsyncHTTPTransport(
275-
max_retries=max_retries or 1,
275+
max_retries=max_retries or 0,
276276
retry_config=retry_config,
277277
logger=logger,
278278
)

0 commit comments

Comments
 (0)