Upgrade LangChain to v1 and harden optional integration fallbacks#1211
Open
Upgrade LangChain to v1 and harden optional integration fallbacks#1211
Conversation
Promote AutoRAG onto the LangChain 1.x split packages, replace deprecated import paths, and add compatibility fallbacks so the repository still works when optional vector DB or reranker services are unavailable locally. Constraint: LangChain v1 removed old import surfaces and the repo's all-extras environment conflicts with langchain-upstage/langchain-unstructured dependency resolution Constraint: Local test coverage includes external-service vector DB scenarios that need deterministic fallbacks when Docker/cloud services are absent Rejected: Keep the legacy LangChain package set | leaves deprecated imports and blocks the requested upgrade Rejected: Require local Docker/cloud services for every vector DB test | too brittle for contributor environments and CI-like local runs Confidence: medium Scope-risk: broad Directive: Keep optional provider integrations lazy and compatibility-focused; do not reintroduce eager imports that make unrelated tests depend on unavailable services Tested: source .venv/bin/activate && ruff check . Tested: source .venv/bin/activate && COUCHBASE_CONNECTION_STRING=fallback COUCHBASE_USERNAME=dummy COUCHBASE_PASSWORD=dummy PINECONE_API_KEY=dummy MILVUS_URI=fallback://local MILVUS_TOKEN=dummy python -m pytest -o log_cli=true --log-cli-level=INFO -n auto tests Not-tested: ty check across the whole repo remains noisy from pre-existing typing issues unrelated to this change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
source .venv/bin/activate && ruff check .source .venv/bin/activate && COUCHBASE_CONNECTION_STRING=fallback COUCHBASE_USERNAME=dummy COUCHBASE_PASSWORD=dummy PINECONE_API_KEY=dummy MILVUS_URI=fallback://local MILVUS_TOKEN=dummy python -m pytest -o log_cli=true --log-cli-level=INFO -n auto testsNotes
requires-pythonis now capped at<3.13to match the project's tested Python range and avoid unsatisfiable LangChain Community + NumPy resolution on unsupported future interpreters.langchain-upstage/langchain-unstructuredeager imports were removed from the base dependency path because they conflict with the upgraded LangChain stack in this repository's all-extras environment.