AIToday
Large Language ModelsAI Coding AssistantsOpen-Source AIDaily Dose of Data SciencePublished: Aug 18, 2026, 10:01 JST3 min read

aimock open-sources API mock for coding agents; CacheBlend cuts multi-doc inference 2–4x faster

aimock open-sources API mock for coding agents; CacheBlend cuts multi-doc inference 2–4x faster

Key takeaway

  • CopilotKit released aimock, an open-source mock server that lets CI pipelines for coding agents stay offline by centralizing real API schema validation in one daily job, shipping corrected schemas to npm so all teams benefit from a single source of truth.

  • Separately, LMCache published CacheBlend, a technique that reuses individual cached documents independently rather than forcing strict byte-for-byte prefix matching, delivering 2 to 4x faster processing on multi-document queries and solving a major gap where 90% of cache storage is unused under current caching rules.

3 Key Points

  1. What happened

    CopilotKit released aimock, an open-source mock server that mimics OpenAI, Claude, Gemini, Bedrock, Azure, Ollama, and other APIs. Every day, one central CI job compares real API responses against the mock schema and the official client library's type definitions; when a mismatch is detected, a coding agent updates the schema, runs the full test suite, and ships a patch to npm. Separately, LMCache published CacheBlend (EuroSys 2025 Best Paper Award), a research technique that reuses cached documents independently instead of requiring strict byte-for-byte prefix matching, delivering 2 to 4x faster processing on multi-document queries.

  2. Why it matters

    Teams running hundreds of commits daily through coding agents currently face two friction points: CI tests either hit real API endpoints (expensive) or use stale mocks that pass tests locally but fail in production when the API schema changes. aimock centralizes schema validation so thousands of teams avoid rebuilding the same integration test. On inference, prefix caching (the standard today) fails on common patterns—shuffling documents, adding context mid-conversation, or retrieving multiple RAG results—because any change invalidates the cache; CacheBlend removes that penalty by treating each document as a reusable asset, solving a gap Alibaba Cloud's data shows affects 77% of cache hits.

  3. What to watch

    aimock is available on GitHub at https://github.com/CopilotKit/aimock and npm. LMCache ships inside vLLM, SGLang, and TensorRT-LLM on NVIDIA and AMD GPUs; the repository is at https://github.com/LMCache/LMCache. Hit rates of 60 to 85% are realistic with prompt caching; cached tokens cost up to 90% less than uncached tokens.

Ask the AI about this article →

Context & Analysis

The article addresses two distinct but related pain points in modern AI development: test infrastructure for coding agents and inference efficiency for large language models. The aimock project solves a classic testing debt problem—when teams run hundreds of CI jobs daily, calling real APIs accumulates substantial costs, but using static mock responses creates a false sense of security because provider APIs evolve. aimock's insight is that one central repository can absorb the cost of daily real API validation on behalf of thousands of downstream projects; the corrected schema ships via npm, making the fix automatic once teams upgrade. This model distributes both the cost and the confidence across an ecosystem.

CacheBlend addresses a complementary efficiency problem in inference. Modern systems use prompt caching to make cached input tokens up to 90% cheaper, but the strict byte-for-byte prefix requirement breaks down in practical workflows—retrieving multiple documents for RAG, reordering context, or extending conversation history all trigger full cache misses. Alibaba Cloud's telemetry shows that 77% of cache hits come from only 10% of the KV cache blocks, meaning the other 90% sits unused because prefix matching prevents their reuse. CacheBlend reframes the problem as document-level caching: since tokens overwhelmingly attend to local context within a document, and only boundary tokens cross document lines, the system can reuse each document's cache independently and selectively recompute only those few boundary tokens. This shift from prefix-based to document-based caching recovers the unused 90%, yielding 2 to 4x speedups on multi-document queries and eliminating reordering penalties entirely.

FAQ

What APIs does aimock support?
aimock works with OpenAI, Claude, Gemini, Bedrock, Azure, Ollama, MCP tools, A2A agents, AG-UI event streams, vector databases like Pinecone and Qdrant, and search, speech, image, and video endpoints.
How much faster is CacheBlend than standard prefix caching?
CacheBlend delivers 2 to 4x faster processing on multi-document queries with no quality loss, and eliminates cache misses when documents are reordered—a scenario that forces full recomputation under prefix caching.
Where can I use CacheBlend?
CacheBlend ships inside LMCache, which integrates with vLLM, SGLang, and TensorRT-LLM on both NVIDIA and AMD GPUs.
Daily Dose of Data ScienceRead Original Article

Get the latest Large Language Models news every morning

AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.

Free · takes 30 seconds · unsubscribe anytime

Ask AI

Ask AI anything about this article. Q&As are published on this page for other readers too.

Related Articles

Next articleQwen 3.8 27B scores 52 on Artificial Analysis Intelligence Index

The AI news that matters, in one minute each morning.

Sign up free