Skip to content

refactor(ai-gateway): clarify usage/generation cost mismatch warning - #4869

Merged
chrarnoldus merged 1 commit into
mainfrom
comfortable-avatar
Jul 30, 2026
Merged

refactor(ai-gateway): clarify usage/generation cost mismatch warning#4869
chrarnoldus merged 1 commit into
mainfrom
comfortable-avatar

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Rewords the dev-only warning in processTokenData that fires when the provider's generation lookup yields a different cost_mUsd than the response's own usage payload:

  • Before: DEV ODDITY / WARNING: Usage stats do not match generation data: followed by two unlabeled [a, b] arrays.
  • After: an explicit message stating what is being compared, with labeled values (generation vs response) for cost_mUsd and cacheDiscount_mUsd, plus a comment noting the generation lookup values win.

No behavior change; warning text and structure only.

@chrarnoldus chrarnoldus self-assigned this Jul 29, 2026
@kilo-code-bot

kilo-code-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Pure logging/message rewording in processTokenData's cost-mismatch warning with no behavior change; no issues found.

Files Reviewed (1 files)
  • apps/web/src/lib/ai-gateway/processUsage.ts

Reviewed by claude-sonnet-5 · Input: 12 · Output: 1.6K · Cached: 197.6K

Review guidance: REVIEW.md from base branch main

@chrarnoldus
chrarnoldus merged commit f5c2e90 into main Jul 30, 2026
16 checks passed
@chrarnoldus
chrarnoldus deleted the comfortable-avatar branch July 30, 2026 08:40
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.

2 participants