Fix Piebald cached input accounting#167
Conversation
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds provider-specific token accounting semantics to distinguish how different LLM providers report cached input tokens. OpenAI includes cache reads in raw input counts; Anthropic does not. A new ChangesProvider-specific token semantics for cache reads
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Additional context on why this change exists: Piebald persists provider-native token usage into its
Splitrail’s normalized stats model expects The first version of this fix tried to infer that behavior from This PR separates those concepts:
Concrete example: This fixes the inflated input/cost accounting for tiered GPT models like |
Summary
Verification
Summary by CodeRabbit
Bug Fixes
Tests