DigitalOcean Inference Router, Now Cache-Aware: Why the Cheapest Model Isn't Always the Best Deal DigitalOcean has made its Inference Router cache-aware, enabling it to account for cached context when selecting models for agentic sessions, which can reduce costs and latency despite higher nominal pricing. The company reports a 90%+ aggregate cache-hit rate on its workloads using Kimi K3, and illustrates that staying with a warm model can be about 1.6 times cheaper than switching to a nominally cheaper one when cache is discarded. Coinbase CEO Brian Armstrong recently posed the question https://x.com/brian armstrong/status/2070670644577280109 every company scaling AI is asking: how do you keep spend flat while token usage grows exponentially? This isn’t hypothetical. It’s confronting companies across every sector: Usage caps may help control the bill, but they also limit productive work. A better answer is to improve the economics of every request through better defaults, routing, and making caching work for your specific workload scenarios. Today, we’re making DigitalOcean Inference Router cache-aware. In April, we launched preference-aware routing https://docs.digitalocean.com/products/inference/how-to/use-inference-router/ , so our router could match each request to the model that best fit a developer’s task and priorities. Now, it can also account for the value of context that’s already cached. This advances Inference Router from selecting the right model for each request toward optimizing the entire agentic session across quality, cost, and cache locality. With this release, our Inference Router now offers a comprehensive set of controls for you to build an intelligence layer that fits how your team actually works. Caching is a critical consideration when building agents, because they repeatedly send the same large body of context: system instructions, tool definitions, repository context, and an accumulating conversation history. Here’s how top providers are putting caching to work: For agents, caching is not a marginal optimization. It shapes the cost and latency of almost every subsequent model call. At DigitalOcean, we are seeing this first-hand as we scale more models on behalf of customers. With the recent release of Kimi K3 /blog/serving-kimi-k3-inference-engine , we’ve observed an aggregate cache-hit rate of 90%+ across our own workloads as developers use the model for coding and long-horizon tasks; individual workloads will differ. Cache-aware routing changes the economics of model routing. Consider, as an illustration, an agent with 90,000 input tokens already cached on Claude Sonnet 5 out of a 100,000 token context. At the standard pricing https://docs.digitalocean.com/products/inference/details/pricing/ of $2.5 per million input tokens with cache writing enabled and $0.2 per million cached tokens, a 90% cache hit makes the next request cost approximately $0.043 in input tokens. Pricing information is current as of the publication date. While GLM‑5.2 appears cheaper at its $0.7 https://platform.claude.com/docs/en/about-claude/pricing per million uncached input rate, switching models discards the warm cache and forces re-processing of the full 100,000 input token context. On the assumption in this illustration, that request would cost https://docs.digitalocean.com/products/inference/details/pricing/?utm source=chatgpt.com $0.07: approximately 1.6 times more than staying on the nominally more expensive model in this scenario. Sticking with the warm model requires prefilling only the 10,000 uncached tokens; switching requires all 100,000—10x more prompt processing before generation can even begin. That doesn’t translate into a 10x latency increase, since prefill performance varies by model and serving system. But it does explain why a cache-breaking switch can meaningfully increase time to first token, even when the destination model is otherwise faster. Before the launch of cache-aware routing, Inference Router evaluated each request independently. It could correctly determine that another model was more affordable or better suited to the context presented, but didn’t recognize that the request belonged to an ongoing agent session with a warm prompt cache. But the act of switching models can invalidate the existing cache and force the destination model to process the entire prompt again. For agents that repeatedly send large system instructions, tool definitions, repository context, and conversation history, using the “cheaper” model can make the next request more expensive and slower. Another complication is that it can also change model behavior partway through an agent’s loop. When customers told us they needed more control over that tradeoff, we built cache-aware routing. It introduces two complementary mechanisms: explicit model affinity for applications that already manage sessions, and a routing-budget policy that determines when breaking affinity is worth the additional cost. X-Model-Affinity Applications that already maintain session or task identifiers can pass an explicit affinity key with each request: python import os import uuid from openai import OpenAI client = OpenAI api key=os.environ "MODEL ACCESS KEY" , base url="https://inference.do-ai.run/v1/", session id = str uuid.uuid4 messages = user turns = "Help me debug this failing test.", "Here's the stack trace, what's causing it?", "That fixed it, now can you also add a regression test?", for user turn in user turns: messages.append {"role": "user", "content": user turn} response = client.chat.completions.create model="router: