> I find it really weird that Anthropic uses only a five minute cache on the API.
You can set 5 minute or 1 hour with API requests. It's the user's choice, not something they force on you. You get the cheapest option (5 minutes) if you don't specify the time.
The API is used for a lot more than agentic coding. I would not be surprised if 5 minute was preferred on average across all types of usage.
If Anthropic set it to the more expensive option by default, we'd be reading articles about people complaining how evil they were for defaulting to the more expensive option.
I have to wonder if you have even coded with any of these APIs before. I have been using them far before caching was even an option and for a lot of workflows you build you don’t necessarily want to use any caching. These APIs are not that complex and I am kind of shocked people would even think it’s a footgun. There are a handful of configurable items and if this a footgun I fear for engineering.
yeah, not sure why you're downvoted, but the API is clearly for using Claude in your products that you serve to your users. It's also why it's priced higher since it's assumed to be close to where you make money. It's the same with cloud computing, where clouds could charge 1000x the involved compute for some per-access DB, but you wouldn't run a nuclear reactor simulation on Firebase.
More often than not, they’ve come out looking disingenuous. Maybe they need to hire a better customer relations leader - someone that gets ahead of the problem.
Their API customers should know about changes affecting them well ahead of time. They should have a zero surprise policy around any change that influences cost (cache is one such thing, price difference between a cache hit/miss is 2x-5x input cost per request).
There's so much hysteria around Anthropic that there's no point in them hiring a customer relations person, HN has totally lost the plot when it comes to them
> The API is used for a lot more than agentic coding. I would not be surprised if 5 minute was preferred on average across all types of usage
These vendors are interchangeable, the business models and sectors are largely the same, I doubt there’s a purely business reason behind that decision, likely a technical leadership decision
The more opinionated a vendor is within a category that’s merging, the worse the user experience
And about your second point, Anthropic is not exactly a friend. It’s dubious to be knocking open models the way they do, while simultaneously restricting free use for others. That’s not a normal thing to do
It's highly workload dependent whether the (cheaper to write) 5 min cache or 60 min cache ends up being cheaper. For my co's workforce we went with 60 min, but it's basically a wash
It's not. I've done the analysis on my usage and 5m is cheaper. From talking with others, this seems to be typical. The default is what's cheapest for most users.
The root comment mentions commands that take over five minutes to complete. How often is the agent doing that, versus something quicker? Usage tends to be, the agent does a ton of quick back and forth actions with directory listings and edits and file reads, and then after many quick rounds it eventually kicks off some slower compile/test/run stage which might exceed five minutes. If you use the 1h cache then that slower stage might be cheaper, but all of those quick rounds leading up to it are definitely more expensive. For 1h to work out in your favor, you need a substantial proportion of your work to wait between 5-60 minutes between rounds, including all those little back and forth rounds that happen while the agent is working and barely appear in the UI. This isn't very likely.
This is a place where it'd probably good if there wasn't a default set. I think we leap too readily to providing defaults for settings without thinking through whether the value is something the user should be intentional about declaring or leaving as-is.
Giant footgun? Are we all imbeciles? I am truly confused what folks like yourself are arguing. These APIs have a handful of items you can tune. You have to opt into caching via API already. Why is this a footgun? Are we saying an engineer who has made the decision that their work benefits from caching (which costs more) can not understand that it defaults to the lower cache limit?
Given the massive opacity around tokens and how they're used in closed systems we interact with I'm often surprised when discussions around them just assume there is no underhandedness involved in inflation or controlled deflation to maximize revenue.
You can set 5 minute or 1 hour with API requests. It's the user's choice, not something they force on you. You get the cheapest option (5 minutes) if you don't specify the time.
https://platform.claude.com/docs/en/build-with-claude/prompt...