# LLMSlim Core changelog

> Released versions of the open-source `llmslim` package, newest first.

## v0.8.1 (12 Oct 2026): Drop it into the framework you already use.

Adapters that run LLMSlim's compress_documents inside LangChain, LlamaIndex and Haystack, where you would otherwise use LLMLinguaCompressor or LongLLMLinguaPostprocessor. No change to how compression itself behaves.

- **Added: LangChain compressor.** LLMSlimCompressor is a BaseDocumentCompressor for ContextualCompressionRetriever. Install llmslim[langchain].
- **Added: LlamaIndex postprocessor and Haystack component.** LLMSlimPostprocessor is a BaseNodePostprocessor (Python 3.10+, llmslim[llamaindex]); LLMSlimDocumentCompressor is a Haystack component with run(documents, query) (llmslim[haystack]).
- **Boundary: Same rules as the core.** Retrieved text stays untrusted; documents that compress to nothing are dropped; token counts are recorded in metadata and kept out of the prompt for LlamaIndex.

Release: https://github.com/Thanatos9404/llmslim/releases/tag/v0.8.1

## v0.8.0 (Oct 2026): Keep what the question needs. Drop the rest.

With a query, compress() now ranks whole documents, chat rounds and paragraphs against it and keeps the best ones intact, instead of trimming every chunk by the same ratio. An optional 22M-parameter reranker finds answers that share few words with the question. Code, logs and test output keep their lines, and selection is about six times faster. Measured on public benchmarks, with fresh questions run after the code was frozen.

- **Changed: Query-focused selection.** Structural units are ranked with BM25, light stemming, pseudo-relevance feedback and a document prior, kept whole in their original order, then topped up sentence by sentence. compress_documents() shares one budget across documents by relevance.
- **Changed: Code and logs keep their lines.** Failures and tracebacks come first, repeated lines collapse into a count, the tail is kept, and code keeps its skeleton plus the most relevant bodies. Compressing a 1.3k-token file dropped from about 3.5 s to 7 ms.
- **Added: Optional reranker.** relevance="semantic" rescores the strongest candidates with a 22M-parameter cross-encoder (the semantic extra), on CPU or GPU. Any scorer(query, texts) callable works too. Without it, LLMSlim still runs no model.
- **Boundary: Guardrails still win.** Trusted instructions and preserve_patterns survive inside large units; untrusted retrieved, tool and assistant text still cannot reach the protected tier. Query-less prose behaves exactly as in 0.7.

Release: https://github.com/Thanatos9404/llmslim/releases/tag/v0.8.0

## v0.7.2 (11 Oct 2026): Keep the evidence that answers the question.

A patch release. plan_context() no longer drops the most relevant retrieved document in favour of cheaper, less relevant ones, and documents marked superseded are dropped before current evidence. Also fixes runtime sessions on Python 3.9.

- **Fixed: Most relevant evidence is kept.** After the budget allocation, a deterministic guard keeps the single most relevant, non-superseded document, memory or tool result whenever it fits by dropping or compressing lower-relevance evidence.
- **Fixed: Superseded documents go first.** Items whose metadata sets superseded, superseded_by, or a past valid_until are scaled down and dropped before current evidence, with a warning in the plan.
- **Boundary: Untrusted wording earns no value.** Imperative text inside retrieved, tool or assistant content no longer raises its planning value. It is still rendered as untrusted data; there is no injection detector.

Release: https://github.com/Thanatos9404/llmslim/releases/tag/v0.7.2

## v0.7.1 (30 Sep 2026): Plan context with provider caches in mind.

An opt-in cache-aware runtime classifies reusable context, preserves safe prefixes, and separates local estimates from provider-reported usage. The Studio server installs the tagged package; paid provider cache performance remains unmeasured.

