Repository navigation
feat(gemini): add gemini/gemini-4-hydrogen from the Gemini API pricing page - #51423
Conversation
|
|
PR overviewNo security issues were found in this pull request. Reviews
|
|
@BugBot run |
There was a problem hiding this comment.
✅ 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.
[Medium impact] This catalog-only addition appears safe to merge. SummaryAdds
Reviews (1) · Last reviewed commit: "feat(gemini): add gemini/gemini-4-hydrog..." · Reviewed by Greptile |
Merging this PR will not alter performance1 warning
Comparing |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Relevant issues
Adds the new
gemini/gemini-4-hydrogenrow (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 idgemini-4-hydrogenand the model docs page is live, while the Gemini list API still only returns the confidentialgemini-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
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)make test-unit[https://docs.litellm.ai/docs/extras/contributing_code]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_token1.5e-06, cell "Input price ... $1.50"output_cost_per_tokenandoutput_cost_per_reasoning_token7.5e-06, cell "Output price (including thinking tokens) ... $7.50"cache_read_input_token_cost7.5e-08, cell "Context caching price ... $0.075 Implicit caching only (explicit caching is not supported)"input_cost_per_token_batches7.5e-07 ("Input price ... $0.75"),output_cost_per_token_batches3.75e-06 ("Output price (including thinking tokens) ... $3.75"),cache_read_input_token_cost_batches3.75e-08 ("Context caching price ... $0.0375")input_cost_per_token_flex7.5e-07 ("Input price ... $0.75"),output_cost_per_token_flex3.75e-06 ("Output price (including thinking tokens) ... $3.75"),cache_read_input_token_cost_flex3.75e-08 ("Context caching price ... $0.0375")input_cost_per_token_priority2.7e-06 ("Input price ... $2.70"),output_cost_per_token_priority1.35e-05 ("Output price (including thinking tokens) ... $13.50"),cache_read_input_token_cost_priority1.35e-07 ("Context caching price ... $0.135")search_context_cost_per_query0.014 per query andsearch_free_requests5000 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_query0.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"Model docs: https://aistudio.google.com/docs/models/gemini-4-hydrogen (fetched raw)
max_input_tokens1048576, cell "Context window (unified input and output token limit) 1,048,576"max_output_tokens1048576, cell "Max output 65,536 (default synchronous) / up to 1,048,576 (with long decode)". Written as the long decode ceiling to matchgemini/gemini-4-argonandgemini/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_modalitiestext, image, audio, video andsupports_pdf_input, cell "Inputs Text, Image, Video, Audio, and PDF";supported_output_modalitiestext, 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_outputfalse ("Audio generation Not supported")Inherited from
gemini/gemini-4-argon(no source states them for Hydrogen):rpm2000,tpm800000,prompt_cache_min_tokens4096,supports_continuation,supports_native_streaming,supports_parallel_function_calling,supports_system_messages,supports_tool_choice,supports_minimal_reasoning_effortfalse,supported_endpoints,web_search_billing_unitDelisted 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-hydrogento the LiteLLM cost/context catalog in bothmodel_prices_and_context_window.jsonandlitellm/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.