Vibeleaderboard
← All Intel
Intel / article

Prompt Caching Sticky Routing

Source
openrouter.ai
Author
OpenRouter
Date

Context

OpenRouter's caching guide explains why repeating the same prompt does not necessarily produce a cache saving: the next request may reach a different provider that lacks the stored content. Sticky routing tries to send subsequent requests back to the provider that holds it.

A stable _id identifies the conversation even when an agent rewrites its opening messages. With that , routing becomes sticky after the first successful request. The reusable prompt content must still satisfy the provider's caching requirements and remain available before expiry. The cached_tokens usage shows whether reuse actually occurred; keeping requests together is only one part of making caching work.

Terms in this piece · Glossary
  • Session — One conversation or piece of work as a harness keeps it: a record of messages, tool calls and observations that can be saved and resumed.
  • Identifier — A value that names exactly one record within a stated system, such as S-003 in the committee's table.
  • Field — One named piece of a record, such as name or approved_on; a record is one entity's set of values, one per field.
  • prompt caching — Reusing the model's processed form of a repeated prompt prefix so subsequent calls skip re-reading it, cutting cost and latency substantially.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Read the source openrouter.ai
More from OpenRouter
Recommended reads