← Back to Blog

OpenRouter Prompt Caching + Sticky Routing: How Multi-Turn Agent Costs Just Dropped

By Eric Bush · July 22, 2026 · 6 min read

Server infrastructure with glowing network connections representing cached routing

If you run multi-turn agent sessions — coding assistants, research loops, agentic workflows — you already know the pain: each turn re-sends the entire conversation history, and you pay full input price every time. OpenRouter's combination of prompt caching and sticky routing changes that equation dramatically. Let's quantify exactly how much.

What Changed: Caching Meets Routing Affinity

Prompt caching itself isn't new — Anthropic and OpenAI both offer it natively. The problem is that OpenRouter load-balances across multiple provider nodes. Without routing affinity, your cached prefix lives on Node A, but your next request hits Node B — cache miss, full price.

Sticky routing solves this by pinning a conversation to the same node for its entire lifetime. Combined with prompt caching, this means your growing conversation prefix is cached once and reused on every subsequent turn. The result: input token costs drop by 80–90% on repeated context after the first turn.

The Economics of a 50-Turn Agent Session

Consider a typical coding agent session: 50 turns, each building on the previous context. The system prompt plus accumulated conversation grows linearly. By turn 50, you're sending roughly 80K–120K tokens of context on every request, but only the last user message (perhaps 200–500 tokens) is new.

With prompt caching at standard provider rates (cached input typically priced at 10% of full input), the math shifts enormously. Let's model a realistic 50-turn session with an average of 60K cached input tokens per turn (the prefix) and 400 new input tokens per turn.

Cost Comparison: 100-Turn Coding Session

Now let's push further — a full 100-turn coding session, the kind you see with autonomous coding agents working through complex refactors. Assumptions: average 80K cached prefix tokens per turn, 500 new tokens per turn, average 800 output tokens per turn.

Model Input $/1M Output $/1M No Cache (100 turns) With Cache + Sticky Savings
Claude Sonnet 4.6 $3.00 $15.00 $25.35 $4.77 −81%
GPT-5.6 Sol $5.00 $30.00 $42.90 $7.30 −83%

Methodology: Without caching, total input cost = (avg 80K prefix + 500 new) × 100 turns × input rate. With caching, cached prefix billed at 10% of input rate: (80K × 0.1 + 500 × 1.0) × 100 turns × input rate. Output cost is identical in both scenarios: 800 × 100 turns × output rate. The savings percentage reflects total session cost including output.

Why Sticky Routing Is the Missing Piece

Without sticky routing, cache hit rates on OpenRouter were unpredictable. You might get 40–60% hit rates depending on load and node count. With sticky routing enforced, you should see 95%+ cache hit rates on turns 2+, assuming the prefix is stable (which it is in multi-turn conversations where you append, not rewrite).

The practical impact: OpenRouter becomes cost-competitive with direct API access for agent workloads, while still offering fallback routing and model switching between sessions.

When This Matters Most

The savings scale with conversation length and prefix size. Short 5-turn chats see modest benefits — maybe 30–40% savings. But the sweet spot is exactly where costs hurt most: long-running agents with large system prompts, tool definitions, and accumulated context. A 100-turn session with a 10K-token system prompt + tools sees the most dramatic improvement.

Scenarios that benefit most:

Autonomous coding agents — long sessions with growing file context
Research/browsing agents — accumulated findings as prefix
Customer support bots — long conversation threads with knowledge base prefixes
Multi-step planning agents — chain-of-thought history carried forward

Caveats and Limitations

A few things to keep in mind: cached tokens still incur some cost (typically 10% of input rate, not zero). Sticky routing adds latency constraints — if your pinned node is overloaded, you wait rather than spilling to another. And cache entries have TTL limits (usually 5–10 minutes of inactivity), so paused sessions may lose their cache.

Also, this doesn't help with output costs at all. For models like GPT-5.6 Sol at $30/1M output tokens, output remains the dominant cost in generation-heavy workloads regardless of caching.

Bottom Line

For multi-turn agent workloads, OpenRouter's caching + sticky routing combination is one of the most impactful cost reductions available today. A 100-turn Claude Sonnet 4.6 session drops from ~$25 to ~$5. GPT-5.6 Sol sessions drop from ~$43 to ~$7. If you're building or running agents through OpenRouter, enabling these features is a no-brainer.

Want to estimate costs for your own agent workflows? Try our AI cost calculator to model different session lengths, models, and token volumes — and see how prompt caching changes your monthly bill.

Want to calculate exact costs for your project?

Frequently Asked Questions

How much does OpenRouter prompt caching save on multi-turn agent sessions?

For long sessions (50–100 turns), prompt caching with sticky routing can reduce total costs by 80–83%, primarily by cutting repeated input token charges to roughly 10% of their full price.

Does sticky routing work with all models on OpenRouter?

Sticky routing is available for models that support prompt caching through their providers (Anthropic Claude models, OpenAI GPT models). Check OpenRouter's documentation for the current supported model list.

What's the difference between prompt caching with and without sticky routing?

Without sticky routing, requests may hit different nodes and miss the cache entirely. Sticky routing pins your session to one node, ensuring 95%+ cache hit rates on subsequent turns.