fix(pricing): add Gemini 3.x pricing snapshots and normalize provider - #31382
fix(pricing): add Gemini 3.x pricing snapshots and normalize provider#31382Gautam-J wants to merge 1 commit into
Conversation
|
@maintainers FYI this change was completely made by my hermes-agent - Samantha (from "Her"). I did review the code myself, and i have verified that costs for these models are showing up fine on my dashboard instance. |
…h-lite-preview entry Extends resolve_billing_route to include the full set of gemini profile aliases (google, google-gemini, google-ai-studio) alongside the already- covered gemini and google-gemini-cli names, so all entry points map to the google pricing table. Adds the gemini-3.1-flash-lite-preview pricing entry that was present in the competing fix (NousResearch#31382). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This overlaps with #32404. Both fix the same root issue but cover different gaps:
#32404 has since been updated to cover all aliases including |
|
Thanks for identifying the direct-Gemini accounting gap. The premise remains valid on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
|
Closing — the route fix + Gemini 3.x pricing this PR proposed landed on main via #73516 (salvage of #60063 plus follow-ups). You were the earliest submitter to identify the missing resolve_billing_route() branch and the missing Gemini 3.x snapshot entries (May 24, ahead of both #32404 and #60063) — credited here and in the salvage PR. The merged version covers your route branch (google/gemini + aliases), your 3.5-flash / 3.1-flash-lite(+preview) / 3-flash-preview entries, and adds 3.6-flash. Thanks @Gautam-J! |
What does this PR do?
This PR fixes a bug where sessions using Google Gemini models (via the gemini provider) would display estimated costs as $0.00 (or n/a) in the Web Dashboard, /insights, and CLI status bar.
It solves two problems:
This PR normalizes Gemini provider aliases during billing route resolution and seeds standard pricing snapshots for the 3.x family, enabling accurate local cost metrics.
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Run the targeted pricing test suite to ensure mapping and math calculations work flawlessly:
bash
pytest tests/agent/test_usage_pricing.py
Verify in a live session that costs are now actively logged and displayed on subsequent turns when using provider: gemini and any of the supported 3.x models.
Checklist
Code
Documentation & Housekeeping
Screenshots / Logs
bash
tests/agent/test_usage_pricing.py ............... [100%]
============================== 15 passed in 0.86s ==============================