feat(retry): restore legacy uipath-langchain-python chat-client retry parity#107
Merged
Conversation
vldcmp-uipath
requested review from
DragosBobolea,
cosminacho,
cristipufu,
dragosvelcea,
ionmincu,
ionut-mihalache-uipath and
radu-mocanu
as code owners
July 14, 2026 14:06
vldcmp-uipath
temporarily deployed
to
LLMGW_SETTINGS
July 14, 2026 14:07 — with
GitHub Actions
Inactive
…orts The RetryableHTTPTransport defaults were materially weaker than the legacy uipath-langchain-python chat-client retryers (BedrockRetryer) they replaced: 3 attempts / ~6s absorption window vs 5 attempts / ~75s, Retry-After honored only on 429, no 524, no connection-error retries. Throttling episodes the legacy client absorbed silently now surface as run failures - on the Bedrock path (pre-uipath-langchain-client 1.14.1) as the misleading "No 'output' key found in the response from the Bedrock Converse API" error. uipath-llm-client 1.17.0: - Default budget: 5 attempts, backoff 5s initial / 120s cap (~5/10/20/40s) - Retry-After / x-retry-after honored on any error status: caps the wait for every UiPathAPIError and forces a retry even on otherwise non-retryable statuses (explicit server retry request); retry_after moved from UiPathRateLimitError up to UiPathAPIError - HTTP 524 retryable again via new UiPathOriginTimeoutError; 529 kept - httpx ConnectError / ConnectTimeout / ReadTimeout retried (botocore equivalents were retried by the legacy retryer) uipath-langchain-client 1.17.0: - UiPathBaseLLMClient.max_retries default 3 -> 5; requires uipath-llm-client>=1.17.0 Note: uipath-langchain's chat_model_factory still passes max_retries=3 explicitly on the new-clients path; a companion bump there is needed for agent runs to get the full 5-attempt budget. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
vldcmp-uipath
force-pushed
the
feat/retry-parity-legacy-client
branch
from
July 14, 2026 14:56
53a9d4e to
466e5b2
Compare
vldcmp-uipath
temporarily deployed
to
LLMGW_SETTINGS
July 14, 2026 14:57 — with
GitHub Actions
Inactive
Clarified the retry behavior and budget for the BedrockRetryer, including changes to retry attempts, backoff timings, and error handling. Signed-off-by: Vlad Cimpeanu <vlad.cimpeanu@uipath.com>
vldcmp-uipath
temporarily deployed
to
LLMGW_SETTINGS
July 14, 2026 15:14 — with
GitHub Actions
Inactive
The legacy Vertex retryer retried httpx.TimeoutException (all timeout subtypes, including WriteTimeout and PoolTimeout) and RemoteProtocolError (connection reset mid-exchange); the initial parity commit only covered ConnectTimeout/ReadTimeout/ConnectError. Replace the two timeout subclasses with the TimeoutException base and add RemoteProtocolError. PoolTimeout matters under high request concurrency; RemoteProtocolError is the shape of mid-flight connection resets. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
vldcmp-uipath
temporarily deployed
to
LLMGW_SETTINGS
July 16, 2026 15:10 — with
GitHub Actions
Inactive
cosminacho
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
RetryableHTTPTransportdefaults are materially weaker than the legacy uipath-langchain-python chat-client retryers (BedrockRetryer) they replaced. Retryable episodes the legacy client absorbed silently now surface as run failures.UiPathOriginTimeoutError)ConnectError/RemoteProtocolErroron Vertex)TimeoutExceptionincl. pool/write,ConnectError,RemoteProtocolError)Changes
uipath-llm-client 1.17.0
_DEFAULT_MAX_RETRIES3→5, initial delay 2s→5s, max delay 60s→120sretry_any(typed exceptions, server-requested-retry)— anyUiPathAPIErrorcarrying Retry-After is retried regardless of statusretry_afterproperty moved fromUiPathRateLimitErrorup toUiPathAPIError; wait strategy honors it for every API error (capped at max delay)UiPathOriginTimeoutError(524) in the taxonomy, mapped and exported; 529 unchangedhttpx.TimeoutException(all timeout subtypes, incl.PoolTimeoutunder high concurrency),httpx.ConnectError, andhttpx.RemoteProtocolError(mid-exchange connection reset) — the union of what the legacy Bedrock and Vertex retryers handleduipath-langchain-client 1.17.0
UiPathBaseLLMClient.max_retriesdefault 3→5; dependency floor bumped touipath-llm-client>=1.17.0Not in this PR (follow-ups)
uipath-langchain'schat_model_factorystill passesmax_retries=3explicitly on the new-clients path — companion bump needed in uipath-langchain-python for agent runs to get the 5-attempt budget (backoff window, Retry-After, 524 and connection-error behavior from this PR apply regardless).Test plan
tests/core/features/test_retry.py: full default retry set pinned, Retry-After honored on any status, 403+Retry-After retried / plain 403 not, 524 retried, connect errors / pool timeouts / remote-protocol errors retried then raised, default 5-attempt budget end-to-end🤖 Generated with Claude Code