Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Anthropic’s pricing data to include a separate cache-write input token price for a 1-hour TTL, enabling more granular cache cost modeling for Anthropic models.
Changes:
- Added
cache_write_input_token_1hpricing entries to Anthropic model rate tables (and default rates).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "cache_write_input_token_1h": { | ||
| "price": 0 | ||
| } | ||
| }, | ||
| "calculate": { |
There was a problem hiding this comment.
cache_write_input_token_1h is added to the default rate table, but calculate.request still only uses cache_write_tokens * rates.cache_write_input_token. Unless the downstream calculator dynamically switches rate keys, 1h cache-write usage will never be billed (or will be billed at the wrong rate). Consider extending the calculation to include a separate term for 1h cache writes (with a distinct usage field) multiplied by rates.cache_write_input_token_1h.
No description provided.