Hacker News

Favorites Setup
Comment by dakolli | original | Hy4 preview
[−]dakolli · 2026-08-29 Sat 21:43 UTC · link
That's because Deepseek invented the paradigm of prompt caching, they are the SOTA when it comes these techniques. Despite them open sourcing all their research, nobody beats them.

edit: I do wish openrouter would let you sort providers by Cache Hit % and Cache cost. These are the only things that matter to me at this point when choosing a provider.

[−]minimaxir · 2026-08-29 Sat 22:10 UTC · link
You can click the table headers to sort Ascending/Descending.
[−]dakolli · 2026-08-29 Sat 22:25 UTC · link
You can sort by the cost cache cose, but you cannot by cache hit %. You have to click on the provider and see what their cache hit % is. A provider could have a super low cache cost, but a 50% cache hit percentage, making the cheap price of cache read's meaningless.
[−]andai · 2026-08-29 Sat 22:53 UTC · link
Wait, what does that number mean? I thought it always uses the cache price when the prefix matches.
[−]dakolli · 2026-08-29 Sat 23:41 UTC · link
When the prefix matches a request sent to the same Providor. The thing is the TTL is different for each provider, some cache for 5 minutes some cache for 1hr. Its ideal to only use one provider per agent session / and per model with the best cache hit % if you care about costs.
[−]andai · 2026-08-30 Sun 12:29 UTC · link
But before 5m the hit rate is 100%, and after it's 0%? Why is there a probability?

Is there some stochastic process that takes place during those 5 minutes that determines whether or not you get the discount?

[−]Bolwin · 2026-08-29 Sat 22:20 UTC · link
Cache hit % on openrouter is not a good metric, it's mainly driven by openrouter's own provider juggling than the providers themselves
[−]dakolli · 2026-08-29 Sat 22:30 UTC · link
This is not true, there isn't even a way to see a cache hit % model for a specific model, that wouldn't make any sense. You are confusing what I'm saying with cache cost, that has nothing to do with effective cache hit %. I'm talking about when you click on a specific provider for a specific model, you can scroll down on the view and see their cache hit % for that model [0].

These cache Hit % are accurate, I've done a ton of testing of this myself. The cache hit % is one of the most important metrics as far as estimating cost. There are many providers with cheap cache reads, but have an effective cache hit % of 30%, making their cheaper cache pricing meaningless compared to another provider who charges more but has a 85% cache hit percentage.

[0]: https://openrouter.ai/deepseek/deepseek-v4-flash-0731?endpoi...

scroll down on the provider/model card and you'll see a field called cache hit %, its different for every provider/model.

I don't use routing on openrouter, I strictly use models with a single provider and no fallback, at least for use with harnesses its pretty dumb to route requests to multiple providers you are busting your cache every other request and increasing costs by 20-50%.

[−]Implicated · 2026-08-29 Sat 23:52 UTC · link
I think you're arguing the same general point that the person you're responding to is. But you're saying he's not understanding - he understands that they report a cache hit % but you can't look at that public metric with any level of accuracy _because_ most people aren't pinning their providers and they _are_ getting juggled around which is bringing that metric down. That's not to say that specific providers might have issues or worse cache implementations - but it stands that if openrouter is juggling the requests back and forth by default then _that alone_ is breaking caches on those requests in huge numbers.
[−]dakolli · 2026-08-30 Sun 00:46 UTC · link
I know what they're saying. Why would openrouter calculate it thay way lol. They obviously dont. Think for a sec, they arent idiots.
[−]RussianCow · 2026-08-30 Sun 06:45 UTC · link
How else would you expect them to calculate it?
[−]dakolli · 2026-08-30 Sun 12:34 UTC · link
Do you really think they're docking points because cache invalidation due to provider switching? Seriously llms are frying ya'lls brain.
[−]RussianCow · 2026-08-30 Sun 16:48 UTC · link
They're not "docking points", they're calculating it in the most straightforward way. If I start a session and the majority of requests are sent to Provider A, and my last request gets routed to Provider B, I have a 0% cache hit rate with Provider B. I'm very curious how else you expect this to be calculated? Do you think they're completely omitting requests that switch providers mid-session?

FWIW, I get significantly higher than listed cache hit rates when I pin my session to a specific provider, which is further evidence of the above.

[−]irthomasthomas · 2026-08-30 Sun 09:05 UTC · link
Something is up. Deepseek cache hit rate on zenmux is 98%, but only 85% via openrouter.
[−]andai · 2026-08-29 Sat 22:50 UTC · link
OpenRouter randomizes which provider gets your request by default right? I think you have to pass a specific provider in the request to prevent that. (Or set up a preset or something.)

This behavior makes it so you don't benefit much from the caching, unless you pin it to a single provider.

[−]Implicated · 2026-08-29 Sat 23:49 UTC · link
> OpenRouter randomizes which provider gets your request by default right?

I'm not sure it's wholey accurate to say they "randomize" the provider, rather my assumption based on usage is that it's something like cheapest-ish/responded to the request within some reasonable-ish time/etc algorithm that chooses the provider on each request - which seems, remarkably questionable in terms of optimizing for user experience or hidden user costs.

> This behavior makes it so you don't benefit much from the caching, unless you pin it to a single provider.

I so very much recommend this approach. My avenues that automate llm calls to openrouter are setup to make api reqs to openrouter to determine best price/response/etc and then pin the request to that (and, preferably, a fallback if there's reasonable difference between #1 and #2) provider for that session. Otherwise you're going to have a bad time.

I'd imagine this could make things interesting in cases where one provider is offering different quants than the others and openrouter is just swapping you back and forth on a long agentic session.

[−]fc417fc802 · 2026-08-30 Sun 00:46 UTC · link
> This behavior makes it so you don't benefit much from the caching

I don't believe this is correct? AFAIK once it routes you to a provider for a given conversation that choice is sticky unless you hit technical difficulties. (It's more complicated than that, they recently added named routing strategies that you can append to the model name.)

IMO the relevant metric is cache TTL which isn't typically published AFAIK.

[−]RussianCow · 2026-08-30 Sun 06:41 UTC · link
This is very much NOT my experience in practice, even though it's how I would expect it to work. OpenRouter will happily bounce you between several providers (none of which have downtime) even within the same session. Requesting specific providers is the only way I've been able to hit a cache rate above 90%.
[−]ralusek · 2026-08-29 Sat 22:54 UTC · link
> Cache hit %

I thought you had to actively manage caches, do you not?

[−]orbital-decay · 2026-08-29 Sat 23:04 UTC · link
>Deepseek invented the paradigm of prompt caching

Caching was always here, you don't need to do anything special to get it on a single user local backend running a base model or a chatbot in the first place. Among commercial providers, OpenAI adopted it in 4o first.

[−]dominotw · 2026-08-30 Sun 13:06 UTC · link
> open sourcing all their research,

is this true?

[−]gpugreg · 2026-08-30 Sun 15:49 UTC · link
Not all their research, but certainly a lot: https://github.com/orgs/deepseek-ai/repositories?q=sort%3Ast...