Skip to content

feat(pricing): add gemini-3-pro-image and gemini-3.1-flash-image GA model pricing - #30022

Merged
milan-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_add_gemini_3_image_ga_pricing
Jun 25, 2026
Merged

milan-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_add_gemini_3_image_ga_pricing

Conversation

@milan-berri

Copy link
Copy Markdown
Contributor

Relevant issues

Fixes #29794

Request: migrate image editing to gemini-3.1-flash-image and gemini-3-pro-image now that both models are GA. LiteLLM's pricing JSON only had the -preview variants, so proxy cost tracking returned zero (or required manual model definitions) when using the GA model names.

Linear ticket

Resolves LIT-3681

Summary

Adds GA pricing entries for two Gemini image generation models to model_prices_and_context_window.json:

  • gemini-3-pro-image
  • gemini-3.1-flash-image

Each model is added under three provider prefixes (bare, gemini/, vertex_ai/), for 6 new entries total. Values are copied from the existing -preview entries, which already match Google's published GA rates.

Models added

Model key Based on
gemini-3-pro-image gemini-3-pro-image-preview
gemini-3.1-flash-image gemini-3.1-flash-image-preview
gemini/gemini-3-pro-image gemini/gemini-3-pro-image-preview
gemini/gemini-3.1-flash-image gemini/gemini-3.1-flash-image-preview
vertex_ai/gemini-3-pro-image vertex_ai/gemini-3-pro-image-preview
vertex_ai/gemini-3.1-flash-image vertex_ai/gemini-3.1-flash-image-preview

Provider pricing verification

Confirmed against Google AI pricing and Vertex AI pricing. Both GA models reached GA on May 28, 2026; preview versions are deprecated with shutdown scheduled for June 25, 2026 (deprecations table).

Model Input $/token Output $/token Output $/image Matches preview?
gemini-3-pro-image 2e-06 ($2/1M) 1.2e-05 ($12/1M) 0.134 (1K/2K) Yes
gemini-3.1-flash-image (vertex bare) 5e-07 ($0.50/1M) 3e-06 ($3/1M) 0.0672 (1K) Yes
gemini/gemini-3.1-flash-image 2.5e-07 1.5e-06 0.045 (0.5K) Yes

All cost, limit, and capability fields are identical to their -preview counterparts. Only source URLs differ on some entries (updated to GA anchors where applicable).

Note: gemini/gemini-3.1-flash-image token rates match the existing preview entry (batch-tier token rates). Per-image pricing matches GA. This is inherited from preview, not a new divergence.

Type of change

  • Bug fix (missing pricing data for GA model names)
  • New feature
  • Breaking change

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Only model_prices_and_context_window.json is changed (matches pattern from feat(pricing): add Snowflake Cortex REST API model pricing #26612 and other pricing PRs)
  • JSON validates
  • All 6 GA entries verified identical to -preview counterparts (except source)
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

CI (LiteLLM team)

  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

Test plan

  • python3 -c "import json; json.load(open('model_prices_and_context_window.json'))" — JSON parses
  • All 6 GA model keys present in pricing JSON
  • Cost fields match corresponding -preview entries
  • Key rates cross-checked against Google GA pricing docs
  • CI green

Fixes #29794. Adds bare, gemini/, and vertex_ai/ entries copied from preview models so proxy cost tracking works for GA model names.

Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds GA pricing entries for gemini-3-pro-image and gemini-3.1-flash-image under three provider prefixes each (bare, gemini/, vertex_ai/), fixing zero-cost tracking for callers using the GA model names rather than the -preview aliases.

  • All 6 new entries are structurally faithful copies of their corresponding -preview counterparts; pricing values, token limits, supported modalities, and capability flags are identical, with source URL anchors updated to GA-specific anchors where applicable.
  • Two pre-existing structural patterns from the preview entries carry over: the bare and vertex_ai/ gemini-3.1-flash-image entries omit input_cost_per_token_batches, output_cost_per_token_batches, and supports_service_tier (consistent with preview), while the gemini/gemini-3.1-flash-image entry omits input_cost_per_image (also consistent with preview, batch-tier token rate inherited).

Confidence Score: 4/5

Safe to merge; the change is limited to adding 6 new pricing entries that are verbatim copies of their well-established -preview counterparts.

All 6 new entries mirror their preview counterparts exactly in pricing values, token limits, and capability flags — the only intentional differences are updated source URL anchors. The structural omissions (missing batch cost fields and supports_service_tier on the flash-image variants) are directly inherited from the preview entries and pre-date this PR. JSON validity is confirmed. The single file changed has no logic, only declarative data, so the blast radius is limited to cost tracking for the two new GA model names.

No files require special attention beyond a spot-check of the token/image pricing values against Google's current published GA rates.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds 6 GA pricing entries for gemini-3-pro-image and gemini-3.1-flash-image across bare, gemini/, and vertex_ai/ prefixes; all entries are structurally identical to their -preview counterparts (cost values, token limits, capability flags) with only source URL anchors updated where appropriate.

Reviews (1): Last reviewed commit: "Add GA pricing for gemini-3-pro-image an..." | Re-trigger Greptile

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@milan-berri
milan-berri merged commit 7ffce15 into litellm_internal_staging Jun 25, 2026
122 checks passed
@milan-berri
milan-berri deleted the litellm_add_gemini_3_image_ga_pricing branch June 25, 2026 22:40
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.

[Feature]: pricing for gemini-3-pro-image and gemini-3.1-flash-image

2 participants