Skip to main content

langchain-community-migrate

Find the replacement for every langchain_community import in your project, rewrite the 1:1 moves, and vendor the classes that never got a standalone package.

Unofficial community tool. Not affiliated with or endorsed by LangChain. Stdlib only, Python 3.9+.

Why

langchain-community was sunset on 2026-05-22 (no more fixes or security patches, repo archived 2026-06-19) but is still downloaded ~27M times a month. Teams have to work out, for each loader, vector store, chat model and tool they import, whether a standalone package replaces it (langchain-openai, langchain-chroma, langchain-postgres, ...), whether the API changed, or whether nothing replaces it. The official docs only link index pages. langchain-cli migrate needs the grit binary and covers a handful of partners.

This tool ships a mapping table generated from the real packages: the public symbols of langchain-community 0.2.19, 0.3.31 and 0.4.2 matched against the exports of 70+ partner packages plus langchain-core, with curated overrides for renames and API changes (see scripts/ in the repo; regenerate it yourself). 1,856 symbols: 152 with a replacement, 29 to verify, 1,675 with no standalone package.

pip install langchain-community-migrate     # or: pip install git+https://github.com/rafal-one/langchain-community-migrate

scan: what do I use and what replaces it?

$ langchain-community-migrate scan src/
src/app.py:1:1: vectorstores.Chroma -> moved
    from langchain_chroma import Chroma  [pip install langchain-chroma]
src/app.py:1:1: vectorstores.FAISS -> orphaned
    no standalone package; vendor it (`vendor`) or stay on a pinned langchain-community
src/app.py:1:1: vectorstores.Pinecone -> moved, API change
    from langchain_pinecone import PineconeVectorStore  [pip install langchain-pinecone]
      note: renamed; construct with an index handle: PineconeVectorStore(index=..., embedding=...) ...

9 reference(s) in 1 file(s): 5 moved, 1 moved, API change, 3 orphaned
install: pip install langchain-chroma langchain-huggingface langchain-ollama langchain-openai langchain-pinecone

It understands from langchain_community.x[.y] import Z, aliases, import langchain_community.x as m; m.Z, langchain_community.x.Z chains, and the legacy from langchain.llms import OpenAI style paths that forwarded to langchain-community. Statuses:

Status Meaning
moved a standalone package exports the same class (or the replacement is a known rename)
moved, API change replaced, but constructor/behaviour differs; the note says how
verify a same-named class exists elsewhere; check before switching
orphaned no standalone package found; vendor it or pin langchain-community
unknown not in the mapping (star import, private module)

--format json|markdown for reports, -q to drop the footer. Exit codes: 0 nothing found (or --fail-on never), 1 references found (--fail-on orphaned: only orphaned/unknown), 2 bad usage or missing path.

fix: rewrite imports and dependencies

Dry run by default (unified diff); --write applies it.

langchain-community-migrate fix src/                          # diff
langchain-community-migrate fix src/ --write                  # apply
langchain-community-migrate fix src/ --write --include-api-changes
  • Rewrites from langchain_community.vectorstores import Chroma, FAISS into from langchain_community.vectorstores import FAISS + from langchain_chroma import Chroma; aliases and multi-line imports are kept; renamed classes get as OldName so the rest of the file still works.
  • API-change moves are only rewritten with --include-api-changes, and get a TODO comment with the note.
  • Adds the needed packages to requirements*.txt / pyproject.toml (next to langchain-community), and drops langchain-community only when no reference is left anywhere under the given paths.
  • It never touches import langchain_community.x as m style usage; scan lists those.

vendor: keep the orphans, drop the dependency

pip install 'langchain-community<0.5'   # source of the code to copy; needed once
langchain-community-migrate vendor src/ --dest src/myapp/_vendor            # dry run
langchain-community-migrate vendor src/ --dest src/myapp/_vendor --write

Copies the module of every orphaned symbol you import (e.g. FAISS) plus the langchain_community modules it imports (static closure) into _vendor/langchain_community/..., rewrites their imports to the vendored copy, rewrites your imports, and copies the MIT licence next to them. Third-party packages the vendored code needs (faiss-cpu, numpy, ...) are listed for you to add. --source DIR uses an unpacked copy instead of the installed package; --only NAME limits it. Vendored code is yours to maintain: nobody patches it upstream anymore.

lookup

$ langchain-community-migrate lookup PGVector
vectorstores:PGVector [moved, API change]  langchain_community.vectorstores.pgvector
    from langchain_postgres import PGVector  [pip install langchain-postgres]
      note: connection string argument is now `connection=`; table schema differs ...

Limits

The mapping matches names, not behaviour: always read the notes, run your tests, and treat "verify" entries as suggestions. It reflects the partner packages as of 2026-10-18; a partner package that adds a class later will show up as orphaned until the mapping is regenerated. Only Python source is scanned (no notebooks or YAML configs).

Development

pytest (39 tests), Python 3.9 and 3.14; wheel and sdist clean installs checked. python scripts/fetch_partners.py WORK exports.json then python scripts/gen_mapping.py exports.json out.json 0.4.2=DIR 0.3.31=DIR ... rebuilds mapping.json.

Donate

If this saved your team a migration week: https://paypal.me/RafalBaranowski

MIT licensed.

Metadata

Release files for langchain-community-migrate 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-community-migrate 0.1.0
File Size Uploaded Provenance
langchain_community_migrate-0.1.0.tar.gz 46.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-community-migrate 0.1.0
File Interpreter ABI Platform
langchain_community_migrate-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 88.6 kB

Release files / langchain_community_migrate-0.1.0.tar.gz

Download URL langchain_community_migrate-0.1.0.tar.gz
Size 46.5 kB
Tags Source
SHA-256 checksum
How to use checksums
00215a6954258e42a844f5c57b8cd7212acef7069f0c42bced3ecf8b2e3ab6a2
BLAKE2b-256 checksum
How to use checksums
047b81ab2ec929359c4adbf03e01078527579fdc9d92e04227adaaeb9fd76131
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / langchain_community_migrate-0.1.0-py3-none-any.whl

Download URL langchain_community_migrate-0.1.0-py3-none-any.whl
Size 42.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d32c264091db800262aceba3525566fbab7e7d14c2bda7643f3417903a62b8e
BLAKE2b-256 checksum
How to use checksums
1ced265d305caef2f5acd592c695f91ee9207ca92cd2dd7bbf0bc1b809cbfd6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for langchain-community-migrate 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page