Conversation
vdusek
left a comment
There was a problem hiding this comment.
One comment regarding the other deps.
And the same applies to apify-client. With this constraint setup, it won't be possible to install this package together with the new major version of the SDK.
The best practice is to use an upper-bound constraint only when you know there is an incompatibility. This applies to libraries only, of course.
jirispilka
left a comment
There was a problem hiding this comment.
Looks fine but I'll leave the review to Kuba and Vlada
MQ37
left a comment
There was a problem hiding this comment.
Thank you!
I would keep the backwards compatible create_react_agent for now and we can do breaking update in future.
vdusek
left a comment
There was a problem hiding this comment.
LGTM
Also, if you generate the changelog from the PR titles, I'd use "fix(deps): ...".
4d268da
into
feat/modernize-langchain-integration
Bump
langchain-coreto support LangChain 1.xWidens the core pin so the connector installs alongside LangChain 1.x while staying compatible with 0.3.x. Connector source is unchanged; it only uses stable APIs (
BaseTool,Document,BaseRetriever,BaseLoader,ArgsSchema,ToolException).Fixes #37 (@vdusek, @MQ37): the old
<0.4pin makespip install "langchain>=1.0.0" langchain-apifyunresolvable, blocking any 1.x project.Testing
langchain-core 1.4.8.pip install "langchain>=1.0.0" langchain-apifynow resolves (wasResolutionImpossible).🟡 Decision: dual-support now, defer full 1.x
This PR keeps dual support (0.3.x + 1.x) and defers the full 1.x migration to a later PR. Rationale: a full 1.x move touches the agent API and dev-deps, which would reopen the already-reviewed
feat/modernize-langchain-integrationwork. Widening the pin unblocks #37 without that churn.The one snag, for later: there is no agent import clean on both versions.
create_react_agent(this PR)create_agent(future, 1.x-only)Docs stay on
create_react_agent(works on both; only warns on 1.x). When the team decides to go fully 1.x, that becomes a focused follow-up: pin core^1.0, bump dev-deps to^1.0, re-lock, flip snippets tocreate_agent.poetry.lockRegenerated (
poetry lock, Poetry 2.x). With current dev-deps it stays on core 0.3.80 — expected:langchain-openai ^0.3.2andlangchain-tests ^0.3.5are dev/test-only and cap core<0.4. They do not constrain end users; 1.x runtime compat is proven by the 410 tests. One lock = one resolution, so testing both versions needs a CI matrix (follow-up).Downstream docs (prepped + verified, land separately)
langchain.md.mdxpages +examples/tools_example.pyVersion-agnostic (done, needed either way):
VectorstoreIndexCreator,query_with_sources) → retriever +ChatPromptTemplatechain (langchain.md,apify_dataset.mdx)apify.mdx: instantiate tool-list classes;call_actorusesstartUrls; MCP usesclient = MultiServerMCPClient(...)+transport: "streamable_http";ApifyActorsToolprose fixlangchain_core.messages+create_react_agent(apify_actors.mdx,apify_web_crawler.mdx,apify_google_search.mdx)gpt-5-minieverywhereapify_crawl.mdxDecision-dependent (only if full 1.x): flip agent snippets to
langchain.agents.create_agentand add thelangchainmeta to those install lines.Follow-ups (separate PRs, non-blocking)
^1.0, bump dev-deps to^1.0, re-lock, flip agent snippets tocreate_agent.apify-clientto^2.5.0, replace rawrequestsbuild-fetch with SDKdefault_build().examples/tools_example.pyto the LangGraph/LangChain 1.0 agent API.