Skip to content

feat(gemini): add gemini/gemini-4-hydrogen from the Gemini API pricing page - #51423

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

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

Conversation

@devin-ai-integration

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

Copy link
Copy Markdown
Contributor

Relevant issues

Adds the new gemini/gemini-4-hydrogen row (kind page). The ai.google.dev pricing page (now served from https://aistudio.google.com/docs/pricing) gained a "Gemini 4 Hydrogen" section for the GA id gemini-4-hydrogen and the model docs page is live, while the Gemini list API still only returns the confidential gemini-4-hydrogen-eap, which stays out of the catalog under ruling gemini-4-hydrogen-eap-leave-out. The release notes page had not announced Hydrogen yet when this was built (latest entry November 11, 2026).

Pre-Submission checklist

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details (cost map data only, no code change, the existing cost map tests cover the row shape)
  • I have added a screenshot of my new test passing locally (not applicable, data only)
  • My PR passes all unit tests on make test-unit [https://docs.litellm.ai/docs/extras/contributing_code]
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

New Feature (cost map row)

Changes

gemini/gemini-4-hydrogen (kind page)

Source: https://aistudio.google.com/docs/pricing#gemini-4-hydrogen (fetched raw with a cache buster), Standard tab, "Paid Tier, per 1M tokens in USD"

  • input_cost_per_token 1.5e-06, cell "Input price ... $1.50"
  • output_cost_per_token and output_cost_per_reasoning_token 7.5e-06, cell "Output price (including thinking tokens) ... $7.50"
  • cache_read_input_token_cost 7.5e-08, cell "Context caching price ... $0.075 Implicit caching only (explicit caching is not supported)"
  • Batch tab: input_cost_per_token_batches 7.5e-07 ("Input price ... $0.75"), output_cost_per_token_batches 3.75e-06 ("Output price (including thinking tokens) ... $3.75"), cache_read_input_token_cost_batches 3.75e-08 ("Context caching price ... $0.0375")
  • Flex tab: input_cost_per_token_flex 7.5e-07 ("Input price ... $0.75"), output_cost_per_token_flex 3.75e-06 ("Output price (including thinking tokens) ... $3.75"), cache_read_input_token_cost_flex 3.75e-08 ("Context caching price ... $0.0375")
  • Priority tab: input_cost_per_token_priority 2.7e-06 ("Input price ... $2.70"), output_cost_per_token_priority 1.35e-05 ("Output price (including thinking tokens) ... $13.50"), cache_read_input_token_cost_priority 1.35e-07 ("Context caching price ... $0.135")
  • search_context_cost_per_query 0.014 per query and search_free_requests 5000 per month shared across Gemini 3 and newer, cell "Grounding with Google Search ... 5,000 free search requests per month (shared across all Gemini 3 and newer models), then $14 per 1,000 requests"
  • google_maps_grounding_cost_per_query 0.014, cell "Grounding with Google Maps ... 5,000 requests per month (free, shared across all Gemini 3 and newer models), then $14 / 1,000 search queries"
  • Contributor tab prices ($0.75 / $3.75 / $0.0375) left out under ruling gemini-contributor-tier-prices-leave-out (no catalog field for that tier)

Model docs: https://aistudio.google.com/docs/models/gemini-4-hydrogen (fetched raw)

  • max_input_tokens 1048576, cell "Context window (unified input and output token limit) 1,048,576"
  • max_output_tokens 1048576, cell "Max output 65,536 (default synchronous) / up to 1,048,576 (with long decode)". Written as the long decode ceiling to match gemini/gemini-4-argon and gemini/gemini-4-carbon, following ruling gemini-4-argon-max-output-tokens-wait-long-decode-field (the 65536 default waits for a separate long decode field)
  • supported_modalities text, image, audio, video and supports_pdf_input, cell "Inputs Text, Image, Video, Audio, and PDF"; supported_output_modalities text, cell "Output Text"
  • supports_function_calling ("Function calling Supported"), supports_response_schema ("Structured outputs Supported"), supports_reasoning ("Thinking Supported (low, medium, high, xhigh)"), supports_prompt_caching ("Context caching Supported (Implicit only)"), supports_web_search ("Grounding with Google Search Supported"), supports_url_context ("URL context Supported"), supports_computer_use ("Computer use Supported"), supports_audio_output false ("Audio generation Not supported")
  • Batch, Flex and Priority consumption options all "Supported" on the model page, so the tier prices above apply

Inherited from gemini/gemini-4-argon (no source states them for Hydrogen): rpm 2000, tpm 800000, prompt_cache_min_tokens 4096, supports_continuation, supports_native_streaming, supports_parallel_function_calling, supports_system_messages, supports_tool_choice, supports_minimal_reasoning_effort false, supported_endpoints, web_search_billing_unit

Delisted by the provider

No deprecation date on the deprecations page for any of these, so they stay unchanged under ruling gemini-delisted-no-date-keep: gemini-exp-1206, gemini/gemini-exp-1114, gemini/gemini-gemma-2-27b-it, gemini/gemini-gemma-2-9b-it, gemini/gemini-live-2.5-flash-preview-native-audio-09-2025, gemini/gemma-3-27b-it, gemini/imagen-3.0-fast-generate-001, gemini/imagen-3.0-generate-001, gemini/learnlm-1.5-pro-experimental, gemini/lyria-3.5-clip-preview, gemini/lyria-3.5-pro-preview, gemini/veo-3.1-fast-generate-001, gemini/veo-3.1-generate-001. gemini/veo-3.1-fast-generate-preview, gemini/veo-3.1-generate-preview and gemini/veo-3.1-lite-generate-preview already carry their October 22, 2026 shutdown date and gemini-omni-1.2-flash successor.

Details

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


Note

Low Risk
Data-only catalog update to pricing JSON; no runtime logic changes, with existing cost-map tests expected to cover row shape.

Overview
Adds gemini/gemini-4-hydrogen to the LiteLLM cost/context catalog in both model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json.

The new row reflects Google AI Studio pricing (standard, batch, flex, priority) and model limits: ~1M context, multimodal input (text/image/audio/video/PDF), reasoning and implicit prompt caching, web search/maps grounding at $0.014/query, and capability flags aligned with other Gemini 4 models (some rate limits inherited from gemini-4-argon). No application code changes.

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

@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.

@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

@kerry-berri
kerry-berri enabled auto-merge (squash) November 12, 2026 17:46
@kerry-berri

Copy link
Copy Markdown
Contributor

@BugBot run

@kerry-berri

Copy link
Copy Markdown
Contributor

@greptileai

@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a410ecc. Configure here.

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This catalog-only addition appears safe to merge.

Summary

Adds gemini/gemini-4-hydrogen to both model catalogs.

  • LiteLLM can look up Gemini 4 Hydrogen's limits and prices.

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

@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-gemini (a410ecc) with main (be623b5)

Open in CodSpeed

@kerry-berri
kerry-berri merged commit 8ba416a into main Nov 12, 2026
101 of 102 checks passed
@kerry-berri
kerry-berri deleted the litellm-providers/price-sync-gemini branch November 12, 2026 18:00
@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