Skip to content

Langchain - support apify-client v3 #39

Description

@vdusek

langchain-apify currently pins apify-client = "^2.3.0" (i.e. >= 2.3.0, < 3.0.0), which prevents it from being installed alongside anything that requires apify-client v3.

Impact

Apify Python SDK v4 requires apify-client >= 3.1.0. Because langchain-apify caps apify-client < 3.0.0, any project depending on both cannot resolve. This blocks upgrading the python-crewai Actor template — whose ApifyActorsTool (from crewai-tools) is backed by langchain-apify — to Apify SDK v4.

Resolution error from uv:

Because langchain-apify>=0.1.6 depends on apify-client>=2.3.0,<3.0.0
and apify>=4.0.0 depends on apify-client[brotli]>=3.1.0, we can conclude
that apify>=4.0.0 and all versions of langchain-apify are incompatible.

Action

Widen the constraint to support apify-client v3 (apify-client (>=3.0.0,<4.0.0)) and adapt to its breaking changes — most notably the fully-typed clients, where resource methods now return Pydantic models (e.g. Run, DatasetItemsPage) instead of dicts, so run['defaultDatasetId']-style access becomes run.default_dataset_id.

Related

✍️ Drafted by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

t-aiIssues owned by the AI team.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions