feat(pricing): add gemini-live-2.5-flash-native-audio to model cost map - #38573
Conversation
Missing entry caused a cascade: _model_cost_entry returned {} for
vertex_ai/gemini-live-2.5-flash-native-audio, so _is_audio_only_live_model
returned False, _coerce_response_modalities never coerced TEXT -> AUDIO in
the Vertex setup message, the session hung, and no usage was ever logged.
Add bare key (vertex_ai-language-models provider) and gemini/ prefixed key
(gemini provider) with GA pricing: $0.50/M text in, $3.00/M audio in,
$2.00/M text out, $12.00/M audio out, gemini_native_audio=true.
Also extend the existing parametrized tests to assert the vertex_ai/ prefix
resolves correctly through _model_cost_entry's stripped-prefix fallback.
…ex_ai/chirp-3, vertex_ai/veo-3.1-lite-generate-001
Resolved conflicts in both pricing JSON files (kept our /v1/realtime endpoint addition for vertex_ai entry, plus adopted upstream's supports_prompt_caching and search_context_cost_per_query additions). Also adopted upstream's transformation.py refactor (which dropped _is_native_audio_model), updated tests accordingly: removed the stale test for the now-absent method, added a catalog regression test that reads the JSON file directly instead of relying on the mocked fixture.
Greptile SummaryAdds Gemini Live 2.5 Flash native-audio catalog metadata so realtime model detection and audio-token spend calculation recognize the GA model.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds the Gemini API catalog entry and realtime endpoint metadata for the GA native-audio model; no blocking issue identified. |
| litellm/model_prices_and_context_window_backup.json | Keeps the packaged fallback catalog synchronized with the primary model-cost map. |
| tests/test_litellm/llms/gemini/realtime/test_gemini_realtime_transformation.py | Adds catalog-presence and audio-only detection coverage for the new model spellings. |
Reviews (2): Last reviewed commit: "fix(pricing): add tpm/rpm to gemini/gemi..." | Re-trigger Greptile
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8fa9622. Configure here.
| "supports_vision": true, | ||
| "supports_web_search": true, | ||
| "tpm": 8000000, | ||
| "gemini_native_audio": true |
There was a problem hiding this comment.
Gemini catalog entry missing sibling cost fields
Medium Severity
The new gemini/gemini-live-2.5-flash-native-audio entry sets supports_web_search to true but omits search_context_cost_per_query, and also drops supports_prompt_caching. Both the Vertex GA twin and the Gemini preview alias include those fields, so search grounding on this alias is billed at $0 and caching is treated as unsupported.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 8fa9622. Configure here.
There was a problem hiding this comment.
Good catch, fixed in d517397. Added cache_read_input_token_cost, supports_prompt_caching, and search_context_cost_per_query, matching the preview alias and both Vertex twins.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
….5-flash-native-audio
|
Superseded by the rolling registry PR #38693, which absorbs this change (core pricing verified against https://ai.google.dev/gemini-api/docs/pricing; cache_read/tpm/rpm dropped as not published there). Standing policy: one open model-pricing registry PR at a time. |
… native audio (from BerriAI#38573), anthropic sources Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>


TLDR
Problem this solves:
vertex_ai/gemini-live-2.5-flash-native-audiologged zero usage and $0 spendHow it solves it:
gemini_native_audio: truechirp-3andveo-3.1-lite-generate-001for vertex_ai in the same passUser Flow
Before: a proxy operator using
vertex_ai/gemini-live-2.5-flash-native-audiosees no usage loggedwss://litellm-domain/v1/realtime?model=vertex_ai/gemini-live-2.5-flash-native-audiosession.updatewithmodalities: ["text"]response.donearrivesAfter: the same connection produces a completed response with real usage
wss://litellm-domain/v1/realtime?model=vertex_ai/gemini-live-2.5-flash-native-audiosession.updatewithmodalities: ["text"]response.donearrives with non-zero audio token countsRelevant issues
Linear ticket
Pre-Submission checklist
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
Proof requires a live proxy with this model deployed; connecting once it is available on the gateway
Type
🐛 Bug Fix
Caveats (if any)
Low
Final Attestation