Download Latest Version v8.0.0 source code.zip (928.2 kB)
Home / v7.0.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-10-22 5.8 kB
v7.0.0 source code.tar.gz 2026-10-22 559.9 kB
v7.0.0 source code.zip 2026-10-22 755.2 kB
Totals: 3 Items   1.3 MB 0

Highlights

This is a major release, but for most code the upgrade is just the version bump. See Migrating below for the three small breaking changes.

Vector stores. Six new stores, each behind its own feature flag:

  • chroma: Chroma (#352)
  • weaviate: Weaviate over REST + GraphQL (#355)
  • pinecone: Pinecone over the data-plane REST API (#354)
  • redis: Redis on the Redis Query Engine (#359)
  • mongodb: MongoDB Atlas Vector Search (#360)
  • milvus: Milvus over the REST API v2 (#363)

Chains. map-reduce, refine and retrieval QA (#351), RouterChain where an LLM picks the destination (#361), MapRerankDocuments (#371), ConstitutionalChain (#372) and LLMMathChain (#373).

Agents. AgentExecutor::stream_events streams the model's text, tool calls and tool results as they happen, and supports cancellation (#349). Agent runs now report their total token usage (#370, closes [#6]).

Images. Images now go through prompt templates, chains and agents, not just raw LLM calls. HumanMessagePromptTemplate::with_images("images") reads image URLs or base64 data from the input, and the conversational chain and the agents pick them up by default. OpenAI, Claude, Bedrock and Ollama all send them in their native format (#376, closes [#238]).

Few-shot prompts. FewShotPromptTemplate takes a fixed list of examples or an example selector: LengthBasedExampleSelector keeps the prompt under a length budget, and SemanticSimilarityExampleSelector picks the examples closest to the input using any Embedder (#377).

Observability. tracing spans for LLM calls, embeddings, chains, tools and agent steps, with token counts on the spans (#350).

LLM caching. CachedLLM wraps any LLM and caches responses. InMemoryLLMCache ships with LRU and TTL, and the LLMCache trait lets you plug in your own backend (#374).

Memory. Redis (#353) and MongoDB (#362) chat message histories.

Embeddings. Bedrock (Titan, Cohere) (#356) and Voyage AI (#357).

Tools and parsers.

  • FunctionTool turns an async function into a tool (#367, closes [#303] and [#228]).
  • Calculator evaluates math with a safe expression evaluator, no eval (#369).
  • Typed output parsers: JSON into your own type, structured, comma list, boolean and regex (#368).

Loaders. GitCommitLoader gained filters, a custom document builder and since() (#366, closes [#196]).

Performance. fastembed, PDF parsing and the text splitters no longer block the async runtime (#365, closes [#142]).

Migrating from 6.x

semantic_router::Index now requires Send + Sync (#364). This fixes RouteLayer not being usable across tasks. If you implemented Index yourself, your type needs to be Send + Sync, which in practice means using Arc/Mutex instead of Rc/RefCell.

EmbedderError has a new BedrockError variant (with the bedrock feature).

All public error enums are now #[non_exhaustive]. That includes LLMError, ChainError, AgentError, EmbedderError, MemoryError, PromptError, LoaderError and the rest. If you match on one of them exhaustively, add a wildcard arm:

:::rust
match err {
    ChainError::MissingInputVariable(v) => { /* ... */ }
    other => return Err(other.into()),
}

This is a one-time change: it means future releases can add error variants without another major version.

What's Changed

  • feat(agent): stream agent events and support cancellation by @Abraxas-365 in [#349]
  • feat: tracing spans for LLM calls, embeddings, chains, tools and agent steps by @Abraxas-365 in [#350]
  • feat(chain): map-reduce, refine and retrieval QA chains by @Abraxas-365 in [#351]
  • feat(vectorstore): Chroma vector store by @Abraxas-365 in [#352]
  • feat(memory): Redis chat message history by @Abraxas-365 in [#353]
  • feat(vectorstore): Pinecone vector store by @Abraxas-365 in [#354]
  • feat(vectorstore): Weaviate vector store by @Abraxas-365 in [#355]
  • feat(embedding): Bedrock embeddings (Titan, Cohere) by @Abraxas-365 in [#356]
  • feat(embedding): Voyage AI embeddings by @Abraxas-365 in [#357]
  • feat(vectorstore): Redis vector store by @Abraxas-365 in [#359]
  • feat(vectorstore): MongoDB Atlas Vector Search store by @Abraxas-365 in [#360]
  • feat(chain): RouterChain by @Abraxas-365 in [#361]
  • feat(memory): MongoDB chat message history by @Abraxas-365 in [#362]
  • feat(vectorstore): Milvus vector store by @Abraxas-365 in [#363]
  • fix(semantic_router): make Index Send + Sync by @Abraxas-365 in [#364]
  • perf: keep CPU-bound work off the async threads by @Abraxas-365 in [#365]
  • feat(git): filter, document builder and since() for GitCommitLoader by @Abraxas-365 in [#366]
  • feat(tools): FunctionTool by @Abraxas-365 in [#367]
  • feat(output_parsers): typed parsers by @Abraxas-365 in [#368]
  • feat(tools): Calculator tool by @Abraxas-365 in [#369]
  • feat(agent): report token usage of agent runs by @Abraxas-365 in [#370]
  • feat(chain): MapRerankDocuments by @Abraxas-365 in [#371]
  • feat(chain): ConstitutionalChain by @Abraxas-365 in [#372]
  • feat(chain): LLMMathChain by @Abraxas-365 in [#373]
  • feat(llm): CachedLLM by @Abraxas-365 in [#374]
  • chore: release v7.0.0 in [#375]
  • feat(prompt): images through prompt templates, chains and agents by @Abraxas-365 in [#376]
  • feat(prompt): few-shot prompt template with example selectors by @Abraxas-365 in [#377]

Notes

  • The vector store and memory backends have offline tests against mocked APIs. Their live tests are #[ignore]d and run against a local container (see each module's tests for the env var).
  • Custom document ids (#358, [#177]) are still in review and will land in a later release.

Full Changelog: https://github.com/Abraxas-365/langchain-rust/compare/v6.0.0...v7.0.0

Source: README.md, updated 2026-10-22