Skip to content

add 1-hour cache write pricing regression tests for Claude Sonnet 4 - #5835

Open
sitara2007 wants to merge 2 commits into
Helicone:mainfrom
sitara2007:main
Open

sitara2007 wants to merge 2 commits into
Helicone:mainfrom
sitara2007:main

Conversation

@sitara2007

Copy link
Copy Markdown

Summary

Adds missing regression tests for 1-hour cache write pricing at both
under-200K and over-200K tiers for Claude Sonnet 4.

Gap

Existing tests cover 5-minute cache writes but not the equivalent 1-hour
case. Anthropic charges 2.0x base input for 1-hour writes (vs 1.25x for
5-minute), making this a material pricing edge case.

Changes

  • Under-200K test: Added write5m, write1h cache details +
    cacheWrite5mCost, cacheWrite1hCost assertions
  • Over-200K test: Added write1h cache detail + cacheWrite1hCost assertion
  • Updated totalCost assertion to include both cache write components

References

  • Anthropic prompt caching pricing: 1.25x (5m), 2.0x (1h)

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@vercel

vercel Bot commented Oct 10, 2026

Copy link
Copy Markdown

@sitara2007 is attempting to deploy a commit to the Helicone Team on Vercel.

A member of the Team first needs to authorize it.

@sitara2007

Copy link
Copy Markdown
Author

Hi @Helicone/maintainers 👋

This PR adds missing regression tests for 1-hour cache write pricing
at both under-200K and over-200K tiers for Claude Sonnet 4.

The CI workflows are queued but need approval to run on this forked PR.
Could someone approve the workflows when you get a chance?

Happy to address any feedback. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant