iCreatAI News
Skip to content
Trending storyUpdating

OpenRouter test: system prompt timestamp causes cache misses

1 reports1 sources20 hr agoUpdated

Understand this story

AI overview

OpenRouter replayed the same 40-step coding session across six context configurations and found that the AI Agent cost gap mainly comes from one line at the start of the system prompt: placing a timestamp at the top of the system prompt dropped cache hit rate from 95% to 0 and raised the cost of the same session from $0.084 to $0.658. The cheapest configuration truncates each tool result only once when writing it to history, costing $0.054 with 36% fewer input tokens, while still hitting the cache 95% of the time. The test used openai/gpt-6-luna for every request, reasoning.effort set to low, one session_id per session, and relied on OpenAI's automatic caching; OpenRouter says savings will differ with other providers that have different cache pricing. Its sticky routing sessions expire after 60 minutes without requests, which is separate from the provider's own prompt cache lifetime.

AI overview based on source reports · Updated 41 min ago

Coverage timeline

Follow the coverage to explore different perspectives.

Dec 1
  1. OpenRouter AnnouncementsFeatured
    How to Reduce Token Usage in AI Agents (Measured)

    A replay of a 40-step coding session through the OpenRouter API across six context setups found that a timestamp at the top of the system prompt broke prompt caching and made the same session cost 7.8 times more ($0.658 vs $0.084). Capping each tool result once when it enters the history was the cheapest setup at $0.054, with input down 36% and 95% still cached, while re-trimming old tool outputs on every step cut input tokens by 60% but cost 3.1 times more because editing old messages broke the cache. Chunked compaction shrank the final prompt from 260K to 63K tokens, but re-summarizing an earlier summary dropped accuracy to 1 of 4.

Activity for this story

Not enough continuous observations to show a trend yet.