fix(pricing): add the Vertex AI Gemini Live GA models and correct the preview - #36886
fix(pricing): add the Vertex AI Gemini Live GA models and correct the preview#36886marty-sullivan wants to merge 2 commits into
Conversation
… preview Vertex serves two GA Live models and neither had a cost map entry, so every Live session billed $0. Adds gemini-live-2.5-flash (half-cascade, global endpoint only) and gemini-live-2.5-flash-native-audio (native audio, regional only), each as a bare key and a vertex_ai/ key. The existing gemini-live-2.5-flash-preview-native-audio-09-2025 entry priced text input at $0.30 per 1M, which is gemini-2.5-flash's rate, not the Live API's published $0.50. Corrected on that entry and its gemini/ twin. Native-audio Live only emits audio: Vertex closes the socket when responseModalities asks for TEXT, so supported_output_modalities on those entries is now audio only. supported_regions comes from BidiGenerateContent setup probes across 22 Vertex locations, ordered so a caller in an unsupported region falls back to us-central1. Also sets mode to realtime on the Gemini Live entries that said chat while serving only /v1/realtime, so health checks pick the realtime probe.
Greptile SummaryAdds pricing and capability metadata for the Vertex AI Gemini Live GA models and corrects existing Gemini Live metadata.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains in the review’s eligible findings. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds and corrects Gemini Live pricing, capability, modality, region, and realtime metadata; no eligible follow-up finding was identified. |
| litellm/model_prices_and_context_window_backup.json | Mirrors the primary model-cost-map updates; no eligible follow-up finding was identified. |
Reviews (4): Last reviewed commit: "fix(pricing): price Gemini Live image in..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The new Live entries carried no input_cost_per_image_token, so image tokens fell through to input_cost_per_token and billed at the $0.50/M text rate instead of $3.00/M, a 6x under-bill. Image input matters more on Live than the name suggests: Gemini reports a Live video stream as a sequence of frames under the IMAGE modality, so a camera feed is billed entirely through this field, and VIDEO never appears in a Live session's usage. Google documents video input as "roughly 258 tokens per second", and a single JPEG frame measured exactly 258 tokens against Vertex, so one frame is one second of video for billing. $3.00 per 1M tokens is Google's non-text Live input rate, on ai.google.dev/gemini-api/docs/pricing as "$3.00 (audio / video)" and on the Vertex generative-ai price sheet, matching the audio rate already in these entries. Applied to both the bare and the vertex_ai/-prefixed keys, since the prefixed one is what get_model_info resolves for custom_llm_provider="vertex_ai".
|
Superseded by rolling registry audit #37902, which reverified and absorbed the provider-documented metadata changes at field level |
|
@mateo-berri Could a maintainer reopen this? #37902 closed unmerged, so nothing was absorbed, and both GA Live entries are still absent from staging |
|
Update: ab1b7bf since added gemini-live-2.5-flash-native-audio alone, without image or cache-read rates. The three vertex_ai/ entries here are still absent from main |
|
Rolling registry PR #39388 now carries the eight |
|
Reopened, sorry for closing. We've since added gemini-live-2.5-flash-native-audio to staging, so please rebase onto litellm_internal_staging keeping your rates |
|
Closing: the realtime mode flips and image token rate landed in #39388; the remaining entries and price cuts are not on the linked pricing pages. |
TLDR
Problem this solves:
How it solves it:
gemini-live-2.5-flashandgemini-live-2.5-flash-native-audioUser Flow
Before: a developer running a voice session against a GA Live model is billed nothing at all, so the model looks free and no budget ever trips
wss://litellm-domain/v1/realtime?model=gemini-live-2.5-flash-native-audioand speak into ithttps://litellm-domain/ui/?page=logsand the request is logged at $0.000000After: the same session is billed at Google's published Live rates
wss://litellm-domain/v1/realtime?model=gemini-live-2.5-flash-native-audioand speak into ithttps://litellm-domain/ui/?page=logsnow shows the request at $0.000668, with the audio share dominatingRelevant issues
Fixes #31087
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Vertex AI serves two GA Live models and neither had a cost map entry, so every Live session billed $0. This is the missing-entry half of #31087.
Which models actually exist. Probed by opening a real
BidiGenerateContentsocket and sending asetupper candidate, across 22 Vertex locations, withdefinitely-not-a-real-modelas a negative control:No Gemini 3.x Live exists on Vertex in any location tested, which matches Google documenting 3.x Live as Developer-API only. The two endpoints are disjoint: the half-cascade model is global-only and the native-audio model is regional-only.
Before, dev gateway at
7c6ba0a990, a real voice session onvertex_ai/gemini-live-2.5-flash-native-audioproduced audio and a correct transcript, and its spend row read$0.00000000because the model resolved to no entry at all.After, dev gateway at
ec9d9abfa2, the same sessions on both GA models bill from/spend/logs/v2:The preview correction. The existing
gemini-live-2.5-flash-preview-native-audio-09-2025entry prices text input at3e-07. That isgemini-2.5-flash's rate, not the Live API's. Google publishes $0.50 per 1M for Live text input, and the entry's other three columns already match the Live table ($3 input audio, $2 output text, $12 output audio), so the one odd column reads as a copy from the wrong sibling. Corrected on that entry and itsgemini/twin.The image rate. These entries had no
input_cost_per_image_token, so image tokens fell through toinput_cost_per_tokenand billed at the $0.50/M text rate instead of $3.00/M. That matters more on Live than the name suggests, because Gemini reports a Live video stream as a sequence of frames under the IMAGE modality; VIDEO never appears in a Live session's usage, so a camera feed is billed entirely through this one field.The rate is Google's non-text Live input price, published as "$3.00 (audio / video)" on
ai.google.dev/gemini-api/docs/pricingand matching the audio rate already in these entries. An independent check lines up with it: Google documents video input as "roughly 258 tokens per second", and a single 128x128 JPEG frame measured exactly 258 tokens against Vertex, so one frame is one second of video for billing. A four-frame session reported 1032 image tokens, exactly 4 x 258.Measured on a deployment carrying these entries, reading back from
/spend/logs/v2, withexpectedcomputed independently from each session's own modality split:At the text rate those same sessions would have billed $0.00014900 and $0.00052400, so the missing field was a 5.5x to 6x under-bill on any session carrying frames.
supported_output_modalitieson the native-audio entries is now audio only, because Vertex closes the socket whenresponseModalitiesasks for TEXT on those models, verified directly:supported_regionscomes from those same probes, ordered so a caller in an unsupported region falls back tous-central1rather than an arbitrary first entry. Note it listsus-west4, which Google's own region table omits but which answerssetupComplete, so the list is empirical rather than transcribed.A live call is the proof here rather than
get_model_infoalone, since the failure mode was a billed-at-zero session rather than a lookup error.Type
🐛 Bug Fix
Changes
Adds
gemini-live-2.5-flash(half-cascade, global) andgemini-live-2.5-flash-native-audio(native audio, regional), each as a bare key and avertex_ai/key, in both cost map files.Corrects the 09-2025 preview entry and its
gemini/twin:input_cost_per_token3e-07to5e-07, andsupported_output_modalitiesto audio only.Sets
input_cost_per_image_tokento3e-06on the four GA Live keys, matching the audio rate, so frames are priced at Google's non-text rate rather than falling back to text. Applied to both the bare andvertex_ai/-prefixed keys, since the prefixed one is whatget_model_inforesolves forcustom_llm_provider="vertex_ai".Sets
modetorealtimeon the Gemini Live entries that saidchatwhile listing only/v1/realtimeinsupported_endpoints, so health checks select the realtime probe. OpenAI'sgpt-audiofamily is deliberately untouched: those genuinely also serve/v1/chat/completions, sochatis right for them.gemini/gemini-robotics-er-2-streaming-previewhas the samemodemismatch and is left alone as out of scope.No new test, per the cost-map convention; the existing cost suite is the verification.
Caveats (if any)
input_cost_per_video_tokenstays unset; Live never reports VIDEOsupported_regionson a bare Vertex key is inert for routinggemini/image rate is out of scope hereFinal Attestation