Skip to content

fix: bound anthropic<1.0.0 on the bedrock extra of uipath-langchain-client - #130

Merged
andreibalas-uipath merged 1 commit into
mainfrom
fix/bound-anthropic-bedrock-extra
Sep 1, 2026
Merged

fix: bound anthropic<1.0.0 on the bedrock extra of uipath-langchain-client#130
andreibalas-uipath merged 1 commit into
mainfrom
fix/bound-anthropic-bedrock-extra

Conversation

@andreibalas-uipath

@andreibalas-uipath andreibalas-uipath commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

What changed and why

Affected package: langchain only (uipath-langchain-client 1.18.0 → 1.18.1).

The bedrock extra had no direct anthropic requirement — it received the SDK only transitively:

  • bedrocklangchain-aws[anthropic]>=1.4.5,<2.0.0
  • langchain-aws[anthropic] (1.7.4) → anthropic[bedrock]>=0.95.0 — no upper bound
  • langchain-anthropic 1.7.0 (2026-08-27) lifted its own anthropic<1.0.0 pin to >=0.120.0,<2.0.0

So any fresh resolution of uipath-langchain-client[bedrock] since ~2026-08-27 picked anthropic==1.2.0. The anthropic 1.x SDK moved to httpx2 and rejects the UiPath HTTP client at construction time in clients/bedrock/chat_models.py:

TypeError: Invalid `http_client` argument; Expected an instance of
`httpx2.AsyncClient` but got <class 'uipath.llm_client.httpx_client.UiPathHttpxAsyncClient'>

This broke every consumer resolving fresh — e.g. all uipath-langchain-python integration suites since 2026-08-29 (example run) and any end user running uv sync on a project using the bedrock extra.

Changes

  • Add explicit anthropic[bedrock]>=0.96.0,<1.0.0 to the bedrock extra so the bound applies regardless of what transitive dependencies allow.
  • Regenerated uv.lock (resolution unchanged — anthropic stays 0.96.0; only the new requirement metadata is recorded).
  • Version bump 1.18.1 + changelog entry (langchain-only per repo convention).

Audit of remaining extras

Only bedrock had the gap. anthropic and all already carry the bound. vertexai uses plain langchain-google-vertexai (no [anthropic] extra), and google/azure/fireworks/litellm/openai have no anthropic in their closures. langchain-anthropic/langchain-aws themselves are deliberately NOT bounded — langchain-anthropic 1.7.0 still admits anthropic 0.12x, so bounding anthropic alone is sufficient and less restrictive.

Verification

Fresh (unlocked) resolution of the local package against PyPI:

  • [bedrock]anthropic==0.125.0, with langchain-aws==1.7.4 and langchain-anthropic==1.7.0 at latest
  • [anthropic], [all]anthropic==0.125.0
  • [vertexai] → no anthropic in resolution

ruff check, ruff format --check, pyright, and pytest tests pass (the pre-existing local LLMGW_* env setup errors are identical on main).

🤖 Generated with Claude Code

The bedrock extra received the anthropic SDK only transitively via
langchain-aws[anthropic] (unbounded above); langchain-anthropic 1.7.0
also lifted its own <1.0.0 pin. Fresh resolutions therefore picked
anthropic 1.x, which moved to httpx2 and rejects UiPath's httpx clients
at Bedrock chat-model construction.

Add an explicit anthropic[bedrock]>=0.96.0,<1.0.0 to the bedrock extra
(anthropic and all already carry the bound; no other extra pulls
anthropic transitively).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@andreibalas-uipath
andreibalas-uipath force-pushed the fix/bound-anthropic-bedrock-extra branch from 3c751d3 to 5921039 Compare September 1, 2026 09:15
@andreibalas-uipath
andreibalas-uipath merged commit 30fd2fb into main Sep 1, 2026
12 checks passed
@andreibalas-uipath
andreibalas-uipath deleted the fix/bound-anthropic-bedrock-extra branch September 1, 2026 09:26
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.

2 participants