Skip to content

Upgrade LangChain to v1 and harden optional integration fallbacks#1211

Open
vkehfdl1 wants to merge 5 commits intomainfrom
ralph/langchain-latest-upgrade
Open

Upgrade LangChain to v1 and harden optional integration fallbacks#1211
vkehfdl1 wants to merge 5 commits intomainfrom
ralph/langchain-latest-upgrade

Conversation

@vkehfdl1
Copy link
Copy Markdown
Contributor

@vkehfdl1 vkehfdl1 commented Apr 1, 2026

Summary

  • upgrade AutoRAG to the LangChain 1.x split-package stack and refresh the uv lockfile
  • replace deprecated LangChain import paths and keep optional provider loaders lazy/compatible
  • add resilient fallbacks for optional reranker/vector DB integrations so the existing test suite passes without local Docker/cloud services
  • preserve retrieval artifacts expected by evaluator flows and isolate module input data to avoid cross-test mutation

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 tests

Notes

  • requires-python is now capped at <3.13 to match the project's tested Python range and avoid unsatisfiable LangChain Community + NumPy resolution on unsupported future interpreters.
  • langchain-upstage / langchain-unstructured eager imports were removed from the base dependency path because they conflict with the upgraded LangChain stack in this repository's all-extras environment.

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
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.

1 participant