From 396aca340023373fd873c5128d72c7214c8908fd Mon Sep 17 00:00:00 2001 From: Daniel Joica Date: Tue, 10 Nov 2026 15:43:46 +0200 Subject: [PATCH 1/2] fix(llamaindex): cap anthropic below 2.0 in the bedrock extra UiPathChatBedrock fails on every call with "Cannot instantiate typing.Union" on fresh installs of uipath-llamaindex[bedrock]. llama-index-llms-bedrock 0.6.0 pins llama-index-llms-anthropic<0.9, whose 0.8.x calls anthropic.types.MessageParam(...). In anthropic 2.x (released 2026-10-21) MessageParam is a Union and can't be called. Nothing in the chain caps anthropic (llama-index-llms-anthropic only asks for >=0.62.0), so new resolutions pick up 2.x. Cap it at <2.0.0, with the adapter's own floor, until llama-index-llms-bedrock allows a newer llama-index-llms-anthropic. Co-Authored-By: Claude Opus 5.5 --- packages/uipath-llamaindex/pyproject.toml | 5 ++++- packages/uipath-llamaindex/uv.lock | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/uipath-llamaindex/pyproject.toml b/packages/uipath-llamaindex/pyproject.toml index e2ae5189..037a5259 100644 --- a/packages/uipath-llamaindex/pyproject.toml +++ b/packages/uipath-llamaindex/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath-llamaindex" -version = "0.6.2" +version = "0.6.3" description = "Python SDK that enables developers to build and deploy LlamaIndex agents to the UiPath Cloud Platform" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" @@ -33,6 +33,9 @@ bedrock = [ "llama-index-llms-bedrock-converse>=0.3.0", "boto3>=1.28.0", "aiobotocore>=2.5.0", + # llama-index-llms-bedrock pins llama-index-llms-anthropic<0.9, which calls + # anthropic.types.MessageParam(...): a Union, so not callable, in anthropic 2.x. + "anthropic>=0.62.0, <2.0.0", ] vertex = [ "llama-index-llms-google-genai>=0.8.0", diff --git a/packages/uipath-llamaindex/uv.lock b/packages/uipath-llamaindex/uv.lock index 8778c9fd..85d06e87 100644 --- a/packages/uipath-llamaindex/uv.lock +++ b/packages/uipath-llamaindex/uv.lock @@ -3552,7 +3552,7 @@ wheels = [ [[package]] name = "uipath-llamaindex" -version = "0.6.2" +version = "0.6.3" source = { editable = "." } dependencies = [ { name = "aiosqlite" }, @@ -3569,6 +3569,7 @@ dependencies = [ [package.optional-dependencies] bedrock = [ { name = "aiobotocore" }, + { name = "anthropic" }, { name = "boto3" }, { name = "llama-index-llms-bedrock" }, { name = "llama-index-llms-bedrock-converse" }, @@ -3602,6 +3603,7 @@ dev = [ requires-dist = [ { name = "aiobotocore", marker = "extra == 'bedrock'", specifier = ">=2.5.0" }, { name = "aiosqlite", specifier = ">=0.21.0" }, + { name = "anthropic", marker = "extra == 'bedrock'", specifier = ">=0.62.0,<2.0.0" }, { name = "boto3", marker = "extra == 'bedrock'", specifier = ">=1.28.0" }, { name = "google-genai", marker = "extra == 'vertex'", specifier = ">=1.0.0" }, { name = "llama-index", specifier = ">=0.14.13,<1.0.0" }, From f4067ae7ce79b41f225ebca8fd440bda608df978 Mon Sep 17 00:00:00 2001 From: Daniel Joica Date: Tue, 10 Nov 2026 19:55:02 +0200 Subject: [PATCH 2/2] chore(llamaindex): drop explanatory comment on the anthropic cap The rationale lives in the PR description and the previous commit message. Co-Authored-By: Claude Opus 5.5 --- packages/uipath-llamaindex/pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/uipath-llamaindex/pyproject.toml b/packages/uipath-llamaindex/pyproject.toml index 037a5259..a7f63b94 100644 --- a/packages/uipath-llamaindex/pyproject.toml +++ b/packages/uipath-llamaindex/pyproject.toml @@ -33,8 +33,6 @@ bedrock = [ "llama-index-llms-bedrock-converse>=0.3.0", "boto3>=1.28.0", "aiobotocore>=2.5.0", - # llama-index-llms-bedrock pins llama-index-llms-anthropic<0.9, which calls - # anthropic.types.MessageParam(...): a Union, so not callable, in anthropic 2.x. "anthropic>=0.62.0, <2.0.0", ] vertex = [