Hacker News new | ask | show | jobs
by santiago-pl 15 hours ago
That's correct - cache lifetime differs per provider.

Today GoModel has session affinity for load balancing (6 hour TTL by default) and api keys rotation.

As for fallback:

1) Yes, you lose the prompt caching in this case - but usually it's better to keep your app/agent working than to save money here.

2) Actually your comment inspired me to add this... As of today the session is not sticky to the fallback target - but I think it's reasonable to do it by default (with an option to opt-out)

I'd like to mention that we also have a more advanced provider cache awareness for the early Pro/commercial features which can save you money - prompt compression / intelligent routing.

1 comments

Umm yeah sticky fallback by default sounds right. But when a fallback happens can you show the cost of a lost cache. So people can see their loss. And a small question, does it send a request to the provider where the conversation prefix is already cached?
Yes, it sends the request to the provider where it was cached.

The load-balancing strategy (failover included) doesn't know whether the cache is still warm or not.

The idea of showing cost of a lost cache is sound. I need to think about how to show it. The data is already there.