Log in·Sign up
BestRelay

Back to the Journal

Repeated Context Becomes a Cheaper Computational Path

A cache read is cheaper because it avoids repeating part of the model’s input work. The model still receives the cached context, but the provider can reuse an earlier representation instead of processing every token from the beginning. That distinction becomes clear when the request is followed from text to billing.

Every request begins as tokenized model input

First, an application assembles a request from system instructions, conversation history, tools, documents, and the latest user message. The provider converts that text into tokens, the units used to measure model input. For a long coding session, the stable instructions and earlier conversation may account for most of the prompt, while the newest question is comparatively small.

The model must normally interpret this sequence in order. It builds internal representations for the tokens and uses them to predict the next output. This initial processing is commonly called a fresh input or a cache write path, because the provider may preserve the resulting state for later reuse.

Stable prompt prefixes create reusable computation

Next, the provider identifies a section that matches an earlier request. Cache systems usually work best with a stable prefix: the same instructions, tools, reference material, and conversation history in the same order. A changed word near the beginning can prevent reuse for everything after that point, depending on the provider’s matching rules.

The provider stores enough intermediate information to resume processing at the end of that matching section. It does not need to store a complete answer, and it does not turn the model into a database. It stores computation that can support a later request using the same model and compatible settings.

A cache read resumes processing after the match

When the next request contains that prefix, the provider verifies the match and loads the saved representation. The model then processes only the uncached suffix, such as a new instruction, a new file excerpt, or the latest conversation turn. It still performs meaningful work, but the repeated portion no longer requires the full initial pass.

This is the central economic event. The provider has already paid the computational cost of interpreting the repeated prefix. Reusing its representation consumes storage and retrieval resources, yet those resources are usually less expensive than rebuilding the entire representation. The saving grows as the cached portion becomes larger.

Provider accounting separates reads from writes

Billing reflects this distinction through separate token categories. A cache write records tokens processed and stored for possible reuse. A cache read records tokens served from that stored computation. Fresh input usually carries the higher processing price, while cache reads commonly have a lower rate because they require less new computation.

The exact rates, cache lifetime, minimum size, and matching rules belong to each model provider. A cache read is not free, and a cache write may include a temporary storage charge. The useful comparison is between the cost of repeatedly rebuilding a stable prefix and the combined cost of writing it once, reading it later, and processing each new suffix.

Request shape determines the savings available

Consider a request with ten thousand stable tokens and five hundred changing tokens. Without reuse, every call processes ten thousand five hundred tokens as fresh input. With a successful cache, the first call writes the stable section, while later calls read those ten thousand tokens and process only the changing section as new input.

The result is both lower input cost and lower latency for repeated context. Savings disappear when the prefix changes frequently, requests are too short, the cache expires, or the application places changing content before stable content. Careful prompt organization therefore affects the bill as much as the model choice.

A relay preserves the provider’s cache semantics

BestRelay is designed as a quality-first API relay: it forwards each request to the official model named in that request, without substituting another model. That matters for caching because model identity, provider rules, and token accounting must remain aligned. A workload using Claude Sonnet 5.5, for example, should receive that named model’s behavior and cache treatment.

BestRelay bills pay as you go from the token counts reported by the provider. Cache reads and cache writes appear as separate priced categories, so an application can inspect whether its prompt structure is producing reuse rather than assuming that every request is equally expensive. The service works with Claude Code, Codex, Gemini CLI, and any OpenAI SDK through its compatible relay interface.

Create a BestRelay account to measure repeated-context usage against provider-reported cache reads and writes. Members can also earn referral commission when people they invite top up, which is separate from the technical pricing mechanism.

Measurement confirms whether reuse is working

Finally, compare fresh input tokens, cache-write tokens, cache-read tokens, and output tokens over several requests. A healthy repeated workflow shows a write on the first use, reads on subsequent uses, and a changing suffix that remains comparatively small. If reads stay at zero, inspect prefix stability, model selection, cache duration, and provider eligibility before changing the application.

The lower price of a cache read is therefore a practical consequence of avoided computation. The provider is reusing work already performed, while the application pays for the smaller amount of processing that still needs to happen.

Want to try the models discussed here? Sign up