Skip to content

feat(retry): restore legacy uipath-langchain-python chat-client retry parity#107

Open
vldcmp-uipath wants to merge 2 commits into
mainfrom
feat/retry-parity-legacy-client
Open

feat(retry): restore legacy uipath-langchain-python chat-client retry parity#107
vldcmp-uipath wants to merge 2 commits into
mainfrom
feat/retry-parity-legacy-client

Conversation

@vldcmp-uipath

@vldcmp-uipath vldcmp-uipath commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

The RetryableHTTPTransport defaults are materially weaker than the legacy uipath-langchain-python chat-client retryers (BedrockRetryer) they replaced. Throttling episodes the legacy client absorbed silently now surface as run failures.

Legacy retryers Transport (before) Transport (this PR)
Attempts 5 3 5
Backoff 5/10/20/40s (~75s window) 2/4s (~6s window) 5/10/20/40s
Max delay cap 120s 60s 120s
Retry-After honored any status 429 only any status
Retry-After forces retry on non-retryable status yes no yes
HTTP 524 retried not retried retried (UiPathOriginTimeoutError)
Connection errors / timeouts retried (botocore) not retried retried (ConnectError, ConnectTimeout, ReadTimeout)

Changes

uipath-llm-client 1.17.0

  • Defaults: _DEFAULT_MAX_RETRIES 3→5, initial delay 2s→5s, max delay 60s→120s
  • Retry condition: retry_any(typed exceptions, server-requested-retry) — any UiPathAPIError carrying Retry-After is retried regardless of status
  • retry_after property moved from UiPathRateLimitError up to UiPathAPIError; wait strategy honors it for every API error (capped at max delay)
  • New UiPathOriginTimeoutError (524) in the taxonomy, mapped and exported; 529 unchanged
  • Default retry set gains httpx.ConnectError / ConnectTimeout / ReadTimeout

uipath-langchain-client 1.17.0

  • UiPathBaseLLMClient.max_retries default 3→5; dependency floor bumped to uipath-llm-client>=1.17.0

Not in this PR (follow-ups)

  • uipath-langchain's chat_model_factory still passes max_retries=3 explicitly 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 retried then raised, default 5-attempt budget end-to-end
  • tests/langchain/features/test_default_max_retries.py updated to pin 5
  • Full suite: 568 passed (live-gateway integration tests excluded), ruff clean

🤖 Generated with Claude Code

…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 vldcmp-uipath force-pushed the feat/retry-parity-legacy-client branch from 53a9d4e to 466e5b2 Compare July 14, 2026 14:56
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 vldcmp-uipath deployed to LLMGW_SETTINGS July 14, 2026 15:14 — with GitHub Actions Active
@vldcmp-uipath vldcmp-uipath changed the title feat(retry): restore legacy chat-client retry parity in shared transports feat(retry): restore legacy uipath-langchain-python chat-client retry parity Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant