[PR #3464] [MERGED] docs: add langchain-collapse to community middleware #3512

Closed
opened 2026-06-05 18:23:20 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/3464
Author: @johanity
Created: 4/7/2026
Status: Merged
Merged: 4/7/2026
Merged by: @sydney-runkle

Base: mainHead: add-langchain-collapse


📝 Commits (1)

  • ca6de13 docs: add langchain-collapse to community middleware

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 src/oss/python/integrations/middleware/index.mdx (+1 -0)

📄 Description

Adds langchain-collapse to the community middleware integrations table.

What it does

Preventive context management middleware that collapses consecutive read/search tool-call groups into a short placeholder, keeping only the most recent result. Reduces context usage before SummarizationMiddleware needs to fire.

  • 92% token reduction on realistic coding sessions
  • SummarizationMiddleware triggers 4.2x later when CollapseMiddleware runs first
  • Stateless, no LLM calls
  • PyPI · Source · CI

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/3464 **Author:** [@johanity](https://github.com/johanity) **Created:** 4/7/2026 **Status:** ✅ Merged **Merged:** 4/7/2026 **Merged by:** [@sydney-runkle](https://github.com/sydney-runkle) **Base:** `main` ← **Head:** `add-langchain-collapse` --- ### 📝 Commits (1) - [`ca6de13`](https://github.com/langchain-ai/docs/commit/ca6de1302f3c45a0c379e5452de264c32f831b2b) docs: add langchain-collapse to community middleware ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/python/integrations/middleware/index.mdx` (+1 -0) </details> ### 📄 Description Adds [langchain-collapse](https://github.com/johanity/langchain-collapse) to the community middleware integrations table. ## What it does Preventive context management middleware that collapses consecutive read/search tool-call groups into a short placeholder, keeping only the most recent result. Reduces context usage before `SummarizationMiddleware` needs to fire. - 92% token reduction on realistic coding sessions - `SummarizationMiddleware` triggers 4.2x later when `CollapseMiddleware` runs first - Stateless, no LLM calls - [PyPI](https://pypi.org/project/langchain-collapse/) · [Source](https://github.com/johanity/langchain-collapse) · [CI](https://github.com/johanity/langchain-collapse/actions) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 18:23:20 -04:00
yindo closed this issue 2026-06-05 18:23:20 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#3512