- **Added: Cache plans and diagnostics.** Stable-prefix fingerprints, append-only reuse estimates, cache generations, invalidation reasons, and separate network-byte and token metrics are visible in Context Inspector.
- **Integrations: Provider request builders.** Execution-free OpenAI, Anthropic, Gemini, and vLLM builders expose supported cache controls. OpenAI state continuation and Gemini cached resources require explicit host opt-in.
- **Boundary: Reported data stays distinct.** Local prefix matches are estimates until a provider reports usage. Sarvam caching remains unverified; raw KV is confined to an explicit self-hosted process adapter.

Release: https://github.com/Thanatos9404/llmslim/releases/tag/v0.7.1

## v0.7.0 (26 Sep 2026): Prepare context for every agent turn.

A provider-neutral agent context runtime constructs model-visible input from conversation, retrieval, memory, and tools with provenance, dependencies, quality gates, and local traces. Its tagged 0.7.0 wheel remains available; hosted verification and PyPI publication were separate gates.

- **Added: Agent Context Runtime.** ContextEnvelope, ContextGraph, ContextPolicy, progressive planning, quality reporting, and bounded sessions prepare a turn without taking over the agent loop or tool execution.
- **Added: Context Inspector and adapters.** The Studio shows before and after context, decision reasons, graph links, and a prompt-free trace. Generic, Sarvam, OpenAI-compatible, and text-only OpenAI Agents adapters return host-owned model inputs.
- **Measured: Quality and budget tradeoff.** Across 112 offline cases, the new runtime retained all measured required facts and tool contracts, with 67.9% budget success and 18.7% context reduction. Provider-backed answer quality remains unmeasured.

Release: https://github.com/Thanatos9404/llmslim/tree/v0.7.0

## v0.6.0 (19 Sep 2026): Plan the whole context, not just one string.

A deterministic, explainable Adaptive Context Planner with explicit hard constraints, provider-neutral model budgets, and optional Sarvam, Zoho, and MongoDB integrations.

- **Added: Adaptive Context Planner.** Multiple-choice constrained allocation selects safe representations for trusted instructions, chat, RAG, memory, tool results, and tool schemas, then explains each decision.
- **Boundary: Failure is explicit.** Required trusted content is never silently truncated. Impossible budgets produce an infeasible plan, provider candidates fail closed, and tool selection never grants execution authority.
- **Integrations: Optional ecosystem adapters.** Official-SDK Sarvam rewriting, bounded read-only Zoho sources, and PyMongo async memory remain optional extras; the base planner stays local and provider-neutral.

Release: https://github.com/Thanatos9404/llmslim/blob/main/docs/releases/v0.6.0.md

## v0.5.0 (13 Sep 2026): MCP catalogs. Your host stays in control.

Optional MCP transports and an OpenAI Agents SDK bridge, with complete tool contracts and explicit execution ownership.

- **Added: MCP catalog sources.** Streamable HTTP and literal-argv stdio support bounded pagination, scoped caching, contract fingerprints, and stale-plan detection.
- **Boundary: Execution belongs to the host.** The optional Agents SDK bridge requires a host callback. Full and measure-only plans retain every schema; selective exposure remains research-only.
- **Website: A new home for LLMSlim.** A redesigned website with light and dark themes, a Sarvam integration guide, and a note on LLMSlim's acceptance into the Sarvam Startup Program.

Release: https://github.com/Thanatos9404/llmslim/releases/tag/v0.5.0

## v0.4.0 (21 Aug 2026): Contract-safe tool context.

This Python release adds stable, conservative tool-schema infrastructure while keeping retrieval and selective exposure research-only.

- **Added: Stable tool-contract APIs.** The released tool surface supports copied schema normalization, deterministic canonical JSON, SHA-256 fingerprints, exact contract checks, and safe catalog optimization.
- **Boundary: Retrieval remains research-only.** Lexical, dense, hybrid retrieval, selective exposure, and lazy hydration are explicit experiments. They do not authorize or execute tools, and compress() keeps its established behavior.
- **Measured: Schema-tax evidence stays transparent.** The v0.4.0 release gate records 489 passing tests, 90.93% coverage, and 375 generated tool schemas in 18 catalogs. The compact baseline produced 0.00% lossless reduction.

