Skip to content

feat(vertex_ai): add vertex_ai/gemini-4-hydrogen from the Vertex pricing page - #51432

Merged
kerry-berri merged 1 commit into
mainfrom
litellm-providers/price-sync-vertex-ai
Nov 12, 2026
Merged

kerry-berri merged 1 commit into
mainfrom
litellm-providers/price-sync-vertex-ai

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds vertex_ai/gemini-4-hydrogen (kind page). The Vertex pricing page https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing (now served at https://cloud.google.com/model-garden/pricing) gained a Gemini 4 Hydrogen row in its Gemini 4 Standard, Priority and Flex/Batch tables, and the google-models page lists it under "Generally available Gemini models". The rest of the page re-rendered with identical prices: 190 per-token cells across 29 existing vertex rows were compared against the catalog with 0 mismatches, so no other row changes.

Row evidence

Pricing page, Gemini 4 Standard table: "Gemini 4 Hydrogen | Input (text, image, video, audio) | Global | $1.50 | $0.075 | $1.875 ***" and "Text output (response and reasoning) | Global | $7.50". Non-global cells are 1.1x ($1.65 input, $8.25 output), so regional_endpoint_uplift_multiplier: 1.1 like the sibling Gemini 4 rows.

Priority table: "Gemini 4 Hydrogen | Input (text, image, video, audio) | Global | $2.70 | $0.135" and "Text output (response and reasoning) | Global | $13.50". Flex/Batch table: "Gemini 4 Hydrogen | Input (text, image, video, audio) | Global | $0.75 | $0.0375" and "Text output (response and reasoning) | Global | $3.75". Written as _priority, _batches and _flex fields. One input price covers text, image, video and audio, so input_cost_per_audio_token equals the text input price for each tier.

Model page https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/4-hydrogen: "Model ID gemini-4-hydrogen", "Context window 1,048,576", "Maximum output tokens 1,048,576", modalities Text input and output, Image, Audio and Video input only, "Thinking Supported", "Structured output Supported", "Function calling Supported", "URL context Supported", "Computer use Supported", "Gemini Live API Not supported", "Batch inference Supported", "Standard PayGo with Usage Tiers, Flex PayGo, Priority PayGo Supported", "Hydrogen supports implicit caching only (4,096-token minimum)" (prompt_cache_min_tokens: 4096), "Setting thinking_budget or thinking_level="MINIMAL" returns an HTTP 400 validation error" (supports_minimal_reasoning_effort: false). Grounding fields copied from the sibling vertex_ai/gemini-4-carbon row since the Gemini 4 grounding table ("$14 per 1,000 Grounding Queries", "5,000 Grounding Queries per month at no charge, aggregated across all Gemini 3 and Gemini 4 models") is shared.

Left out on purpose

Cache write price ($1.875 Global) is footnoted "*** Pricing for cache write effective January 12, 2027" and the model page says explicit context caching is not supported today, so it is not published yet. Gemini 4 Carbon and Gemini 4 Argon still show their promo prices through November 30, 2026 with $4/$20 starting December 1, 2026, kept at the current price per the existing switch-on-the-day rulings (vertex-ai-gemini-4-argon-3-8-tts-promo-switch-on-the-day).

Details

Link to Devin session: https://app.devin.ai/sessions/e66f1c24cf9141999d26e48119200233
Open in Devin Desktop: https://app.devin.ai/desktop/session/e66f1c24cf9141999d26e48119200233?variant=devin
Requested by: @kerry-berri


Note

Low Risk
Data-only addition to the model pricing JSON files; no auth, routing, or billing logic changes beyond enabling accurate cost/context lookup for a new model key.

Overview
Adds a vertex_ai/gemini-4-hydrogen catalog row to model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json, mirroring the existing gemini/gemini-4-hydrogen entry but with Vertex pricing (standard, priority, flex/batch tier token costs, audio input pricing, 1.1 regional uplift, 1M context/output limits, modality and capability flags, grounding/search billing, and /v1/batch support).

No runtime or routing code changes—only the shared model price/context registry is extended so LiteLLM can route and cost Vertex gemini-4-hydrogen calls consistently with sibling Gemini 4 models.

Reviewed by Cursor Bugbot for commit 0f9d35a. Bugbot is set up for automated code reviews on this repo. Configure here.

@veria-ai

veria-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

No security issues were found in this pull request.

Reviews

@devin-ai-integration
devin-ai-integration Bot force-pushed the litellm-providers/price-sync-vertex-ai branch from cceec26 to 0f9d35a Compare November 12, 2026 18:15
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@kerry-berri
kerry-berri enabled auto-merge (squash) November 12, 2026 18:16
@kerry-berri

Copy link
Copy Markdown
Contributor

@BugBot run

@kerry-berri

Copy link
Copy Markdown
Contributor

@greptileai

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects pricing and model details for one Vertex AI model.

Fix the missing Flex audio price in both catalogs before merging.

Findings

  1. P1 Flex audio costs twice ▶

Summary

Adds vertex_ai/gemini-4-hydrogen to both pricing catalogs with token limits, supported features, grounding prices, and prices for Standard, Priority, Batch, and Flex.

Flex audio pricing is missing in both copies. Audio therefore falls back to the Standard rate instead of receiving the Flex discount.

  • LiteLLM catalogs now include Gemini 4 Hydrogen.

Reviews (1) · Last reviewed commit: "feat(vertex_ai): add vertex_ai/gemini-4-..." · Reviewed by Greptile

Comment on lines +101094 to +101096
"input_cost_per_audio_token": 1.5e-06,
"input_cost_per_audio_token_batches": 7.5e-07,
"input_cost_per_audio_token_priority": 2.7e-06,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Flex audio costs twice

With service_tier="flex", audio falls back to the Standard rate, doubling its reported cost. Add input_cost_per_audio_token_flex: 7.5e-07 to both catalogs.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f9d35a. Configure here.

"input_cost_per_audio_token_priority": 2.7e-06,
"input_cost_per_token": 1.5e-06,
"input_cost_per_token_batches": 7.5e-07,
"input_cost_per_token_flex": 7.5e-07,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing flex rate for audio tokens

Medium Severity

The new vertex_ai/gemini-4-hydrogen row prices audio for standard, batches, and priority, and text for flex, but omits input_cost_per_audio_token_flex. Flex and batch Vertex traffic therefore bills audio at the standard input_cost_per_audio_token rate, twice the published flex input price.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0f9d35a. Configure here.

@codspeed

codspeed Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 2 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 43 untouched benchmarks


Comparing litellm-providers/price-sync-vertex-ai (0f9d35a) with main (d29ac75)

Open in CodSpeed

@kerry-berri
kerry-berri merged commit da00348 into main Nov 12, 2026
101 of 102 checks passed
@kerry-berri
kerry-berri deleted the litellm-providers/price-sync-vertex-ai branch November 12, 2026 18:34
@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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