fix(models): apply Qwen discounts through OpenRouter#3902
Conversation
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
| }); | ||
| }); | ||
|
|
||
| test('applies custom usage pricing independently of the display percentage', () => { |
There was a problem hiding this comment.
SUGGESTION: Missing applyCustomPricingToModel test for Qwen Plus
The test block covers applyCustomPricingToCost_mUsd for both Qwen Max and Plus, but applyCustomPricingToModel (the display-facing path) is only exercised for Qwen Max. A parallel test for QWEN37_PLUS_MODEL_ID would confirm the display name suffix (20% off) and the discounted pricing fields are produced correctly, and guard against future percentage vs multiplier drift.
Code Review SummaryStatus: 1 Issue Found | Recommendation: Merge Executive SummaryThe latest commit refactors Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files changed in new commit)
Fix these issues in Kilo Cloud Reviewed by claude-4.6-sonnet-20260217 · 538,419 tokens Review guidance: REVIEW.md from base branch |
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Refactor `calculateCustomCost_mUsd` to use `JustTheCostsUsageStats` instead of the legacy `Usage` type. The function now internally calculates `uncachedInputTokens` from the provided usage statistics, simplifying the call site in `processUsage.ts`. Updated tests to reflect the new usage object structure and token property names. Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Summary
custom-pricing.ts.market_cost.Verification
Visual Changes
N/A
Reviewer Notes
Review the ordering in usage processing: abuse reporting and
market_costretain upstream spend before the custom billed price is applied.