Release: https://github.com/Thanatos9404/llmslim/releases/tag/v0.4.0

## v0.3.1 (13 Aug 2026): Provenance and verification.

This security-focused Python release strengthens caller-declared trust boundaries and makes token-counter provenance visible in the public result.

- **Security: Provenance-aware priority locking.** ContextRole distinguishes system, developer, user, assistant, tool, RAG, and general content. Untrusted RAG, tool, and assistant text cannot become hard-locked priority from imperative wording, safety patterns, or preserve patterns.
- **Security: Nonce-protected rewrite template fences.** User text containing a template-fence-like delimiter remains byte-for-byte unchanged while the template uses a content-preserving nonce fence, preventing fence breakout.
- **Added: Context roles and token-counter telemetry.** The public Python API exports ContextRole and records token_counter_used so callers can distinguish tiktoken from the documented heuristic fallback.
- **Fixed: Inline code and CJK sentence boundaries.** Inline backtick code spans no longer create false sentence boundaries, and the CJK ideographic stops 。, ！, and ？ are recognized by the sentence-splitting paths.
- **Changed: Pipelines preserve provenance.** Document compression defaults retrieved context to RAG, while chat compression propagates supplied system, developer, user, assistant, and tool roles instead of flattening them.
- **Fixed: Benchmark collection reports real pytest results.** The release runner collects actual pass/fail reports rather than replaying stale tuples. The checked-in release record reports 432 passing tests, zero failures, 92.57% branch coverage, and Ruff passing.

Release: https://github.com/Thanatos9404/llmslim/blob/main/release_notes.md

## v0.3.0 (18 Jul 2026): Hybrid prompt optimization.

v0.3.0 expanded the package from its offline extractive default into an extensible rewrite and hybrid framework without bundling an LLM provider.

- **Added: Rewrite and hybrid strategies.** compress() gained extractive, rewrite, and hybrid strategies. Rewrite-capable paths require a caller-supplied provider; the default extractive path remains offline and deterministic.
- **Added: Provider and validation contracts.** BaseRewriteProvider, CallableProvider, RewriteRequest, RewriteMetadata, versioned templates, and structural, instruction, entity, and similarity validation were added as public building blocks.
- **Changed: Rewrite work moved into a focused sub-package.** Prompt construction, execution, and validation were separated into llmslim.rewrite modules, with strategy benchmarking and a CLI strategy flag added alongside them.

Release: https://github.com/Thanatos9404/llmslim/tree/v0.3.0

## v0.2.0 (13 Jul 2026): High-performance semantic compression.

v0.2.0 deepened the original extractive engine with instruction and entity protection, chunking improvements, cost tooling, and a fuller command-line and benchmark surface.

- **Added: Instruction and entity retention.** The release added explicit instruction prioritization plus regex and heuristic preservation for names, dates, financial metrics, technical identifiers, and URLs.
- **Added: Chunking, embeddings, and cost tooling.** It introduced semantic and hybrid chunking, optional sentence-transformers support, model cost estimation, an interactive/file-based CLI, and comprehensive benchmark tooling.
- **Changed: Richer ranking and result telemetry.** TF-IDF plus PageRank-style sentence centrality, optional tiktoken accounting, and a standardized CompressionResult with detailed telemetry became part of the release.

Release: https://github.com/Thanatos9404/llmslim/tree/v0.2.0

## v0.1.0 (16 Jun 2026): Initial public release.

The first LLMSlim release established the installable Python package and its simple offline compression entry point.

- **Added: Installable LLMSlim package.** v0.1.0 published the llmslim package for Python 3.8+ with the public compress(), ContextCompressor, CompressionResult, token, pipeline, and cost utility exports.
- **Added: Offline prompt compression foundation.** The initial engine provided ratio-driven prompt compression using TF-IDF sentence scoring and thresholding, with optional semantic, fast-token, and NLTK extras.

Release: https://github.com/Thanatos9404/llmslim/tree/v0.1.0

Canonical page: https://www.llmslim.app/changelog
