Skip to content

Conversation

@sestinj
Copy link
Contributor

@sestinj sestinj commented Oct 29, 2025

Summary by cubic

Add cache_write_tokens and cache_read_tokens to Anthropic prompt_tokens_details so clients can see cache creation vs read usage in prompt token metrics. Keeps existing cached_tokens behavior for backward compatibility.

  • New Features
    • prompt_tokens_details.cache_write_tokens maps to usage.cache_creation_input_tokens
    • prompt_tokens_details.cache_read_tokens maps to usage.cache_read_input_tokens
    • prompt_tokens_details.cached_tokens still maps to read tokens

@sestinj sestinj requested a review from a team as a code owner October 29, 2025 23:00
@sestinj sestinj requested review from tingwai and removed request for a team October 29, 2025 23:00
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Oct 29, 2025
@github-actions
Copy link

⚠️ PR Title Format

Your PR title doesn't follow the conventional commit format, but this won't block your PR from being merged. We recommend using this format for better project organization.

Expected Format:

<type>[optional scope]: <description>

Examples:

  • feat: add changelog generation support
  • fix: resolve login redirect issue
  • docs: update README with new instructions
  • chore: update dependencies

Valid Types:

feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

This helps with:

  • 📝 Automatic changelog generation
  • 🚀 Automated semantic versioning
  • 📊 Better project history tracking

This is a non-blocking warning - your PR can still be merged without fixing this.

@github-actions
Copy link

🔄 Review In Progress

Continue AI is analyzing the code changes...

📊 Review Scope:

⏱️ This typically takes 1-2 minutes.

View live progress →


@sestinj sestinj merged commit 091b876 into main Oct 29, 2025
44 of 46 checks passed
@sestinj sestinj deleted the nate/add-anthropic-cache-token-details branch October 29, 2025 23:01
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PRs Oct 29, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2025
@sestinj
Copy link
Contributor Author

sestinj commented Oct 29, 2025

🎉 This PR is included in version 1.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@sestinj
Copy link
Contributor Author

sestinj commented Nov 7, 2025

🎉 This PR is included in version 1.32.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

released size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants