Uh oh!
There was an error while loading. Please reload this page.
fix(eval): update DeepSeek V4 Flash pricing to current published rates - #3153
Conversation
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan includes up to 3 reviews per rolling hour; 1 remains after this review. 📝 WalkthroughSummaryThis PR updates DeepSeek V4 Flash pricing to current published off-peak rates:
Peak-hour rates are twice the off-peak rates. Metering records do not include request timestamps, so reported costs remain normalized API-equivalent estimates. They are not invoices. Runs across peak hours can incur up to twice the normalized amount. DesignThe PR extends the existing pricing table and metering path. It does not create a parallel path. The change is small and coherent. The added documentation is necessary because the flat pricing table cannot apply UTC time-dependent rates without request timestamps. No code or tests can be deleted or simplified without reducing pricing coverage or cost-reporting clarity. ValidationThe PR reports 13/13 tests passing and clean formatting checks. Direct check output was not provided, so the final status of required checks remains unverified. Review-relevant risksThe pricing update changes user-visible DeepSeek V4 Flash cost estimates. Material changes in user-visible behavior require independent human review under repository policy. No public contract, security, licensing, release, or governance effect was identified in the current diff. The person performing the merge must review the final diff. A maintainer makes the final determination. WalkthroughDeepSeek V4 Flash metering now uses updated off-peak input, output, cache-read, and cache-write rates. The code documents peak-hour variation and timestamp-free cost normalization. ChangesDeepSeek V4 Flash metering
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk:🔵 Low · up to The PR replaces stale DeepSeek V4 Flash pricing with normalized off-peak rates, improving reported cost accuracy. It is mergeable with owner awareness that the existing billing test will not catch an incorrect rate value, so an independent pricing-value check remains a useful follow-up. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Updates Eval’s DeepSeek V4 Flash pricing constants to match currently published rates and documents the new peak/off-peak pricing model while keeping a flat table (since metering checkpoints lack per-request timestamps).
Changes:
- Document DeepSeek’s time-of-day (peak/off-peak) pricing and clarify that reported cost is a normalized API-equivalent, not an invoice.
- Update
DEEPSEEK_V4_FLASH_COSTto the off-peak band values (so true bills during peak windows can be up to 2× the reported normalized cost).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0332dbab-7f85-42ac-b78a-c2bab0ed2442
📒 Files selected for processing (1)
packages/eval/src/provider-metering.ts
Included review availability: Your plan includes up to 3 reviews per rolling hour; 2 remain after this review.
Uh oh!
There was an error while loading. Please reload this page.
DeepSeek's published pricing changed since the table was written, and it is now time-of-day dependent: peak hours (01:00-04:00 and 06:00-10:00 UTC) bill double the off-peak rates. The old flat table (0.14 miss / 0.0028 hit / 0.28 output) matches neither band and understated real spend by roughly 2.4x on a mostly off-peak run. The metering checkpoint records aggregate usage without request timestamps, so a flat table remains the only representable shape. Normalize at the off-peak band (0.22 miss / 0.007 hit / 0.66 output) and say so in the comment: reported cost is a normalized API-equivalent, not an invoice, and a run that straddles peak hours bills up to 2x. Follow-up from the #2971 review. Generated-by: Claude Code
9c37641 to
51626cbCompareAstro-Han
commented
Aug 17, 2026
Self-merge fast path: one-file update of a static pricing table and its comment — low impact, trivially reversible, outside the protected areas. Required checks pass. Reviewed by @Astro-Han. Follow-up from #2971's non-blocking review item. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Follow-up from the #2971 review (@M4n5ter's first non-blocking item): the static DeepSeek pricing was stale.
DeepSeek's published V4 Flash pricing is now time-of-day dependent — peak hours (01:00–04:00 and 06:00–10:00 UTC) bill $0.44/M cache-miss input, $0.014/M cache-hit input and $1.32/M output; all other hours bill half. The old flat table ($0.14 / $0.0028 / $0.28) matches neither band and understated real spend by roughly 2.4× on a mostly off-peak run.
The metering checkpoint records aggregate usage without request timestamps, so a flat table remains the only representable shape. This updates the table to the off-peak band and documents the normalization: reported cost is a normalized API-equivalent, not an invoice, and a run straddling peak hours bills up to 2×. Rates fetched 2026-08-17 from https://api-docs.deepseek.com/quick_start/pricing.
Verification
node --test dist/__tests__/external-subject.test.js— 13/13 pass, including the billing-identity test that reads the table symbolically.npm run format:check— clean.AI use
Select exactly one:
Tool(s) and scope: Claude Code authored the change and this PR body; a human contributor reviews the final diff and owns the merge decision. The commit carries a Generated-by trailer.
Checklist
Does this PR entail a change in behavior?