[PR #3677] docs: add vecr-compress integration provider page #3712

Open
opened 2026-06-05 18:52:54 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/3677
Author: @h2cker
Created: 4/22/2026
Status: 🔄 Open

Base: mainHead: patch-1


📝 Commits (7)

  • 43590aa docs: add vecr-compress integration provider page
  • 388043e Update vecr-compress.mdx
  • 6e36214 Update vecr-compress.mdx
  • 3daf703 Revise vecr-compress documentation and features
  • 199bf41 Update vecr-compress.mdx
  • ec929ff fix: vale DashesSpaces + use langchain.messages
  • 7f45d75 Merge branch 'main' into patch-1

📊 Changes

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

View changed files

src/oss/integrations/providers/vecr-compress.mdx (+77 -0)

📄 Description

Summary

vecr-compress is an open-source LLM context compressor that provides a deterministic retention contract: order IDs, dates, URLs, emails, and code references are pinned by an auditable regex whitelist before any token-budget packing runs. This PR adds a provider page for the langchain-vecr-compress partner package under src/oss/integrations/providers/, so users can discover it via the official integrations index.

What this PR adds

  • New MDX page at src/oss/integrations/providers/vecr-compress.mdx listing the langchain-vecr-compress partner package, install instructions, and a minimal usage example.

Partner package

Why this belongs in LangChain docs

  • Deterministic retention contract — unlike existing compressors (e.g. LLMLingua), vecr-compress guarantees via regex whitelist that structured tokens (IDs, amounts, dates, URLs) are never dropped regardless of token budget. Auditable and unit-testable.
  • Tested end-to-end with langchain_coreVecrContextCompressor round-trips HumanMessage / SystemMessage / AIMessage including AIMessage.tool_calls via Anthropic-style tool_use content blocks.
  • Complementary, not duplicative — vecr-compress targets correctness/compliance; LLMLingua targets maximum compression ratio. Different problems; they layer well together.

How to test

pip install langchain-vecr-compress langchain-core
python - <<'EOF'
from langchain_core.messages import HumanMessage, SystemMessage
from langchain_vecr_compress import VecrContextCompressor

compressor = VecrContextCompressor(budget_tokens=120)
msgs = [
    SystemMessage(content="You are a refund analyst."),
    HumanMessage(content="Order ORD-99172 placed 2026-03-15. Amount $1,499.00."),
    HumanMessage(content="Hi there, just wanted to say hello!"),
]
out = compressor.compress_messages(msgs)
texts = [m.content for m in out]
assert any("ORD-99172" in t for t in texts), "retention contract broken"
print("OK:", [type(m).__name__ for m in out])
EOF

---

<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/3677 **Author:** [@h2cker](https://github.com/h2cker) **Created:** 4/22/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (7) - [`43590aa`](https://github.com/langchain-ai/docs/commit/43590aaaa8747858a8c5031f469c51fe987d512f) docs: add vecr-compress integration provider page - [`388043e`](https://github.com/langchain-ai/docs/commit/388043e24b28345311ccc194e7b352b6f3e8448e) Update vecr-compress.mdx - [`6e36214`](https://github.com/langchain-ai/docs/commit/6e36214ba999408632dfa0045cfbd0ff0f9b0682) Update vecr-compress.mdx - [`3daf703`](https://github.com/langchain-ai/docs/commit/3daf7036ea1473248921eddcd4e608c7d9c74b3c) Revise vecr-compress documentation and features - [`199bf41`](https://github.com/langchain-ai/docs/commit/199bf4187a5e45d13591aa5e2e7db891a90c8539) Update vecr-compress.mdx - [`ec929ff`](https://github.com/langchain-ai/docs/commit/ec929ffd40ca77103829c0ae7514b52bc966ec2f) fix: vale DashesSpaces + use langchain.messages - [`7f45d75`](https://github.com/langchain-ai/docs/commit/7f45d75909e36c52c89961e2d136b98760f25e45) Merge branch 'main' into patch-1 ### 📊 Changes **1 file changed** (+77 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `src/oss/integrations/providers/vecr-compress.mdx` (+77 -0) </details> ### 📄 Description ## Summary vecr-compress is an open-source LLM context compressor that provides a **deterministic retention contract**: order IDs, dates, URLs, emails, and code references are pinned by an auditable regex whitelist before any token-budget packing runs. This PR adds a provider page for the `langchain-vecr-compress` partner package under `src/oss/integrations/providers/`, so users can discover it via the official integrations index. ## What this PR adds - New MDX page at `src/oss/integrations/providers/vecr-compress.mdx` listing the `langchain-vecr-compress` partner package, install instructions, and a minimal usage example. ## Partner package - PyPI: https://pypi.org/project/langchain-vecr-compress/ - GitHub: https://github.com/h2cker/vecr/tree/main/integrations/langchain-vecr-compress - Core library on PyPI: https://pypi.org/project/vecr-compress/ ## Why this belongs in LangChain docs - **Deterministic retention contract** — unlike existing compressors (e.g. LLMLingua), vecr-compress guarantees via regex whitelist that structured tokens (IDs, amounts, dates, URLs) are never dropped regardless of token budget. Auditable and unit-testable. - **Tested end-to-end with `langchain_core`** — `VecrContextCompressor` round-trips `HumanMessage` / `SystemMessage` / `AIMessage` including `AIMessage.tool_calls` via Anthropic-style `tool_use` content blocks. - **Complementary, not duplicative** — vecr-compress targets correctness/compliance; LLMLingua targets maximum compression ratio. Different problems; they layer well together. ## How to test ```bash pip install langchain-vecr-compress langchain-core python - <<'EOF' from langchain_core.messages import HumanMessage, SystemMessage from langchain_vecr_compress import VecrContextCompressor compressor = VecrContextCompressor(budget_tokens=120) msgs = [ SystemMessage(content="You are a refund analyst."), HumanMessage(content="Order ORD-99172 placed 2026-03-15. Amount $1,499.00."), HumanMessage(content="Hi there, just wanted to say hello!"), ] out = compressor.compress_messages(msgs) texts = [m.content for m in out] assert any("ORD-99172" in t for t in texts), "retention contract broken" print("OK:", [type(m).__name__ for m in out]) EOF --- <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:52:54 -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#3712